Silvi

Rules, Rule and Lead

The definitions a report follows, written once in the dialog and picked by id into each component's "(i)".

<Rules> is a group of <Rule>s inside the dialog. Each rule has an id, a title and a body. A component’s info={{ rules: [...] }} picks rules by id into its own “(i)”, so a definition is written once and the page and the chart cannot disagree.

A group draws as bullets, as a definition list (as="defs"), or as a table (as="table"). A table group is for the source tables: a component’s “(i)” lists the tables its SQL reads from it, by matching each rule’s title to a table name in the query.

A rule’s lead is a first line after its title; it may hold more than text, such as a Value.

Example

Props of Rules

Name Type Required Default Meaning
as "list", "defs" or "table" no "list" Bullets, a definition list, or a table
term text no “Table” With as="table": the first column’s header
definition text no “What it contributes” With as="table": the second column’s header

Props of Rule

Name Type Required Default Meaning
id text yes The id a component’s info={{ rules: [...] }} names
title text yes The rule’s bold title; in a table group, the table’s name
lead text or content no A first line after the title, such as lead={<><Value of="excluded.0.orders" /> orders were tests.</>}
children content no The rule’s body

A rule sits directly inside a <Rules>; anywhere else it is not drawn.

Checks

A rule without id or title, or an as not one of its values, fails the typecheck.