Skip to content
Reeflow
Start Building

@reeflow/core

Defined in: packages/types/dist/index.d.mts:20052

Query types for JSONQL queries

Enumeration MemberValueDefined in
AGGREGATE"aggregate"packages/types/dist/index.d.mts:20055
SQL"sql"packages/types/dist/index.d.mts:20053
TABLE"table"packages/types/dist/index.d.mts:20054

Defined in: apps/sdks/core/src/components/charts/bar/ReeflowBarChart.ts:21

Bar chart component for visualizing data as vertical bars

Automatically determines dimension (x-axis) and measure (y-axis) columns from query results. Supports multiple measures displayed as grouped bars.

<reeflow-bar-chart
connection-id="my-connection"
query='{"select": [{"dimension": "category"}, {"measure": "sales"}], "from": "revenue"}'>
</reeflow-bar-chart>
new ReeflowBarChart(): ReeflowBarChart;

Defined in: node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts:527

ReeflowBarChart

ReeflowChart.constructor

protected chartInstance: EChartsType | null = null;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:54

ReeflowChart.chartInstance

protected chartOptions: EChartsOption = {};

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:57

ReeflowChart.chartOptions

protected chartType: "bar";

Defined in: apps/sdks/core/src/components/charts/bar/ReeflowBarChart.ts:22

Chart type identifier for template rendering (icons, labels) Override in subclasses to specify the chart type

ReeflowChart.chartType

optional componentId: string;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:47

Component ID from the workbook configuration Used to uniquely identify this component instance

ReeflowChart.componentId

protected errorCode: string | null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:117

ReeflowChart.errorCode

errorMessage: string | null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:120

ReeflowChart.errorMessage

optional height: number;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:51

Chart height in pixels (optional, defaults to container height)

ReeflowChart.height

label: string;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:67

Optional label displayed above the component

ReeflowChart.label

query:
| {
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
parameters?: Record<string, string | number | boolean>;
sql: string;
type: SQL;
}
| {
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
dimensions?: (
| {
column: string;
label?: string;
type: "categorical";
}
| {
column: string;
date_range?: [string, string];
granularity: "day" | "week" | "month" | "quarter" | "year";
label?: string;
type: "time";
})[];
filters?: (
| {
column: string;
operator: "gt" | "gte" | "lt" | "lte";
values: string[];
}
| {
column: string;
operator: "last_n_days" | "last_n_months" | "last_n_years" | "last_n_quarters";
values: string[];
}
| {
column: string;
operator: "in" | "equals";
values: string[];
}
| {
column: string;
operator: "starts_with" | "contains" | "ends_with";
values: string[];
}
| {
column: string;
operator: "between";
values: string[];
}
| {
column: string;
operator: "is_null";
values: string[];
}
| {
column: string;
operator: "today" | "this_month" | "this_year" | "this_quarter";
values: string[];
})[];
joins?: {
from: string;
from_column: string;
to: string;
to_column: string;
type: "inner" | "left" | "right" | "full";
}[];
limit?: string | number;
measures: {
color?: string;
column?: string;
label?: string;
type: "avg" | "count" | "count_distinct" | "max" | "min" | "sum";
}[];
offset?: string | number;
order_by?: {
column: string;
direction: "asc" | "desc";
}[];
parameters?: Record<string, string | number | boolean>;
type: AGGREGATE;
}
| {
columns?: (
| {
label?: string;
name: string;
}
| {
label?: string;
raw: string;
})[];
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
distinct?: boolean;
filters?: (
| {
column: string;
operator: "gt" | "gte" | "lt" | "lte";
values: string[];
}
| {
column: string;
operator: "last_n_days" | "last_n_months" | "last_n_years" | "last_n_quarters";
values: string[];
}
| {
column: string;
operator: "in" | "equals";
values: string[];
}
| {
column: string;
operator: "starts_with" | "contains" | "ends_with";
values: string[];
}
| {
column: string;
operator: "between";
values: string[];
}
| {
column: string;
operator: "is_null";
values: string[];
}
| {
column: string;
operator: "today" | "this_month" | "this_year" | "this_quarter";
values: string[];
})[];
joins?: {
from: string;
from_column: string;
to: string;
to_column: string;
type: "inner" | "left" | "right" | "full";
}[];
limit?: string | number;
offset?: string | number;
order_by?: {
column: string;
direction: "asc" | "desc";
}[];
parameters?: Record<string, string | number | boolean>;
type: TABLE;
}
| null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:61

JSONQL query to execute Can be set via attribute or inline script tag with slot=“query”

ReeflowChart.query

theme: "default" | "ocean" = DEFAULT_THEME;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:39

ReeflowChart.theme

themeMode: ThemeMode = DEFAULT_THEME_MODE;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:42

ReeflowChart.themeMode

optional themeStyle: string;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:45

ReeflowChart.themeStyle

optional width: number;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:45

Chart width in pixels (optional, defaults to container width)

ReeflowChart.width

get data(): QueryResult | null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:82

QueryResult | null

set data(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:86

ParameterType
value| QueryResult | { columns: unknown[]; rows: unknown[][]; } | null

void

ReeflowChart.data

get state(): ReeflowComponentState;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:22

ReeflowComponentState

set state(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:26

ParameterType
valueReeflowComponentState

void

ReeflowChart.state

protected emitEvent<T>(type, data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:42

Emit a standardized Reeflow custom event

Events are prefixed with reeflow- and configured to bubble through shadow DOM.

Type Parameter
T extends ReeflowEventType
ParameterTypeDescription
typeTEvent type (becomes reeflow-${type})
data?unknownEvent detail payload

void

this.emitEvent('data-loaded', { rows: 100 });
// Dispatches event: 'reeflow-data-loaded' with detail: { rows: 100 }

ReeflowChart.emitEvent

protected executeQuery(): Promise<QueryResult | null>;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:178

Execute the current query and update component state

Promise<QueryResult | null>

ReeflowChart.executeQuery

protected findProvider():
| ReeflowProvider
| null;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:140

Find ReeflowProvider in the component tree with caching

| ReeflowProvider | null

ReeflowChart.findProvider

protected generateChartOptions(): EChartsOption;

Defined in: apps/sdks/core/src/components/charts/bar/ReeflowBarChart.ts:28

Generate ECharts configuration for bar chart

EChartsOption

ECharts option object with bar chart configuration

ReeflowChart.generateChartOptions

protected getChartAxisThemeOptions(options?): EChartsOption;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:344

Get axis theme options for charts with axes (bar, line)

ParameterTypeDescription
options?Partial<AxisThemeOptions>Optional axis theme options to override defaults

EChartsOption

ECharts options with axis theme applied

ReeflowChart.getChartAxisThemeOptions

getChartInstance(): EChartsType | null;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:311

Get the underlying ECharts instance for advanced customization

EChartsType | null

ECharts instance or null if not yet initialized

ReeflowChart.getChartInstance

protected getChartThemeOptions(options?): EChartsOption;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:331

Get base theme options for charts

ParameterTypeDescription
options?Partial<BaseThemeOptions>Optional theme options to override defaults

EChartsOption

Base ECharts options with theme applied

ReeflowChart.getChartThemeOptions

protected getProviderOrThrow(): ReeflowProvider;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:174

Get ReeflowProvider or throw an error if not found

ReeflowProvider

Error if ReeflowProvider is not found in the component tree

ReeflowChart.getProviderOrThrow

protected log(
level,
message,
data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:24

Log a message with Reeflow prefix

ParameterTypeDescription
levelLogLevelLog level (log, error, warn, info, debug)
messagestringMessage to log
data?unknownOptional additional data to include in log

void

ReeflowChart.log

refresh(): Promise<void>;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:238

Refresh data by re-executing the current query

Promise<void>

Promise that resolves when refresh is complete

ReeflowChart.refresh

render(): TemplateResult;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:121

Render the chart component with state-based content

TemplateResult

Template result with chart canvas or state indicators

ReeflowChart.render

reset(includeQuery): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:246

Reset to initial state

ParameterTypeDefault valueDescription
includeQuerybooleanfalseWhether to also reset the query to null (default: false)

void

ReeflowChart.reset

updateChartOptions(options, notMerge): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:320

Update chart options programmatically after initial render

ParameterTypeDefault valueDescription
optionsEChartsOptionundefinedECharts options to apply
notMergebooleanfalseIf true, replaces existing options instead of merging

void

ReeflowChart.updateChartOptions

connectedCallback(): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:61

Invoked when the component is added to the document’s DOM.

In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}

Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

void

ReeflowChart.connectedCallback

disconnectedCallback(): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:66

Invoked when the component is removed from the document’s DOM.

This callback is the main signal to the element that it may no longer be used. disconnectedCallback() should ensure that nothing is holding a reference to the element (such as event listeners added to nodes external to the element), so that it is free to be garbage collected.

disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}

An element may be re-connected after being disconnected.

void

ReeflowChart.disconnectedCallback

static styles: CSSResult = defaultStyles;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:40

Array of styles to apply to the element. The styles should be defined using the css tag function, via constructible stylesheets, or imported from native CSS module scripts.

Note on Content Security Policy:

Element styles are implemented with <style> tags when the browser doesn’t support adopted StyleSheets. To use such <style> tags with the style-src CSP directive, the style-src value must either include ‘unsafe-inline’ or nonce-<base64-value> with <base64-value> replaced be a server-generated nonce.

To provide a nonce to use on generated <style> elements, set window.litNonce to a server-generated nonce in your page’s HTML, before loading application code:

<script>
// Generated and unique per request:
window.litNonce = 'a1b2c3d4';
</script>

ReeflowChart.styles

firstUpdated(): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:73

Invoked when the element is first updated. Implement to perform one time work on the element after update.

firstUpdated() {
this.renderRoot.getElementById('my-text-area').focus();
}

Setting properties inside this method will trigger the element to update again after this update cycle completes.

void

ReeflowChart.firstUpdated

updated(changedProperties): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:77

Invoked whenever the element is updated. Implement to perform post-updating tasks via DOM APIs, for example, focusing an element.

Setting properties inside this method will trigger the element to update again after this update cycle completes.

ParameterType
changedPropertiesMap<string, unknown>

void

ReeflowChart.updated


Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:18

Abstract foundation class for all Reeflow components Provides shared functionality: provider communication, base events

reeflow-state-change - Fired when component state changes. Detail: { state: ReeflowComponentState, oldState: ReeflowComponentState }

new ReeflowBaseComponent(): ReeflowBaseComponent;

Defined in: node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts:527

ReeflowBaseComponent

ReeflowEventEmitter.constructor

theme: "default" | "ocean" = DEFAULT_THEME;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:39

themeMode: ThemeMode = DEFAULT_THEME_MODE;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:42

optional themeStyle: string;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:45

get state(): ReeflowComponentState;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:22

ReeflowComponentState

set state(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:26

ParameterType
valueReeflowComponentState

void

protected emitEvent<T>(type, data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:42

Emit a standardized Reeflow custom event

Events are prefixed with reeflow- and configured to bubble through shadow DOM.

Type Parameter
T extends ReeflowEventType
ParameterTypeDescription
typeTEvent type (becomes reeflow-${type})
data?unknownEvent detail payload

void

this.emitEvent('data-loaded', { rows: 100 });
// Dispatches event: 'reeflow-data-loaded' with detail: { rows: 100 }

ReeflowEventEmitter.emitEvent

protected findProvider():
| ReeflowProvider
| null;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:140

Find ReeflowProvider in the component tree with caching

| ReeflowProvider | null

protected getProviderOrThrow(): ReeflowProvider;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:174

Get ReeflowProvider or throw an error if not found

ReeflowProvider

Error if ReeflowProvider is not found in the component tree

protected log(
level,
message,
data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:24

Log a message with Reeflow prefix

ParameterTypeDescription
levelLogLevelLog level (log, error, warn, info, debug)
messagestringMessage to log
data?unknownOptional additional data to include in log

void

ReeflowEventEmitter.log

connectedCallback(): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:59

Invoked when the component is added to the document’s DOM.

In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}

Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

void

ReeflowEventEmitter.connectedCallback
disconnectedCallback(): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:87

Invoked when the component is removed from the document’s DOM.

This callback is the main signal to the element that it may no longer be used. disconnectedCallback() should ensure that nothing is holding a reference to the element (such as event listeners added to nodes external to the element), so that it is free to be garbage collected.

disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}

An element may be re-connected after being disconnected.

void

ReeflowEventEmitter.disconnectedCallback

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:34

Abstract base chart component using ECharts

Provides shared functionality for all chart types including:

  • Chart lifecycle management (initialization, updates, destruction)
  • Theme support with automatic updates
  • Responsive resizing
  • State management (loading, error, ready, empty)

This is an abstract class. Use concrete implementations like ReeflowBarChart, ReeflowLineChart, or ReeflowPieChart.

reeflow-chart-click - Fired when a chart element (bar, line point, pie slice, etc.) is clicked

reeflow-chart-hover - Fired when the mouse hovers over a chart element

reeflow-chart-legend-toggle - Fired when a legend item is clicked to toggle series visibility

new ReeflowChart(): ReeflowChart;

Defined in: node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts:527

ReeflowChart

ReeflowElement.constructor

protected chartInstance: EChartsType | null = null;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:54

protected chartOptions: EChartsOption = {};

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:57

protected chartType: TemplateComponentType = 'chart';

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:39

Chart type identifier for template rendering (icons, labels) Override in subclasses to specify the chart type

optional componentId: string;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:47

Component ID from the workbook configuration Used to uniquely identify this component instance

ReeflowElement.componentId

protected errorCode: string | null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:117

ReeflowElement.errorCode

errorMessage: string | null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:120

ReeflowElement.errorMessage

optional height: number;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:51

Chart height in pixels (optional, defaults to container height)

label: string;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:67

Optional label displayed above the component

ReeflowElement.label

query:
| {
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
parameters?: Record<string, string | number | boolean>;
sql: string;
type: SQL;
}
| {
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
dimensions?: (
| {
column: string;
label?: string;
type: "categorical";
}
| {
column: string;
date_range?: [string, string];
granularity: "day" | "week" | "month" | "quarter" | "year";
label?: string;
type: "time";
})[];
filters?: (
| {
column: string;
operator: "gt" | "gte" | "lt" | "lte";
values: string[];
}
| {
column: string;
operator: "last_n_days" | "last_n_months" | "last_n_years" | "last_n_quarters";
values: string[];
}
| {
column: string;
operator: "in" | "equals";
values: string[];
}
| {
column: string;
operator: "starts_with" | "contains" | "ends_with";
values: string[];
}
| {
column: string;
operator: "between";
values: string[];
}
| {
column: string;
operator: "is_null";
values: string[];
}
| {
column: string;
operator: "today" | "this_month" | "this_year" | "this_quarter";
values: string[];
})[];
joins?: {
from: string;
from_column: string;
to: string;
to_column: string;
type: "inner" | "left" | "right" | "full";
}[];
limit?: string | number;
measures: {
color?: string;
column?: string;
label?: string;
type: "avg" | "count" | "count_distinct" | "max" | "min" | "sum";
}[];
offset?: string | number;
order_by?: {
column: string;
direction: "asc" | "desc";
}[];
parameters?: Record<string, string | number | boolean>;
type: AGGREGATE;
}
| {
columns?: (
| {
label?: string;
name: string;
}
| {
label?: string;
raw: string;
})[];
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
distinct?: boolean;
filters?: (
| {
column: string;
operator: "gt" | "gte" | "lt" | "lte";
values: string[];
}
| {
column: string;
operator: "last_n_days" | "last_n_months" | "last_n_years" | "last_n_quarters";
values: string[];
}
| {
column: string;
operator: "in" | "equals";
values: string[];
}
| {
column: string;
operator: "starts_with" | "contains" | "ends_with";
values: string[];
}
| {
column: string;
operator: "between";
values: string[];
}
| {
column: string;
operator: "is_null";
values: string[];
}
| {
column: string;
operator: "today" | "this_month" | "this_year" | "this_quarter";
values: string[];
})[];
joins?: {
from: string;
from_column: string;
to: string;
to_column: string;
type: "inner" | "left" | "right" | "full";
}[];
limit?: string | number;
offset?: string | number;
order_by?: {
column: string;
direction: "asc" | "desc";
}[];
parameters?: Record<string, string | number | boolean>;
type: TABLE;
}
| null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:61

JSONQL query to execute Can be set via attribute or inline script tag with slot=“query”

ReeflowElement.query

theme: "default" | "ocean" = DEFAULT_THEME;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:39

ReeflowElement.theme

themeMode: ThemeMode = DEFAULT_THEME_MODE;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:42

ReeflowElement.themeMode

optional themeStyle: string;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:45

ReeflowElement.themeStyle

optional width: number;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:45

Chart width in pixels (optional, defaults to container width)

get data(): QueryResult | null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:82

QueryResult | null

set data(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:86

ParameterType
value| QueryResult | { columns: unknown[]; rows: unknown[][]; } | null

void

ReeflowElement.data

get state(): ReeflowComponentState;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:22

ReeflowComponentState

set state(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:26

ParameterType
valueReeflowComponentState

void

ReeflowElement.state

protected emitEvent<T>(type, data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:42

Emit a standardized Reeflow custom event

Events are prefixed with reeflow- and configured to bubble through shadow DOM.

Type Parameter
T extends ReeflowEventType
ParameterTypeDescription
typeTEvent type (becomes reeflow-${type})
data?unknownEvent detail payload

void

this.emitEvent('data-loaded', { rows: 100 });
// Dispatches event: 'reeflow-data-loaded' with detail: { rows: 100 }

ReeflowElement.emitEvent

protected executeQuery(): Promise<QueryResult | null>;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:178

Execute the current query and update component state

Promise<QueryResult | null>

ReeflowElement.executeQuery

protected findProvider():
| ReeflowProvider
| null;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:140

Find ReeflowProvider in the component tree with caching

| ReeflowProvider | null

ReeflowElement.findProvider

abstract protected generateChartOptions(): EChartsOption;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:305

Abstract method to generate chart-specific configuration

Must be implemented by concrete chart components to define chart type and data mapping.

EChartsOption

ECharts option object for the specific chart type

protected getChartAxisThemeOptions(options?): EChartsOption;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:344

Get axis theme options for charts with axes (bar, line)

ParameterTypeDescription
options?Partial<AxisThemeOptions>Optional axis theme options to override defaults

EChartsOption

ECharts options with axis theme applied

getChartInstance(): EChartsType | null;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:311

Get the underlying ECharts instance for advanced customization

EChartsType | null

ECharts instance or null if not yet initialized

protected getChartThemeOptions(options?): EChartsOption;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:331

Get base theme options for charts

ParameterTypeDescription
options?Partial<BaseThemeOptions>Optional theme options to override defaults

EChartsOption

Base ECharts options with theme applied

protected getProviderOrThrow(): ReeflowProvider;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:174

Get ReeflowProvider or throw an error if not found

ReeflowProvider

Error if ReeflowProvider is not found in the component tree

ReeflowElement.getProviderOrThrow

protected log(
level,
message,
data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:24

Log a message with Reeflow prefix

ParameterTypeDescription
levelLogLevelLog level (log, error, warn, info, debug)
messagestringMessage to log
data?unknownOptional additional data to include in log

void

ReeflowElement.log

refresh(): Promise<void>;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:238

Refresh data by re-executing the current query

Promise<void>

Promise that resolves when refresh is complete

ReeflowElement.refresh

render(): TemplateResult;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:121

Render the chart component with state-based content

TemplateResult

Template result with chart canvas or state indicators

ReeflowElement.render
reset(includeQuery): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:246

Reset to initial state

ParameterTypeDefault valueDescription
includeQuerybooleanfalseWhether to also reset the query to null (default: false)

void

ReeflowElement.reset

updateChartOptions(options, notMerge): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:320

Update chart options programmatically after initial render

ParameterTypeDefault valueDescription
optionsEChartsOptionundefinedECharts options to apply
notMergebooleanfalseIf true, replaces existing options instead of merging

void

connectedCallback(): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:61

Invoked when the component is added to the document’s DOM.

In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}

Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

void

ReeflowElement.connectedCallback

disconnectedCallback(): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:66

Invoked when the component is removed from the document’s DOM.

This callback is the main signal to the element that it may no longer be used. disconnectedCallback() should ensure that nothing is holding a reference to the element (such as event listeners added to nodes external to the element), so that it is free to be garbage collected.

disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}

An element may be re-connected after being disconnected.

void

ReeflowElement.disconnectedCallback

static styles: CSSResult = defaultStyles;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:40

Array of styles to apply to the element. The styles should be defined using the css tag function, via constructible stylesheets, or imported from native CSS module scripts.

Note on Content Security Policy:

Element styles are implemented with <style> tags when the browser doesn’t support adopted StyleSheets. To use such <style> tags with the style-src CSP directive, the style-src value must either include ‘unsafe-inline’ or nonce-<base64-value> with <base64-value> replaced be a server-generated nonce.

To provide a nonce to use on generated <style> elements, set window.litNonce to a server-generated nonce in your page’s HTML, before loading application code:

<script>
// Generated and unique per request:
window.litNonce = 'a1b2c3d4';
</script>

ReeflowElement.styles

firstUpdated(): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:73

Invoked when the element is first updated. Implement to perform one time work on the element after update.

firstUpdated() {
this.renderRoot.getElementById('my-text-area').focus();
}

Setting properties inside this method will trigger the element to update again after this update cycle completes.

void

ReeflowElement.firstUpdated
updated(changedProperties): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:77

Invoked whenever the element is updated. Implement to perform post-updating tasks via DOM APIs, for example, focusing an element.

Setting properties inside this method will trigger the element to update again after this update cycle completes.

ParameterType
changedPropertiesMap<string, unknown>

void

ReeflowElement.updated


Defined in: apps/sdks/core/src/components/container/ReeflowContainer.ts:27

Generic container component that renders custom content within the standard Reeflow frame structure

This component provides the standard two-layer padding structure (frame + container) with optional title, border, margin, and padding. It’s a generic container that renders any children you provide, making it useful for custom content, empty states, placeholders, or any other UI that needs the standard Reeflow styling and theme support.

The component accepts slotted content via children.

<reeflow-container label="Custom Content">
<div style="text-align: center; padding: 40px;">
<p>Your custom content goes here</p>
</div>
</reeflow-container>
new ReeflowContainer(): ReeflowContainer;

Defined in: node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts:527

ReeflowContainer

ReeflowBaseComponent.constructor

label: string;

Defined in: apps/sdks/core/src/components/container/ReeflowContainer.ts:34

Optional label displayed at the top of the component

theme: "default" | "ocean" = DEFAULT_THEME;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:39

ReeflowBaseComponent.theme

themeMode: ThemeMode = DEFAULT_THEME_MODE;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:42

ReeflowBaseComponent.themeMode

optional themeStyle: string;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:45

ReeflowBaseComponent.themeStyle

get state(): ReeflowComponentState;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:22

ReeflowComponentState

set state(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:26

ParameterType
valueReeflowComponentState

void

ReeflowBaseComponent.state

protected emitEvent<T>(type, data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:42

Emit a standardized Reeflow custom event

Events are prefixed with reeflow- and configured to bubble through shadow DOM.

Type Parameter
T extends ReeflowEventType
ParameterTypeDescription
typeTEvent type (becomes reeflow-${type})
data?unknownEvent detail payload

void

this.emitEvent('data-loaded', { rows: 100 });
// Dispatches event: 'reeflow-data-loaded' with detail: { rows: 100 }

ReeflowBaseComponent.emitEvent

protected findProvider():
| ReeflowProvider
| null;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:140

Find ReeflowProvider in the component tree with caching

| ReeflowProvider | null

ReeflowBaseComponent.findProvider

protected getProviderOrThrow(): ReeflowProvider;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:174

Get ReeflowProvider or throw an error if not found

ReeflowProvider

Error if ReeflowProvider is not found in the component tree

ReeflowBaseComponent.getProviderOrThrow

protected log(
level,
message,
data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:24

Log a message with Reeflow prefix

ParameterTypeDescription
levelLogLevelLog level (log, error, warn, info, debug)
messagestringMessage to log
data?unknownOptional additional data to include in log

void

ReeflowBaseComponent.log

render(): TemplateResult;

Defined in: apps/sdks/core/src/components/container/ReeflowContainer.ts:40

Render the container structure with frame, optional label, and slotted content

TemplateResult

Template result with container structure

ReeflowBaseComponent.render
connectedCallback(): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:59

Invoked when the component is added to the document’s DOM.

In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}

Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

void

ReeflowBaseComponent.connectedCallback

disconnectedCallback(): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:87

Invoked when the component is removed from the document’s DOM.

This callback is the main signal to the element that it may no longer be used. disconnectedCallback() should ensure that nothing is holding a reference to the element (such as event listeners added to nodes external to the element), so that it is free to be garbage collected.

disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}

An element may be re-connected after being disconnected.

void

ReeflowBaseComponent.disconnectedCallback

static styles: CSSResult = defaultStyles;

Defined in: apps/sdks/core/src/components/container/ReeflowContainer.ts:28

Array of styles to apply to the element. The styles should be defined using the css tag function, via constructible stylesheets, or imported from native CSS module scripts.

Note on Content Security Policy:

Element styles are implemented with <style> tags when the browser doesn’t support adopted StyleSheets. To use such <style> tags with the style-src CSP directive, the style-src value must either include ‘unsafe-inline’ or nonce-<base64-value> with <base64-value> replaced be a server-generated nonce.

To provide a nonce to use on generated <style> elements, set window.litNonce to a server-generated nonce in your page’s HTML, before loading application code:

<script>
// Generated and unique per request:
window.litNonce = 'a1b2c3d4';
</script>
ReeflowBaseComponent.styles

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:39

Abstract data-driven component class

Extends ReeflowBaseComponent with:

  • JSONQL query execution
  • Data fetching and caching
  • Loading, error, and empty states
  • Support for inline query definitions via script tags

This is an abstract class. Use concrete implementations like ReeflowTable or chart components.

reeflow-data-loaded - Fired when data is successfully loaded. Detail: QueryResult

reeflow-error - Fired when an error occurs. Detail: { code: string, message: string }

<!-- Using inline query -->
<reeflow-table label="Sales Data">
<script type="application/json" slot="query">
{"select": [...], "from": "sales"}
</script>
</reeflow-table>
<!-- Using query attribute -->
<reeflow-table
label="Sales Data"
query='{"select": [...], "from": "sales"}'>
</reeflow-table>
new ReeflowElement(): ReeflowElement;

Defined in: node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts:527

ReeflowElement

ReeflowBaseComponent.constructor

optional componentId: string;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:47

Component ID from the workbook configuration Used to uniquely identify this component instance

protected errorCode: string | null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:117

errorMessage: string | null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:120

label: string;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:67

Optional label displayed above the component

query:
| {
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
parameters?: Record<string, string | number | boolean>;
sql: string;
type: SQL;
}
| {
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
dimensions?: (
| {
column: string;
label?: string;
type: "categorical";
}
| {
column: string;
date_range?: [string, string];
granularity: "day" | "week" | "month" | "quarter" | "year";
label?: string;
type: "time";
})[];
filters?: (
| {
column: string;
operator: "gt" | "gte" | "lt" | "lte";
values: string[];
}
| {
column: string;
operator: "last_n_days" | "last_n_months" | "last_n_years" | "last_n_quarters";
values: string[];
}
| {
column: string;
operator: "in" | "equals";
values: string[];
}
| {
column: string;
operator: "starts_with" | "contains" | "ends_with";
values: string[];
}
| {
column: string;
operator: "between";
values: string[];
}
| {
column: string;
operator: "is_null";
values: string[];
}
| {
column: string;
operator: "today" | "this_month" | "this_year" | "this_quarter";
values: string[];
})[];
joins?: {
from: string;
from_column: string;
to: string;
to_column: string;
type: "inner" | "left" | "right" | "full";
}[];
limit?: string | number;
measures: {
color?: string;
column?: string;
label?: string;
type: "avg" | "count" | "count_distinct" | "max" | "min" | "sum";
}[];
offset?: string | number;
order_by?: {
column: string;
direction: "asc" | "desc";
}[];
parameters?: Record<string, string | number | boolean>;
type: AGGREGATE;
}
| {
columns?: (
| {
label?: string;
name: string;
}
| {
label?: string;
raw: string;
})[];
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
distinct?: boolean;
filters?: (
| {
column: string;
operator: "gt" | "gte" | "lt" | "lte";
values: string[];
}
| {
column: string;
operator: "last_n_days" | "last_n_months" | "last_n_years" | "last_n_quarters";
values: string[];
}
| {
column: string;
operator: "in" | "equals";
values: string[];
}
| {
column: string;
operator: "starts_with" | "contains" | "ends_with";
values: string[];
}
| {
column: string;
operator: "between";
values: string[];
}
| {
column: string;
operator: "is_null";
values: string[];
}
| {
column: string;
operator: "today" | "this_month" | "this_year" | "this_quarter";
values: string[];
})[];
joins?: {
from: string;
from_column: string;
to: string;
to_column: string;
type: "inner" | "left" | "right" | "full";
}[];
limit?: string | number;
offset?: string | number;
order_by?: {
column: string;
direction: "asc" | "desc";
}[];
parameters?: Record<string, string | number | boolean>;
type: TABLE;
}
| null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:61

JSONQL query to execute Can be set via attribute or inline script tag with slot=“query”

theme: "default" | "ocean" = DEFAULT_THEME;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:39

ReeflowBaseComponent.theme

themeMode: ThemeMode = DEFAULT_THEME_MODE;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:42

ReeflowBaseComponent.themeMode

optional themeStyle: string;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:45

ReeflowBaseComponent.themeStyle

get data(): QueryResult | null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:82

QueryResult | null

set data(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:86

ParameterType
value| QueryResult | { columns: unknown[]; rows: unknown[][]; } | null

void

get state(): ReeflowComponentState;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:22

ReeflowComponentState

set state(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:26

ParameterType
valueReeflowComponentState

void

ReeflowWorkbook.state

protected emitEvent<T>(type, data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:42

Emit a standardized Reeflow custom event

Events are prefixed with reeflow- and configured to bubble through shadow DOM.

Type Parameter
T extends ReeflowEventType
ParameterTypeDescription
typeTEvent type (becomes reeflow-${type})
data?unknownEvent detail payload

void

this.emitEvent('data-loaded', { rows: 100 });
// Dispatches event: 'reeflow-data-loaded' with detail: { rows: 100 }

ReeflowBaseComponent.emitEvent

protected executeQuery(): Promise<QueryResult | null>;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:178

Execute the current query and update component state

Promise<QueryResult | null>

protected findProvider():
| ReeflowProvider
| null;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:140

Find ReeflowProvider in the component tree with caching

| ReeflowProvider | null

ReeflowBaseComponent.findProvider

protected getProviderOrThrow(): ReeflowProvider;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:174

Get ReeflowProvider or throw an error if not found

ReeflowProvider

Error if ReeflowProvider is not found in the component tree

ReeflowBaseComponent.getProviderOrThrow

protected log(
level,
message,
data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:24

Log a message with Reeflow prefix

ParameterTypeDescription
levelLogLevelLog level (log, error, warn, info, debug)
messagestringMessage to log
data?unknownOptional additional data to include in log

void

ReeflowBaseComponent.log

refresh(): Promise<void>;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:238

Refresh data by re-executing the current query

Promise<void>

Promise that resolves when refresh is complete

reset(includeQuery): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:246

Reset to initial state

ParameterTypeDefault valueDescription
includeQuerybooleanfalseWhether to also reset the query to null (default: false)

void

connectedCallback(): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:122

Invoked when the component is added to the document’s DOM.

In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}

Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

void

ReeflowBaseComponent.connectedCallback

disconnectedCallback(): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:143

Invoked when the component is removed from the document’s DOM.

This callback is the main signal to the element that it may no longer be used. disconnectedCallback() should ensure that nothing is holding a reference to the element (such as event listeners added to nodes external to the element), so that it is free to be garbage collected.

disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}

An element may be re-connected after being disconnected.

void

ReeflowBaseComponent.disconnectedCallback

static styles: CSSResult = defaultStyles;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:40

Array of styles to apply to the element. The styles should be defined using the css tag function, via constructible stylesheets, or imported from native CSS module scripts.

Note on Content Security Policy:

Element styles are implemented with <style> tags when the browser doesn’t support adopted StyleSheets. To use such <style> tags with the style-src CSP directive, the style-src value must either include ‘unsafe-inline’ or nonce-<base64-value> with <base64-value> replaced be a server-generated nonce.

To provide a nonce to use on generated <style> elements, set window.litNonce to a server-generated nonce in your page’s HTML, before loading application code:

<script>
// Generated and unique per request:
window.litNonce = 'a1b2c3d4';
</script>
ReeflowBaseComponent.styles
updated(changedProperties): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:167

Invoked whenever the element is updated. Implement to perform post-updating tasks via DOM APIs, for example, focusing an element.

Setting properties inside this method will trigger the element to update again after this update cycle completes.

ParameterType
changedPropertiesMap<string, unknown>

void

ReeflowBaseComponent.updated

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:17

Base class for all Reeflow components with event emission capabilities

Provides:

  • Standardized event emission with consistent naming (reeflow-* prefix)
  • Centralized logging utility
  • Type-safe event handling

All Reeflow components extend this class transitively through ReeflowBaseComponent. Events are bubbled and composed to work across shadow DOM boundaries.

  • LitElement
new ReeflowEventEmitter(): ReeflowEventEmitter;

Defined in: node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts:527

ReeflowEventEmitter

LitElement.constructor
protected emitEvent<T>(type, data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:42

Emit a standardized Reeflow custom event

Events are prefixed with reeflow- and configured to bubble through shadow DOM.

Type Parameter
T extends ReeflowEventType
ParameterTypeDescription
typeTEvent type (becomes reeflow-${type})
data?unknownEvent detail payload

void

this.emitEvent('data-loaded', { rows: 100 });
// Dispatches event: 'reeflow-data-loaded' with detail: { rows: 100 }
protected log(
level,
message,
data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:24

Log a message with Reeflow prefix

ParameterTypeDescription
levelLogLevelLog level (log, error, warn, info, debug)
messagestringMessage to log
data?unknownOptional additional data to include in log

void


Defined in: apps/sdks/core/src/components/charts/line/ReeflowLineChart.ts:21

Line chart component for visualizing data trends over time or categories

Automatically determines dimension (x-axis) and measure (y-axis) columns from query results. Supports multiple measures displayed as separate lines with smooth curves.

<reeflow-line-chart
connection-id="my-connection"
query='{"select": [{"dimension": "date"}, {"measure": "revenue"}], "from": "sales"}'>
</reeflow-line-chart>
new ReeflowLineChart(): ReeflowLineChart;

Defined in: node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts:527

ReeflowLineChart

ReeflowChart.constructor

protected chartInstance: EChartsType | null = null;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:54

ReeflowChart.chartInstance

protected chartOptions: EChartsOption = {};

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:57

ReeflowChart.chartOptions

protected chartType: "line";

Defined in: apps/sdks/core/src/components/charts/line/ReeflowLineChart.ts:22

Chart type identifier for template rendering (icons, labels) Override in subclasses to specify the chart type

ReeflowChart.chartType

optional componentId: string;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:47

Component ID from the workbook configuration Used to uniquely identify this component instance

ReeflowChart.componentId

protected errorCode: string | null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:117

ReeflowChart.errorCode

errorMessage: string | null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:120

ReeflowChart.errorMessage

optional height: number;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:51

Chart height in pixels (optional, defaults to container height)

ReeflowChart.height

label: string;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:67

Optional label displayed above the component

ReeflowChart.label

query:
| {
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
parameters?: Record<string, string | number | boolean>;
sql: string;
type: SQL;
}
| {
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
dimensions?: (
| {
column: string;
label?: string;
type: "categorical";
}
| {
column: string;
date_range?: [string, string];
granularity: "day" | "week" | "month" | "quarter" | "year";
label?: string;
type: "time";
})[];
filters?: (
| {
column: string;
operator: "gt" | "gte" | "lt" | "lte";
values: string[];
}
| {
column: string;
operator: "last_n_days" | "last_n_months" | "last_n_years" | "last_n_quarters";
values: string[];
}
| {
column: string;
operator: "in" | "equals";
values: string[];
}
| {
column: string;
operator: "starts_with" | "contains" | "ends_with";
values: string[];
}
| {
column: string;
operator: "between";
values: string[];
}
| {
column: string;
operator: "is_null";
values: string[];
}
| {
column: string;
operator: "today" | "this_month" | "this_year" | "this_quarter";
values: string[];
})[];
joins?: {
from: string;
from_column: string;
to: string;
to_column: string;
type: "inner" | "left" | "right" | "full";
}[];
limit?: string | number;
measures: {
color?: string;
column?: string;
label?: string;
type: "avg" | "count" | "count_distinct" | "max" | "min" | "sum";
}[];
offset?: string | number;
order_by?: {
column: string;
direction: "asc" | "desc";
}[];
parameters?: Record<string, string | number | boolean>;
type: AGGREGATE;
}
| {
columns?: (
| {
label?: string;
name: string;
}
| {
label?: string;
raw: string;
})[];
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
distinct?: boolean;
filters?: (
| {
column: string;
operator: "gt" | "gte" | "lt" | "lte";
values: string[];
}
| {
column: string;
operator: "last_n_days" | "last_n_months" | "last_n_years" | "last_n_quarters";
values: string[];
}
| {
column: string;
operator: "in" | "equals";
values: string[];
}
| {
column: string;
operator: "starts_with" | "contains" | "ends_with";
values: string[];
}
| {
column: string;
operator: "between";
values: string[];
}
| {
column: string;
operator: "is_null";
values: string[];
}
| {
column: string;
operator: "today" | "this_month" | "this_year" | "this_quarter";
values: string[];
})[];
joins?: {
from: string;
from_column: string;
to: string;
to_column: string;
type: "inner" | "left" | "right" | "full";
}[];
limit?: string | number;
offset?: string | number;
order_by?: {
column: string;
direction: "asc" | "desc";
}[];
parameters?: Record<string, string | number | boolean>;
type: TABLE;
}
| null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:61

JSONQL query to execute Can be set via attribute or inline script tag with slot=“query”

ReeflowChart.query

theme: "default" | "ocean" = DEFAULT_THEME;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:39

ReeflowChart.theme

themeMode: ThemeMode = DEFAULT_THEME_MODE;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:42

ReeflowChart.themeMode

optional themeStyle: string;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:45

ReeflowChart.themeStyle

optional width: number;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:45

Chart width in pixels (optional, defaults to container width)

ReeflowChart.width

get data(): QueryResult | null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:82

QueryResult | null

set data(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:86

ParameterType
value| QueryResult | { columns: unknown[]; rows: unknown[][]; } | null

void

ReeflowChart.data

get state(): ReeflowComponentState;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:22

ReeflowComponentState

set state(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:26

ParameterType
valueReeflowComponentState

void

ReeflowChart.state

protected emitEvent<T>(type, data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:42

Emit a standardized Reeflow custom event

Events are prefixed with reeflow- and configured to bubble through shadow DOM.

Type Parameter
T extends ReeflowEventType
ParameterTypeDescription
typeTEvent type (becomes reeflow-${type})
data?unknownEvent detail payload

void

this.emitEvent('data-loaded', { rows: 100 });
// Dispatches event: 'reeflow-data-loaded' with detail: { rows: 100 }

ReeflowChart.emitEvent

protected executeQuery(): Promise<QueryResult | null>;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:178

Execute the current query and update component state

Promise<QueryResult | null>

ReeflowChart.executeQuery

protected findProvider():
| ReeflowProvider
| null;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:140

Find ReeflowProvider in the component tree with caching

| ReeflowProvider | null

ReeflowChart.findProvider

protected generateChartOptions(): EChartsOption;

Defined in: apps/sdks/core/src/components/charts/line/ReeflowLineChart.ts:28

Generate ECharts configuration for line chart

EChartsOption

ECharts option object with line chart configuration

ReeflowChart.generateChartOptions

protected getChartAxisThemeOptions(options?): EChartsOption;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:344

Get axis theme options for charts with axes (bar, line)

ParameterTypeDescription
options?Partial<AxisThemeOptions>Optional axis theme options to override defaults

EChartsOption

ECharts options with axis theme applied

ReeflowChart.getChartAxisThemeOptions

getChartInstance(): EChartsType | null;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:311

Get the underlying ECharts instance for advanced customization

EChartsType | null

ECharts instance or null if not yet initialized

ReeflowChart.getChartInstance

protected getChartThemeOptions(options?): EChartsOption;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:331

Get base theme options for charts

ParameterTypeDescription
options?Partial<BaseThemeOptions>Optional theme options to override defaults

EChartsOption

Base ECharts options with theme applied

ReeflowChart.getChartThemeOptions

protected getProviderOrThrow(): ReeflowProvider;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:174

Get ReeflowProvider or throw an error if not found

ReeflowProvider

Error if ReeflowProvider is not found in the component tree

ReeflowChart.getProviderOrThrow

protected log(
level,
message,
data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:24

Log a message with Reeflow prefix

ParameterTypeDescription
levelLogLevelLog level (log, error, warn, info, debug)
messagestringMessage to log
data?unknownOptional additional data to include in log

void

ReeflowChart.log

refresh(): Promise<void>;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:238

Refresh data by re-executing the current query

Promise<void>

Promise that resolves when refresh is complete

ReeflowChart.refresh

render(): TemplateResult;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:121

Render the chart component with state-based content

TemplateResult

Template result with chart canvas or state indicators

ReeflowChart.render

reset(includeQuery): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:246

Reset to initial state

ParameterTypeDefault valueDescription
includeQuerybooleanfalseWhether to also reset the query to null (default: false)

void

ReeflowChart.reset

updateChartOptions(options, notMerge): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:320

Update chart options programmatically after initial render

ParameterTypeDefault valueDescription
optionsEChartsOptionundefinedECharts options to apply
notMergebooleanfalseIf true, replaces existing options instead of merging

void

ReeflowChart.updateChartOptions

connectedCallback(): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:61

Invoked when the component is added to the document’s DOM.

In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}

Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

void

ReeflowChart.connectedCallback

disconnectedCallback(): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:66

Invoked when the component is removed from the document’s DOM.

This callback is the main signal to the element that it may no longer be used. disconnectedCallback() should ensure that nothing is holding a reference to the element (such as event listeners added to nodes external to the element), so that it is free to be garbage collected.

disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}

An element may be re-connected after being disconnected.

void

ReeflowChart.disconnectedCallback

static styles: CSSResult = defaultStyles;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:40

Array of styles to apply to the element. The styles should be defined using the css tag function, via constructible stylesheets, or imported from native CSS module scripts.

Note on Content Security Policy:

Element styles are implemented with <style> tags when the browser doesn’t support adopted StyleSheets. To use such <style> tags with the style-src CSP directive, the style-src value must either include ‘unsafe-inline’ or nonce-<base64-value> with <base64-value> replaced be a server-generated nonce.

To provide a nonce to use on generated <style> elements, set window.litNonce to a server-generated nonce in your page’s HTML, before loading application code:

<script>
// Generated and unique per request:
window.litNonce = 'a1b2c3d4';
</script>

ReeflowChart.styles

firstUpdated(): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:73

Invoked when the element is first updated. Implement to perform one time work on the element after update.

firstUpdated() {
this.renderRoot.getElementById('my-text-area').focus();
}

Setting properties inside this method will trigger the element to update again after this update cycle completes.

void

ReeflowChart.firstUpdated

updated(changedProperties): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:77

Invoked whenever the element is updated. Implement to perform post-updating tasks via DOM APIs, for example, focusing an element.

Setting properties inside this method will trigger the element to update again after this update cycle completes.

ParameterType
changedPropertiesMap<string, unknown>

void

ReeflowChart.updated


Defined in: apps/sdks/core/src/components/charts/pie/ReeflowPieChart.ts:25

Pie chart component for visualizing proportional data as circular segments

Requires at least two columns: a label column (for segment names) and a measure column (for values). Automatically detects column roles or uses the first two columns as label and value.

<reeflow-pie-chart
connection-id="my-connection"
query='{"select": [{"label": "product"}, {"measure": "market_share"}], "from": "products"}'>
</reeflow-pie-chart>
new ReeflowPieChart(): ReeflowPieChart;

Defined in: node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts:527

ReeflowPieChart

ReeflowChart.constructor

protected chartInstance: EChartsType | null = null;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:54

ReeflowChart.chartInstance

protected chartOptions: EChartsOption = {};

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:57

ReeflowChart.chartOptions

protected chartType: "pie";

Defined in: apps/sdks/core/src/components/charts/pie/ReeflowPieChart.ts:26

Chart type identifier for template rendering (icons, labels) Override in subclasses to specify the chart type

ReeflowChart.chartType

optional componentId: string;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:47

Component ID from the workbook configuration Used to uniquely identify this component instance

ReeflowChart.componentId

protected errorCode: string | null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:117

ReeflowChart.errorCode

errorMessage: string | null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:120

ReeflowChart.errorMessage

optional height: number;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:51

Chart height in pixels (optional, defaults to container height)

ReeflowChart.height

label: string;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:67

Optional label displayed above the component

ReeflowChart.label

query:
| {
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
parameters?: Record<string, string | number | boolean>;
sql: string;
type: SQL;
}
| {
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
dimensions?: (
| {
column: string;
label?: string;
type: "categorical";
}
| {
column: string;
date_range?: [string, string];
granularity: "day" | "week" | "month" | "quarter" | "year";
label?: string;
type: "time";
})[];
filters?: (
| {
column: string;
operator: "gt" | "gte" | "lt" | "lte";
values: string[];
}
| {
column: string;
operator: "last_n_days" | "last_n_months" | "last_n_years" | "last_n_quarters";
values: string[];
}
| {
column: string;
operator: "in" | "equals";
values: string[];
}
| {
column: string;
operator: "starts_with" | "contains" | "ends_with";
values: string[];
}
| {
column: string;
operator: "between";
values: string[];
}
| {
column: string;
operator: "is_null";
values: string[];
}
| {
column: string;
operator: "today" | "this_month" | "this_year" | "this_quarter";
values: string[];
})[];
joins?: {
from: string;
from_column: string;
to: string;
to_column: string;
type: "inner" | "left" | "right" | "full";
}[];
limit?: string | number;
measures: {
color?: string;
column?: string;
label?: string;
type: "avg" | "count" | "count_distinct" | "max" | "min" | "sum";
}[];
offset?: string | number;
order_by?: {
column: string;
direction: "asc" | "desc";
}[];
parameters?: Record<string, string | number | boolean>;
type: AGGREGATE;
}
| {
columns?: (
| {
label?: string;
name: string;
}
| {
label?: string;
raw: string;
})[];
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
distinct?: boolean;
filters?: (
| {
column: string;
operator: "gt" | "gte" | "lt" | "lte";
values: string[];
}
| {
column: string;
operator: "last_n_days" | "last_n_months" | "last_n_years" | "last_n_quarters";
values: string[];
}
| {
column: string;
operator: "in" | "equals";
values: string[];
}
| {
column: string;
operator: "starts_with" | "contains" | "ends_with";
values: string[];
}
| {
column: string;
operator: "between";
values: string[];
}
| {
column: string;
operator: "is_null";
values: string[];
}
| {
column: string;
operator: "today" | "this_month" | "this_year" | "this_quarter";
values: string[];
})[];
joins?: {
from: string;
from_column: string;
to: string;
to_column: string;
type: "inner" | "left" | "right" | "full";
}[];
limit?: string | number;
offset?: string | number;
order_by?: {
column: string;
direction: "asc" | "desc";
}[];
parameters?: Record<string, string | number | boolean>;
type: TABLE;
}
| null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:61

JSONQL query to execute Can be set via attribute or inline script tag with slot=“query”

ReeflowChart.query

theme: "default" | "ocean" = DEFAULT_THEME;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:39

ReeflowChart.theme

themeMode: ThemeMode = DEFAULT_THEME_MODE;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:42

ReeflowChart.themeMode

optional themeStyle: string;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:45

ReeflowChart.themeStyle

optional width: number;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:45

Chart width in pixels (optional, defaults to container width)

ReeflowChart.width

get data(): QueryResult | null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:82

QueryResult | null

set data(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:86

ParameterType
value| QueryResult | { columns: unknown[]; rows: unknown[][]; } | null

void

ReeflowChart.data

get state(): ReeflowComponentState;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:22

ReeflowComponentState

set state(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:26

ParameterType
valueReeflowComponentState

void

ReeflowChart.state

protected emitEvent<T>(type, data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:42

Emit a standardized Reeflow custom event

Events are prefixed with reeflow- and configured to bubble through shadow DOM.

Type Parameter
T extends ReeflowEventType
ParameterTypeDescription
typeTEvent type (becomes reeflow-${type})
data?unknownEvent detail payload

void

this.emitEvent('data-loaded', { rows: 100 });
// Dispatches event: 'reeflow-data-loaded' with detail: { rows: 100 }

ReeflowChart.emitEvent

protected executeQuery(): Promise<QueryResult | null>;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:178

Execute the current query and update component state

Promise<QueryResult | null>

ReeflowChart.executeQuery

protected findProvider():
| ReeflowProvider
| null;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:140

Find ReeflowProvider in the component tree with caching

| ReeflowProvider | null

ReeflowChart.findProvider

protected generateChartOptions(): EChartsOption;

Defined in: apps/sdks/core/src/components/charts/pie/ReeflowPieChart.ts:32

Generate ECharts configuration for pie chart

EChartsOption

ECharts option object with pie chart configuration

ReeflowChart.generateChartOptions

protected getChartAxisThemeOptions(options?): EChartsOption;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:344

Get axis theme options for charts with axes (bar, line)

ParameterTypeDescription
options?Partial<AxisThemeOptions>Optional axis theme options to override defaults

EChartsOption

ECharts options with axis theme applied

ReeflowChart.getChartAxisThemeOptions

getChartInstance(): EChartsType | null;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:311

Get the underlying ECharts instance for advanced customization

EChartsType | null

ECharts instance or null if not yet initialized

ReeflowChart.getChartInstance

protected getChartThemeOptions(options?): EChartsOption;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:331

Get base theme options for charts

ParameterTypeDescription
options?Partial<BaseThemeOptions>Optional theme options to override defaults

EChartsOption

Base ECharts options with theme applied

ReeflowChart.getChartThemeOptions

protected getProviderOrThrow(): ReeflowProvider;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:174

Get ReeflowProvider or throw an error if not found

ReeflowProvider

Error if ReeflowProvider is not found in the component tree

ReeflowChart.getProviderOrThrow

protected log(
level,
message,
data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:24

Log a message with Reeflow prefix

ParameterTypeDescription
levelLogLevelLog level (log, error, warn, info, debug)
messagestringMessage to log
data?unknownOptional additional data to include in log

void

ReeflowChart.log

refresh(): Promise<void>;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:238

Refresh data by re-executing the current query

Promise<void>

Promise that resolves when refresh is complete

ReeflowChart.refresh

render(): TemplateResult;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:121

Render the chart component with state-based content

TemplateResult

Template result with chart canvas or state indicators

ReeflowChart.render

reset(includeQuery): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:246

Reset to initial state

ParameterTypeDefault valueDescription
includeQuerybooleanfalseWhether to also reset the query to null (default: false)

void

ReeflowChart.reset

updateChartOptions(options, notMerge): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:320

Update chart options programmatically after initial render

ParameterTypeDefault valueDescription
optionsEChartsOptionundefinedECharts options to apply
notMergebooleanfalseIf true, replaces existing options instead of merging

void

ReeflowChart.updateChartOptions

connectedCallback(): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:61

Invoked when the component is added to the document’s DOM.

In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}

Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

void

ReeflowChart.connectedCallback

disconnectedCallback(): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:66

Invoked when the component is removed from the document’s DOM.

This callback is the main signal to the element that it may no longer be used. disconnectedCallback() should ensure that nothing is holding a reference to the element (such as event listeners added to nodes external to the element), so that it is free to be garbage collected.

disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}

An element may be re-connected after being disconnected.

void

ReeflowChart.disconnectedCallback

static styles: CSSResult = defaultStyles;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:40

Array of styles to apply to the element. The styles should be defined using the css tag function, via constructible stylesheets, or imported from native CSS module scripts.

Note on Content Security Policy:

Element styles are implemented with <style> tags when the browser doesn’t support adopted StyleSheets. To use such <style> tags with the style-src CSP directive, the style-src value must either include ‘unsafe-inline’ or nonce-<base64-value> with <base64-value> replaced be a server-generated nonce.

To provide a nonce to use on generated <style> elements, set window.litNonce to a server-generated nonce in your page’s HTML, before loading application code:

<script>
// Generated and unique per request:
window.litNonce = 'a1b2c3d4';
</script>

ReeflowChart.styles

firstUpdated(): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:73

Invoked when the element is first updated. Implement to perform one time work on the element after update.

firstUpdated() {
this.renderRoot.getElementById('my-text-area').focus();
}

Setting properties inside this method will trigger the element to update again after this update cycle completes.

void

ReeflowChart.firstUpdated

updated(changedProperties): void;

Defined in: apps/sdks/core/src/components/charts/ReeflowChart.ts:77

Invoked whenever the element is updated. Implement to perform post-updating tasks via DOM APIs, for example, focusing an element.

Setting properties inside this method will trigger the element to update again after this update cycle completes.

ParameterType
changedPropertiesMap<string, unknown>

void

ReeflowChart.updated


Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:22

Provider component that manages authentication context for child Reeflow components Acts as a context provider in the component tree

reeflow-auth-change - Fired when authentication context changes. Detail: { authToken: string }

reeflow-theme-change - Fired when theme or theme mode changes. Detail: { theme: string, themeMode: 'light' | 'dark' }

new ReeflowProvider(): ReeflowProvider;

Defined in: node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts:527

ReeflowProvider

ReeflowEventEmitter.constructor

authHeader: string = 'X-Embed-Authorization';

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:66

The HTTP header name to use for authentication. Defaults to ‘X-Embed-Authorization’ for embedded user tokens. Use ‘Authorization’ for standard Bearer tokens (e.g., Clerk JWT).

authToken: string;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:58

baseUrl: any = DEFAULT_API_BASE_URL;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:69

debug: boolean = false;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:72

mock: boolean = false;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:75

theme: "default" | "ocean" = DEFAULT_THEME;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:78

themeMode: ThemeMode = DEFAULT_THEME_MODE;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:81

optional themeStyle: string;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:99

CSS variables for theme customization (passed as inline style string)

Note: This property is named themeStyle instead of style because React has special handling for the style prop (it expects an object and calls .setProperty() on it). Using style directly would conflict with React’s built-in style handling and cause errors.

When this property changes, we sync it to the actual HTML style attribute in the updated() lifecycle method so CSS variables are applied to the element.

<ReeflowProvider themeStyle="--color-primary: #ff0000; --color-secondary: #00ff00" />
get protected sdkId(): string | undefined;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:39

SDK identifier for API tracking (e.g., “core”, “react”).

This is intentionally accessed via data attributes (data-sdk-id) rather than Lit properties for the following reasons:

  1. Internal use only: SDK info is not meant to be set by end users. Data attributes don’t appear in component API documentation or IDE autocomplete.

  2. Per-provider isolation: When a page uses both React and Core SDKs simultaneously, each provider instance can have its own SDK identity. The React SDK wrapper sets data-sdk-id="react" on its provider, while direct Core usage defaults to “core”.

  3. Build-time injection: SDK wrappers (like React) can inject these values at build time without exposing them as configurable props to consumers.

string | undefined

get protected sdkVersion(): string | undefined;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:48

SDK version for API tracking (semver format: x.y.z).

See sdkId getter for documentation on why this uses data attributes.

string | undefined

protected emitEvent<T>(type, data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:42

Emit a standardized Reeflow custom event

Events are prefixed with reeflow- and configured to bubble through shadow DOM.

Type Parameter
T extends ReeflowEventType
ParameterTypeDescription
typeTEvent type (becomes reeflow-${type})
data?unknownEvent detail payload

void

this.emitEvent('data-loaded', { rows: 100 });
// Dispatches event: 'reeflow-data-loaded' with detail: { rows: 100 }

ReeflowEventEmitter.emitEvent

getApiClient(): ApiClient;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:201

Get the ApiClient instance for this provider

ApiClient

getAuthContext(): {
authToken: string;
};

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:226

Get authentication context

{
authToken: string;
}
NameTypeDefined in
authTokenstringapps/sdks/core/src/components/provider/ReeflowProvider.ts:226
protected log(
level,
message,
data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:24

Log a message with Reeflow prefix

ParameterTypeDescription
levelLogLevelLog level (log, error, warn, info, debug)
messagestringMessage to log
data?unknownOptional additional data to include in log

void

ReeflowEventEmitter.log

updateAuth(authToken, authHeader?): void;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:235

Update authentication context

ParameterType
authTokenstring
authHeader?string

void

connectedCallback(): void;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:178

Invoked when the component is added to the document’s DOM.

In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}

Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

void

ReeflowEventEmitter.connectedCallback
render(): TemplateResult<1>;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:253

Invoked on each update to perform rendering tasks. This method may return any value renderable by lit-html’s ChildPart - typically a TemplateResult. Setting properties inside this method will not trigger the element to update.

TemplateResult<1>

ReeflowEventEmitter.render
static styles: CSSResult;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:51

Array of styles to apply to the element. The styles should be defined using the css tag function, via constructible stylesheets, or imported from native CSS module scripts.

Note on Content Security Policy:

Element styles are implemented with <style> tags when the browser doesn’t support adopted StyleSheets. To use such <style> tags with the style-src CSP directive, the style-src value must either include ‘unsafe-inline’ or nonce-<base64-value> with <base64-value> replaced be a server-generated nonce.

To provide a nonce to use on generated <style> elements, set window.litNonce to a server-generated nonce in your page’s HTML, before loading application code:

<script>
// Generated and unique per request:
window.litNonce = 'a1b2c3d4';
</script>
ReeflowEventEmitter.styles
firstUpdated(): void;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:103

Invoked when the element is first updated. Implement to perform one time work on the element after update.

firstUpdated() {
this.renderRoot.getElementById('my-text-area').focus();
}

Setting properties inside this method will trigger the element to update again after this update cycle completes.

void

ReeflowEventEmitter.firstUpdated
updated(changedProperties): void;

Defined in: apps/sdks/core/src/components/provider/ReeflowProvider.ts:108

Invoked whenever the element is updated. Implement to perform post-updating tasks via DOM APIs, for example, focusing an element.

Setting properties inside this method will trigger the element to update again after this update cycle completes.

ParameterType
changedPropertiesMap<string, unknown>

void

ReeflowEventEmitter.updated

Defined in: apps/sdks/core/src/components/table/ReeflowTable.ts:60

Table component for displaying tabular data from Reeflow queries

Native implementation with the following features:

  • Sorting: Click column headers to sort data (ascending/descending)
  • Pagination: Navigate through large datasets with page controls
  • Search: Filter rows across all columns with live search
  • Responsive: Adapts to different screen sizes
  • Themeable: Supports multiple color themes
<reeflow-table
connection-id="my-connection"
query='{"select": ["id", "name", "email"], "from": "users"}'>
</reeflow-table>
<reeflow-table
label="User Directory"
connection-id="my-connection"
query='{"select": ["id", "name", "email"], "from": "users"}'
page-size="50"
search
search-placeholder="Search users..."
sort>
</reeflow-table>
<reeflow-table
connection-id="my-connection"
query='{"select": [...], "from": "table"}'
.pagination=${false}>
</reeflow-table>

reeflow-table-row-click - Fired when a table row is clicked. Detail: { row: unknown[] }

reeflow-table-sort-change - Fired when a column is sorted. Detail: { column: string, direction: 'asc' | 'desc' }

reeflow-table-page-change - Fired when the page changes. Detail: { page: number }

reeflow-table-search-change - Fired when search term changes. Detail: { searchTerm: string }

new ReeflowTable(): ReeflowTable;

Defined in: node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts:527

ReeflowTable

ReeflowElement.constructor

optional componentId: string;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:47

Component ID from the workbook configuration Used to uniquely identify this component instance

ReeflowElement.componentId

protected errorCode: string | null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:117

ReeflowElement.errorCode

errorMessage: string | null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:120

ReeflowElement.errorMessage

label: string;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:67

Optional label displayed above the component

ReeflowElement.label

pageSize: number = 20;

Defined in: apps/sdks/core/src/components/table/ReeflowTable.ts:71

Number of rows to display per page

20
pagination: boolean = false;

Defined in: apps/sdks/core/src/components/table/ReeflowTable.ts:92

Enable pagination

false
query:
| {
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
parameters?: Record<string, string | number | boolean>;
sql: string;
type: SQL;
}
| {
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
dimensions?: (
| {
column: string;
label?: string;
type: "categorical";
}
| {
column: string;
date_range?: [string, string];
granularity: "day" | "week" | "month" | "quarter" | "year";
label?: string;
type: "time";
})[];
filters?: (
| {
column: string;
operator: "gt" | "gte" | "lt" | "lte";
values: string[];
}
| {
column: string;
operator: "last_n_days" | "last_n_months" | "last_n_years" | "last_n_quarters";
values: string[];
}
| {
column: string;
operator: "in" | "equals";
values: string[];
}
| {
column: string;
operator: "starts_with" | "contains" | "ends_with";
values: string[];
}
| {
column: string;
operator: "between";
values: string[];
}
| {
column: string;
operator: "is_null";
values: string[];
}
| {
column: string;
operator: "today" | "this_month" | "this_year" | "this_quarter";
values: string[];
})[];
joins?: {
from: string;
from_column: string;
to: string;
to_column: string;
type: "inner" | "left" | "right" | "full";
}[];
limit?: string | number;
measures: {
color?: string;
column?: string;
label?: string;
type: "avg" | "count" | "count_distinct" | "max" | "min" | "sum";
}[];
offset?: string | number;
order_by?: {
column: string;
direction: "asc" | "desc";
}[];
parameters?: Record<string, string | number | boolean>;
type: AGGREGATE;
}
| {
columns?: (
| {
label?: string;
name: string;
}
| {
label?: string;
raw: string;
})[];
connection?: {
config: | {
database: string;
host: string;
password: string;
port: number;
ssl: boolean;
user: string;
}
| {
base_url: | "https://api.tinybird.co"
| "https://api.europe-west2.gcp.tinybird.co"
| "https://api.us-east.tinybird.co"
| "https://api.northamerica-northeast2.gcp.tinybird.co"
| "https://api.eu-central-1.aws.tinybird.co"
| "https://api.eu-west-1.aws.tinybird.co"
| "https://api.us-east.aws.tinybird.co"
| "https://api.us-west-2.aws.tinybird.co";
token: string;
};
type: "pg" | "tb";
};
connection_id?: string;
distinct?: boolean;
filters?: (
| {
column: string;
operator: "gt" | "gte" | "lt" | "lte";
values: string[];
}
| {
column: string;
operator: "last_n_days" | "last_n_months" | "last_n_years" | "last_n_quarters";
values: string[];
}
| {
column: string;
operator: "in" | "equals";
values: string[];
}
| {
column: string;
operator: "starts_with" | "contains" | "ends_with";
values: string[];
}
| {
column: string;
operator: "between";
values: string[];
}
| {
column: string;
operator: "is_null";
values: string[];
}
| {
column: string;
operator: "today" | "this_month" | "this_year" | "this_quarter";
values: string[];
})[];
joins?: {
from: string;
from_column: string;
to: string;
to_column: string;
type: "inner" | "left" | "right" | "full";
}[];
limit?: string | number;
offset?: string | number;
order_by?: {
column: string;
direction: "asc" | "desc";
}[];
parameters?: Record<string, string | number | boolean>;
type: TABLE;
}
| null = null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:61

JSONQL query to execute Can be set via attribute or inline script tag with slot=“query”

ReeflowElement.query

search: boolean = false;

Defined in: apps/sdks/core/src/components/table/ReeflowTable.ts:85

Enable search functionality

false
searchPlaceholder: string = 'Search...';

Defined in: apps/sdks/core/src/components/table/ReeflowTable.ts:99

Placeholder text for search input

"Search..."
sort: boolean = false;

Defined in: apps/sdks/core/src/components/table/ReeflowTable.ts:78

Enable sorting on columns

false
theme: "default" | "ocean" = DEFAULT_THEME;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:39

ReeflowElement.theme

themeMode: ThemeMode = DEFAULT_THEME_MODE;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:42

ReeflowElement.themeMode

optional themeStyle: string;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:45

ReeflowElement.themeStyle

get data(): QueryResult | null;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:82

QueryResult | null

set data(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:86

ParameterType
value| QueryResult | { columns: unknown[]; rows: unknown[][]; } | null

void

ReeflowElement.data

get state(): ReeflowComponentState;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:22

ReeflowComponentState

set state(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:26

ParameterType
valueReeflowComponentState

void

ReeflowElement.state

protected emitEvent<T>(type, data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:42

Emit a standardized Reeflow custom event

Events are prefixed with reeflow- and configured to bubble through shadow DOM.

Type Parameter
T extends ReeflowEventType
ParameterTypeDescription
typeTEvent type (becomes reeflow-${type})
data?unknownEvent detail payload

void

this.emitEvent('data-loaded', { rows: 100 });
// Dispatches event: 'reeflow-data-loaded' with detail: { rows: 100 }

ReeflowElement.emitEvent

protected executeQuery(): Promise<QueryResult | null>;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:178

Execute the current query and update component state

Promise<QueryResult | null>

ReeflowElement.executeQuery

protected findProvider():
| ReeflowProvider
| null;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:140

Find ReeflowProvider in the component tree with caching

| ReeflowProvider | null

ReeflowElement.findProvider

protected getProviderOrThrow(): ReeflowProvider;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:174

Get ReeflowProvider or throw an error if not found

ReeflowProvider

Error if ReeflowProvider is not found in the component tree

ReeflowElement.getProviderOrThrow

protected log(
level,
message,
data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:24

Log a message with Reeflow prefix

ParameterTypeDescription
levelLogLevelLog level (log, error, warn, info, debug)
messagestringMessage to log
data?unknownOptional additional data to include in log

void

ReeflowElement.log

refresh(): Promise<void>;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:238

Refresh data by re-executing the current query

Promise<void>

Promise that resolves when refresh is complete

ReeflowElement.refresh

render(): TemplateResult;

Defined in: apps/sdks/core/src/components/table/ReeflowTable.ts:242

Render the table component

TemplateResult

Template result with table structure

ReeflowElement.render
reset(includeQuery): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:246

Reset to initial state

ParameterTypeDefault valueDescription
includeQuerybooleanfalseWhether to also reset the query to null (default: false)

void

ReeflowElement.reset

connectedCallback(): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:122

Invoked when the component is added to the document’s DOM.

In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}

Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

void

ReeflowElement.connectedCallback

disconnectedCallback(): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:143

Invoked when the component is removed from the document’s DOM.

This callback is the main signal to the element that it may no longer be used. disconnectedCallback() should ensure that nothing is holding a reference to the element (such as event listeners added to nodes external to the element), so that it is free to be garbage collected.

disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}

An element may be re-connected after being disconnected.

void

ReeflowElement.disconnectedCallback

static styles: CSSResult;

Defined in: apps/sdks/core/src/components/table/ReeflowTable.ts:61

Array of styles to apply to the element. The styles should be defined using the css tag function, via constructible stylesheets, or imported from native CSS module scripts.

Note on Content Security Policy:

Element styles are implemented with <style> tags when the browser doesn’t support adopted StyleSheets. To use such <style> tags with the style-src CSP directive, the style-src value must either include ‘unsafe-inline’ or nonce-<base64-value> with <base64-value> replaced be a server-generated nonce.

To provide a nonce to use on generated <style> elements, set window.litNonce to a server-generated nonce in your page’s HTML, before loading application code:

<script>
// Generated and unique per request:
window.litNonce = 'a1b2c3d4';
</script>

ReeflowElement.styles

updated(changedProperties): void;

Defined in: apps/sdks/core/src/components/base/ReeflowElement.ts:167

Invoked whenever the element is updated. Implement to perform post-updating tasks via DOM APIs, for example, focusing an element.

Setting properties inside this method will trigger the element to update again after this update cycle completes.

ParameterType
changedPropertiesMap<string, unknown>

void

ReeflowElement.updated


Defined in: apps/sdks/core/src/components/workbook/ReeflowWorkbook.ts:35

Workbook component for displaying complete embedded workbooks

Loads a workbook by ID and displays all its pages with their components. Supports theming, multiple pages, and various component types.

<reeflow-workbook workbook-id="workbook_abc123"></reeflow-workbook>
<reeflow-workbook
workbook-id="workbook_abc123"
theme="ocean"
theme-mode="dark">
</reeflow-workbook>

reeflow-data-loaded - Fired when workbook data is successfully loaded. Detail: EmbeddedWorkbook

reeflow-workbook-page-change - Fired when the user switches to a different page. Detail: { page: number, previousPage: number }

reeflow-error - Fired when an error occurs. Detail: { code: string, message: string }

new ReeflowWorkbook(): ReeflowWorkbook;

Defined in: node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/development/reactive-element.d.ts:527

ReeflowWorkbook

ReeflowBaseComponent.constructor

theme: "default" | "ocean" = DEFAULT_THEME;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:39

ReeflowBaseComponent.theme

themeMode: ThemeMode = DEFAULT_THEME_MODE;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:42

ReeflowBaseComponent.themeMode

optional themeStyle: string;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:45

ReeflowBaseComponent.themeStyle

workbookId: string;

Defined in: apps/sdks/core/src/components/workbook/ReeflowWorkbook.ts:45

ID of the workbook to load

get state(): ReeflowComponentState;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:22

ReeflowComponentState

set state(value): void;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:26

ParameterType
valueReeflowComponentState

void

ReeflowBaseComponent.state

protected emitEvent<T>(type, data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:42

Emit a standardized Reeflow custom event

Events are prefixed with reeflow- and configured to bubble through shadow DOM.

Type Parameter
T extends ReeflowEventType
ParameterTypeDescription
typeTEvent type (becomes reeflow-${type})
data?unknownEvent detail payload

void

this.emitEvent('data-loaded', { rows: 100 });
// Dispatches event: 'reeflow-data-loaded' with detail: { rows: 100 }

ReeflowBaseComponent.emitEvent

protected findProvider():
| ReeflowProvider
| null;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:140

Find ReeflowProvider in the component tree with caching

| ReeflowProvider | null

ReeflowBaseComponent.findProvider

protected getProviderOrThrow(): ReeflowProvider;

Defined in: apps/sdks/core/src/components/base/ReeflowBaseComponent.ts:174

Get ReeflowProvider or throw an error if not found

ReeflowProvider

Error if ReeflowProvider is not found in the component tree

ReeflowBaseComponent.getProviderOrThrow

protected log(
level,
message,
data?): void;

Defined in: apps/sdks/core/src/components/base/ReeflowEventEmitter.ts:24

Log a message with Reeflow prefix

ParameterTypeDescription
levelLogLevelLog level (log, error, warn, info, debug)
messagestringMessage to log
data?unknownOptional additional data to include in log

void

ReeflowBaseComponent.log

refresh(): Promise<void>;

Defined in: apps/sdks/core/src/components/workbook/ReeflowWorkbook.ts:156

Refresh workbook data

Promise<void>

connectedCallback(): void;

Defined in: apps/sdks/core/src/components/workbook/ReeflowWorkbook.ts:72

Invoked when the component is added to the document’s DOM.

In connectedCallback() you should setup tasks that should only occur when the element is connected to the document. The most common of these is adding event listeners to nodes external to the element, like a keydown event handler added to the window.

connectedCallback() {
super.connectedCallback();
addEventListener('keydown', this._handleKeydown);
}

Typically, anything done in connectedCallback() should be undone when the element is disconnected, in disconnectedCallback().

void

ReeflowBaseComponent.connectedCallback

disconnectedCallback(): void;

Defined in: apps/sdks/core/src/components/workbook/ReeflowWorkbook.ts:87

Invoked when the component is removed from the document’s DOM.

This callback is the main signal to the element that it may no longer be used. disconnectedCallback() should ensure that nothing is holding a reference to the element (such as event listeners added to nodes external to the element), so that it is free to be garbage collected.

disconnectedCallback() {
super.disconnectedCallback();
window.removeEventListener('keydown', this._handleKeydown);
}

An element may be re-connected after being disconnected.

void

ReeflowBaseComponent.disconnectedCallback

render(): TemplateResult<1>;

Defined in: apps/sdks/core/src/components/workbook/ReeflowWorkbook.ts:389

Invoked on each update to perform rendering tasks. This method may return any value renderable by lit-html’s ChildPart - typically a TemplateResult. Setting properties inside this method will not trigger the element to update.

TemplateResult<1>

ReeflowBaseComponent.render
static styles: CSSResult;

Defined in: apps/sdks/core/src/components/workbook/ReeflowWorkbook.ts:36

Array of styles to apply to the element. The styles should be defined using the css tag function, via constructible stylesheets, or imported from native CSS module scripts.

Note on Content Security Policy:

Element styles are implemented with <style> tags when the browser doesn’t support adopted StyleSheets. To use such <style> tags with the style-src CSP directive, the style-src value must either include ‘unsafe-inline’ or nonce-<base64-value> with <base64-value> replaced be a server-generated nonce.

To provide a nonce to use on generated <style> elements, set window.litNonce to a server-generated nonce in your page’s HTML, before loading application code:

<script>
// Generated and unique per request:
window.litNonce = 'a1b2c3d4';
</script>
ReeflowBaseComponent.styles
updated(changedProperties): void;

Defined in: apps/sdks/core/src/components/workbook/ReeflowWorkbook.ts:95

Invoked whenever the element is updated. Implement to perform post-updating tasks via DOM APIs, for example, focusing an element.

Setting properties inside this method will trigger the element to update again after this update cycle completes.

ParameterType
changedPropertiesMap<string, unknown>

void

ReeflowBaseComponent.updated

Defined in: apps/sdks/core/src/types.ts:84

API error structure Matches the standard NestJS error response format

PropertyTypeDescriptionDefined in
code?stringOptional application-specific error code (e.g., ‘VALIDATION_ERROR’)apps/sdks/core/src/types.ts:92
error?stringError type (e.g., ‘Bad Request’, ‘Unauthorized’, ‘Not Found’)apps/sdks/core/src/types.ts:90
messagestringHuman-readable error messageapps/sdks/core/src/types.ts:88
statusCodenumberHTTP status code (e.g., 400, 401, 404, 500)apps/sdks/core/src/types.ts:86

Defined in: packages/types/dist/index.d.mts:20663

Column information Metadata about query result columns

PropertyTypeDescriptionDefined in
color?stringOptional color metadata associated with the columnpackages/types/dist/index.d.mts:20673
label?stringOptional label associated with the columnpackages/types/dist/index.d.mts:20671
namestringColumn namepackages/types/dist/index.d.mts:20665
role?ColumnRoleOptional role hint for chart visualizationpackages/types/dist/index.d.mts:20669
typestringColumn data typepackages/types/dist/index.d.mts:20667

Defined in: packages/types/dist/index.d.mts:20639

Query execution result Shared type for all query results across the Reeflow ecosystem

PropertyTypeDescriptionDefined in
columnsColumnInfo[]Column metadatapackages/types/dist/index.d.mts:20643
compile_time_msnumberCompilation time in milliseconds (parsing + analysis + validation + transformation)packages/types/dist/index.d.mts:20649
compiled_sqlstringCompiled SQL query after placeholder replacement and validationpackages/types/dist/index.d.mts:20653
execution_time_msnumberExecution time in millisecondspackages/types/dist/index.d.mts:20647
row_countnumberNumber of rows returnedpackages/types/dist/index.d.mts:20645
rowsunknown[][]Array of rows, where each row is an array of column valuespackages/types/dist/index.d.mts:20641
sqlstringOriginal SQL query before compilationpackages/types/dist/index.d.mts:20651

Defined in: apps/sdks/core/src/types.ts:204

Typed Reeflow event

  • CustomEvent
Type Parameter
T extends ReeflowEventType
PropertyModifierTypeDescriptionOverridesDefined in
detailreadonlyReeflowEventDetail[T]Returns any custom data event was created with. Typically used for synthetic events. MDN ReferenceCustomEvent.detailapps/sdks/core/src/types.ts:206
typereadonly`reeflow-${T}`Returns the type of event, e.g. “click”, “hashchange”, or “submit”. MDN ReferenceCustomEvent.typeapps/sdks/core/src/types.ts:205

Defined in: apps/sdks/core/src/types.ts:172

Event detail mapping for type safety

This interface maps each Reeflow event type to its corresponding payload type. All events are prefixed with reeflow- when dispatched (e.g., reeflow-data-loaded).

// Listen to a typed event
element.addEventListener('reeflow-data-loaded', (e: ReeflowEvent<'data-loaded'>) => {
console.log(e.detail); // Type: QueryResult | EmbeddedWorkbook
});
PropertyTypeDescriptionDefined in
auth-change{ authToken: string; }Provider authentication token changedapps/sdks/core/src/types.ts:174
auth-change.authTokenstring-apps/sdks/core/src/types.ts:174
chart-clickChartClickDetailUser clicked on a chart data pointapps/sdks/core/src/types.ts:192
chart-hoverChartHoverDetailUser hovered over a chart data pointapps/sdks/core/src/types.ts:194
chart-legend-toggleChartLegendToggleDetailUser toggled a chart legend item visibilityapps/sdks/core/src/types.ts:196
data-loaded| QueryResult | { description?: Record<string, string> | null; name: z.ZodRecord<z.ZodString, z.ZodString>; pages: { columns: number; content: ( | { config: { [key: string]: unknown; columns?: string[]; }; id: string; label?: string; layout: { height: number; width: number; x: number; y: number; }; query?: | { connection?: { config: …; type: …; }; connection_id?: string; parameters?: Record<…, …>; sql: string; type: SQL; } | { connection?: { config: …; type: …; }; connection_id?: string; dimensions?: …[]; filters?: …[]; joins?: …[]; limit?: string | number; measures: { color?: …; column?: …; label?: …; type: …; }[]; offset?: string | number; order_by?: …[]; parameters?: Record<…, …>; type: AGGREGATE; } | { columns?: …[]; connection?: { config: …; type: …; }; connection_id?: string; distinct?: boolean; filters?: …[]; joins?: …[]; limit?: string | number; offset?: string | number; order_by?: …[]; parameters?: Record<…, …>; type: TABLE; }; source?: { connection_id: string; database?: string; schema?: string; table: string; }; type: "table"; } | { config: { [key: string]: unknown; dimension?: | { column: string; label?: … | …; type: "categorical"; } | { column: string; date_range?: … | …; granularity: … | … | … | … | …; label?: … | …; type: "time"; }; measures?: { color?: …; column?: …; label?: …; type: …; }[]; }; id: string; label?: string; layout: { height: number; width: number; x: number; y: number; }; query?: | { connection?: { config: …; type: …; }; connection_id?: string; parameters?: Record<…, …>; sql: string; type: SQL; } | { connection?: { config: …; type: …; }; connection_id?: string; dimensions?: …[]; filters?: …[]; joins?: …[]; limit?: string | number; measures: { color?: …; column?: …; label?: …; type: …; }[]; offset?: string | number; order_by?: …[]; parameters?: Record<…, …>; type: AGGREGATE; } | { columns?: …[]; connection?: { config: …; type: …; }; connection_id?: string; distinct?: boolean; filters?: …[]; joins?: …[]; limit?: string | number; offset?: string | number; order_by?: …[]; parameters?: Record<…, …>; type: TABLE; }; source?: { connection_id: string; database?: string; schema?: string; table: string; }; type: "bar"; } | { config: { [key: string]: unknown; dimension?: | { column: string; label?: … | …; type: "categorical"; } | { column: string; date_range?: … | …; granularity: … | … | … | … | …; label?: … | …; type: "time"; }; measures?: { color?: …; column?: …; label?: …; type: …; }[]; }; id: string; label?: string; layout: { height: number; width: number; x: number; y: number; }; query?: | { connection?: { config: …; type: …; }; connection_id?: string; parameters?: Record<…, …>; sql: string; type: SQL; } | { connection?: { config: …; type: …; }; connection_id?: string; dimensions?: …[]; filters?: …[]; joins?: …[]; limit?: string | number; measures: { color?: …; column?: …; label?: …; type: …; }[]; offset?: string | number; order_by?: …[]; parameters?: Record<…, …>; type: AGGREGATE; } | { columns?: …[]; connection?: { config: …; type: …; }; connection_id?: string; distinct?: boolean; filters?: …[]; joins?: …[]; limit?: string | number; offset?: string | number; order_by?: …[]; parameters?: Record<…, …>; type: TABLE; }; source?: { connection_id: string; database?: string; schema?: string; table: string; }; type: "line"; } | { config: { [key: string]: unknown; label_field?: string; value_field?: string; }; id: string; label?: string; layout: { height: number; width: number; x: number; y: number; }; query?: | { connection?: { config: …; type: …; }; connection_id?: string; parameters?: Record<…, …>; sql: string; type: SQL; } | { connection?: { config: …; type: …; }; connection_id?: string; dimensions?: …[]; filters?: …[]; joins?: …[]; limit?: string | number; measures: { color?: …; column?: …; label?: …; type: …; }[]; offset?: string | number; order_by?: …[]; parameters?: Record<…, …>; type: AGGREGATE; } | { columns?: …[]; connection?: { config: …; type: …; }; connection_id?: string; distinct?: boolean; filters?: …[]; joins?: …[]; limit?: string | number; offset?: string | number; order_by?: …[]; parameters?: Record<…, …>; type: TABLE; }; source?: { connection_id: string; database?: string; schema?: string; table: string; }; type: "pie"; })[]; description?: Record<string, string> | null; max_rows: number; name: z.ZodRecord<z.ZodString, z.ZodString>; order: number; row_height: number; }[]; theme_css?: string; }Data was successfully loaded (QueryResult for tables/charts, EmbeddedWorkbook for workbooks)apps/sdks/core/src/types.ts:182
errorApiErrorAn error occurred during component operationapps/sdks/core/src/types.ts:180
state-change{ oldState: ReeflowComponentState; state: ReeflowComponentState; }Component state changed (loading, ready, error, etc.)apps/sdks/core/src/types.ts:178
state-change.oldStateReeflowComponentState-apps/sdks/core/src/types.ts:178
state-change.stateReeflowComponentState-apps/sdks/core/src/types.ts:178
table-page-change{ page: number; }Table page changed (pagination)apps/sdks/core/src/types.ts:188
table-page-change.pagenumber-apps/sdks/core/src/types.ts:188
table-row-click{ row: Record<string, unknown> | unknown[]; }User clicked on a table rowapps/sdks/core/src/types.ts:184
table-row-click.rowRecord<string, unknown> | unknown[]-apps/sdks/core/src/types.ts:184
table-search-change{ searchTerm: string; }Table search term changedapps/sdks/core/src/types.ts:190
table-search-change.searchTermstring-apps/sdks/core/src/types.ts:190
table-sort-change{ column: string; direction: "asc" | "desc"; }Table sorting changedapps/sdks/core/src/types.ts:186
table-sort-change.columnstring-apps/sdks/core/src/types.ts:186
table-sort-change.direction"asc" | "desc"-apps/sdks/core/src/types.ts:186
theme-changeThemeChangedTheme or theme mode changedapps/sdks/core/src/types.ts:176
workbook-page-change{ page: number; previousPage: number; }Workbook page/tab changedapps/sdks/core/src/types.ts:198
workbook-page-change.pagenumber-apps/sdks/core/src/types.ts:198
workbook-page-change.previousPagenumber-apps/sdks/core/src/types.ts:198
type ConnectionConfig = z.infer<typeof ConnectionConfigSchema>;

Defined in: packages/types/dist/index.d.mts:759


type DataSourceType = typeof DataSourceTypes[number];

Defined in: packages/types/dist/index.d.mts:689


type EmbeddedWorkbook = z.infer<typeof EmbeddedWorkbookSchema>;

Defined in: packages/types/dist/index.d.mts:6596


type JSONQLQuery = z.infer<typeof JSONQLSchema>;

Defined in: packages/types/dist/index.d.mts:20611


type ReeflowComponentState = "initializing" | "loading" | "error" | "ready" | "empty";

Defined in: apps/sdks/core/src/types.ts:36

State type for Reeflow components


type ReeflowEventType =
| "auth-change"
| "theme-change"
| "state-change"
| "error"
| "data-loaded"
| "table-row-click"
| "table-sort-change"
| "table-page-change"
| "table-search-change"
| "chart-click"
| "chart-hover"
| "chart-legend-toggle"
| "workbook-page-change";

Defined in: apps/sdks/core/src/types.ts:98

Reeflow event types


type ThemeMode = "light" | "dark" | "auto";

Defined in: apps/sdks/core/src/styles/themes/index.ts:28


type ThemeName = keyof typeof themes;

Defined in: apps/sdks/core/src/styles/themes/index.ts:25


type ThemeTokens = z.infer<typeof themeTokensSchema>;

Defined in: packages/themes/dist/index.d.mts:246

TypeScript type inferred from Zod schema

const availableThemeModes: ThemeMode[];

Defined in: apps/sdks/core/src/styles/themes/index.ts:34


const availableThemes: ThemeName[];

Defined in: apps/sdks/core/src/styles/themes/index.ts:31


const DEFAULT_TEST_AUTH_TOKEN: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0ZXN0IiwiaXNzIjoicmVlZmxvdyIsImF1ZCI6ImRhdGEtYXBpIiwiZXhwIjoxNzg5ODQ4MDIzLCJpYXQiOjE3NTgzMzA3NjksImp0aSI6InNlc3NfNmt0QWVnQ0ZTMUc3NjByZUx5WHJOZzVMZmdqIiwib3JnYW5pemF0aW9uX2lkIjoib3JnXzMyTmM1czh4OHBmcnJaWkl2VUtOR2xacFdBZSJ9.ydGlYK7qa0-gMkPGXI5tDwygMeMRmYkQWIDeXONQOFo" = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0ZXN0IiwiaXNzIjoicmVlZmxvdyIsImF1ZCI6ImRhdGEtYXBpIiwiZXhwIjoxNzg5ODQ4MDIzLCJpYXQiOjE3NTgzMzA3NjksImp0aSI6InNlc3NfNmt0QWVnQ0ZTMUc3NjByZUx5WHJOZzVMZmdqIiwib3JnYW5pemF0aW9uX2lkIjoib3JnXzMyTmM1czh4OHBmcnJaWkl2VUtOR2xacFdBZSJ9.ydGlYK7qa0-gMkPGXI5tDwygMeMRmYkQWIDeXONQOFo';

Defined in: apps/sdks/core/src/config.ts:19

Default test auth token for development and testing This is a valid JWT token for testing with the Reeflow API Uses organization_id ‘demo-org’ matching the SPA demo environment


const ThemesCSS: {
default: string;
ocean: string;
};

Defined in: apps/sdks/core/src/styles/themes/index.ts:19

NameTypeDefault valueDefined in
defaultstringdefaultThemeapps/sdks/core/src/styles/themes/index.ts:20
oceanstringoceanThemeapps/sdks/core/src/styles/themes/index.ts:21

const version: "0.0.1" = '0.0.1';

Defined in: apps/sdks/core/src/index.ts:27

function log(
level,
message,
data?): void;

Defined in: apps/sdks/core/src/utils/logger.ts:14

Log a message with Reeflow prefix

ParameterTypeDescription
levelLogLevelThe log level (log, error, warn, info, debug)
messagestringThe message to log
data?unknownOptional additional data to log

void