Everything @umriss-ui/calculation exports, with its signature. A component's props stand on its own page.
CalculationCalculation – Lets a reader follow and redo a figure (also called a KPI tree or calculation tree): each line a quantity with its operator, derived lines folded until opened beneath themselves. Reach for it where a number on the screen gets questioned: a cost, an availability, an invoice total.
Used on Scenarios, Installation, Calculation, Tree, Chain, Rows from data, Given, Metrics, What can go wrong and Worked examples.
ChainChain – A sheet read top to bottom (a running calculation): each line worked into the value before it, and interims naming the value where they stand. Reach for it for invoices, budgets and cost sheets.
Used on Calculation, Chain, Rows from data, Given, Metrics, What can go wrong and Worked examples.
DifferenceThe first operand minus every other: a − b − c.
const Difference: (props: OperatorProps) => null;Used on Scenarios, Installation, Calculation, Tree, Rows from data and Worked examples.
DividedByDivides the named value before it by its operand.
const DividedBy: (props: ChainOperandProps) => null;Used on Chain, Metrics and Worked examples.
GivenGiven – The numbers a calculation starts from (inputs, leaves): where they came from, when they were true, and whether they are still fresh.
Used on Scenarios, Installation, Calculation, Tree, Chain, Rows from data, Given, Metrics, What can go wrong and Worked examples.
InterimNames the value of a chain where it stands.
const Interim: (props: QuantityProps) => null;Used on Calculation, Chain, Rows from data, Given, Metrics, What can go wrong and Worked examples.
MinusTakes its operand from the value before it.
const Minus: (props: ChainOperandProps) => null;Used on Calculation, Chain, Rows from data, Given and Metrics.
PlusAdds its operand to the value before it.
const Plus: (props: ChainOperandProps) => null;Used on Calculation, Chain, Rows from data, Metrics, What can go wrong and Worked examples.
ProductThe product of two or more operands.
const Product: (props: OperatorProps) => null;Used on Scenarios, Calculation, Tree, Chain, Rows from data, Given, Metrics, What can go wrong and Worked examples.
QuotientExactly two operands: the first divided by the second.
const Quotient: (props: OperatorProps) => null;Used on Scenarios, Installation, Calculation, Tree, Chain, Given, Metrics, What can go wrong and Worked examples.
RefTree – A quantity defined elsewhere in the calculation, standing as an operand.
Used on Scenarios, Installation, Calculation, Tree, Chain, Rows from data, Given and Worked examples.
SumThe sum of its operands, however many: rows from data, one or none included. The sum of none is zero, and its line says it has no entries.
const Sum: (props: OperatorProps) => null;Used on Scenarios, Calculation, Tree, Chain, Rows from data, Metrics, What can go wrong and Worked examples.
TimesMultiplies the named value before it by its operand.
const Times: (props: ChainOperandProps) => null;Used on Calculation, Chain and Metrics.
CalculationPropsIts table stands on Calculation.
ChainOperandPropsIts table stands on Chain.
ChainPropsIts table stands on Chain.
GivenPropsIts table stands on Given.
MetricValuesA given's numbers where the calculation has metrics: one per metric id,
null where the number is absent.
type MetricValues = Readonly<Record<string, number | null>>;OperatorPropsIts table stands on Tree.
QuantityPropsIts table stands on Chain.
RefPropsIts table stands on Tree.