Interactivity & linkage
🌐 The complete write-up is in Chinese for now — see DSL 交互与联动. This English page is a capability summary; the full narrative is being translated.
CRUD is easy. The real wall is interactivity: a city dropdown that follows a province, a "discount" field that only appears for bulk orders, a "Submit" button visible only in draft state, one "Publish" click that confirms → calls an API → toasts → refreshes. Hand-written, this logic scatters across onChange / useEffect / if (status === …). AuraBoot folds the entire interaction layer into the DSL.
Three mechanisms
| Mechanism | What it does | Scale (live) |
|---|---|---|
| Condition expressions | visibleWhen / disableWhen + conditional visible/readonly/required, contexts row. / record. / form. | 72 fn.* business functions (Logical 7 · Text 16 · Number 13 · Date 14 · Type 10 · Collection 12) |
| LinkageEngine | One field changing drives others; visual "Linkage" panel → linkageRules | 8 actions: show hide enable disable setRequired setValue setOptions validate + multi-level cascade (maxDepth 5) |
| Action system | What happens on click — 3 layers: useActionHandler → ActionRegistry → FlowRunner | 5 ActionDef forms (command / navigate / builtin / flow-steps / flow-handler) + ~30 atomic actions |
ActionDef forms
| type | Behavior |
|---|---|
command | Run a backend command (through the command pipeline) |
navigate | Page navigation (may carry a command for new/edit) |
builtin | Built-in UI op (search/reset/refresh/export/new/edit/view/delete/back/noop) |
flow (inline steps) | 1–3 step one-off flow |
flow (handler ref) | Complex/reused flow defined in schema handlers |
State-aware toolbar (worked example)
{
"blockType": "toolbar",
"buttons": [
{ "code": "submit", "action": { "type": "command", "command": "pe:submit_sales_order" },
"visibleWhen": "record.pe_so_status === 'draft'" },
{ "code": "approve", "action": { "type": "command", "command": "pe:approve_sales_order" },
"visibleWhen": "record.pe_so_status === 'pending'" }
]
}Buttons bind command codes, so UI / automation / AI agents all travel the same authorized, audited path — no front-end event code.