U2
Classes
| Class | Description |
|---|---|
| Component | Base of every u2 component, visual or not: a name, an effect/cleanup scope, and the widget introspection surface (DD7) generated from componentMeta — what the shell, the context panel, automation and the copilot ask of a widget, implemented by DG.Widget through inheritance. A component constructed inside another's scope is disposed with it. Platform-free; in Datagrok, DG.Widget extends Control, so the kill channel and the introspection surface are this class's own — nothing wires or delegates. Standalone hosts (gallery, tests) call dispose directly. |
| Control | A component that renders: everything visual in u2 is one. |
| Scope | Owner of effects and cleanups. Everything registered on a scope is released by a single dispose() call; the live-scope count feeds leak detection. |
| Signal | The base class for plain and computed signals. |
Interfaces
| Interface | Description |
|---|---|
| BindProp | One enumerated binding step: a property (typed, semType included) plus what the picker needs — no probing, no signal creation during enumeration. |
| BindSource | The DD5 binding protocol: a source resolves one path step at a time and enumerates what a picker may offer without allocating a single signal — laziness is the contract, not an optimization. Every Component answers it off its registry meta. |
| ColumnLike | Deliberately structural, not DG.Column/DG.DataFrame: every real frame satisfies these, while the headless suite feeds plain fakes — a Dart-handle class could never type them. |
| ComponentMetaBase | The registry metadata a component introspects itself through; the spec layer's ComponentMeta extends it (structural, so the core never imports the spec layer). |
| ComponentState | The per-instance u2 state, kept under one own field so that Component.init can be applied to a platform DG.Widget (a Component by inheritance) without clobbering its own fields. |
| DataFrameLike | - |
| FuncLike | A callable a component exposes, params as properties. The invocation is named after DG.Func.apply so that a real platform function IS a FuncLike — the host hands out either. Deliberately NOT DG.Func: components mint plain callables no registry knows. |
| NamedProperty | A property whose name is guaranteed — what descriptors and bind steps carry. |
| ObservableLike | The subscription surface of an event stream; an rxjs Observable satisfies it structurally. Deliberately NOT rxjs Observable: the notification seams return hand-rolled literals, and the dependency-free core never types against rxjs (a webpack external). What Component.onEvent emits is a union: a component event's own payload, or a DOM Event where the control's root raises one of the same name. Nothing wraps or tags them — a subscriber that cares tests for instanceof Event. |
| ReadonlySignal | An interface for read-only signals. |
Type Aliases
| Type Alias | Description |
|---|---|
| PropertyChange | What a widget announces when one of its properties changed: the property's name, or null when several changed at once (or the widget cannot say which). Structural — nothing platform-typed. |
Variables
| Variable | Description |
|---|---|
| DF_STEPS | The seven steps every DataFrame answers — static, so a source that IS a frame enumerates them without building the frame's bindings first. |
Functions
| Function | Description |
|---|---|
| batch | Combine multiple value updates into one "commit" at the end of the provided callback. |
| computed | Create a new signal that is computed based on the values of other signals. |
| dfBindings | The BindSource over a DataFrame signal. Subscriptions and signals live on scope. Lazy: a currentRow.<col> signal is created on first bindStep and cached; a repoint (the frame signal changing identity) resubscribes events and refreshes every cached signal. A column step always answers a signal — an absent frame or column reads undefined and refuses writes, so bound inputs show empty instead of breaking (the containment posture). |
| isWritableSignal | Whether s is a signal whose value can be written — the two-way gate. A prototype-descriptor check: the vendored Computed defines a getter-only value, so computeds classify read-only without any engine knowledge. |
| propertyFields | A plain copy of the named fields — a spread of a DG.Property copies nothing but its dart handle, since every field is a prototype getter. |
| rawEffect | Create an effect to run arbitrary code in response to signal changes. |
| signal | Create a new plain signal. |
| untracked | Run a callback function that can access signal values without subscribing to the signal updates. |
References
IEventType
Re-exports IEventType
IInputStatus
Re-exports IInputStatus
IProperty
Re-exports IProperty
IPropertyMeta
Re-exports IPropertyMeta
IRectBounds
Re-exports IRectBounds
IWidgetStatus
Re-exports IWidgetStatus