@manta-eu/horns-kit/plan
Reference for @manta-eu/horns-kit/plan in @manta-eu/horns-kit 0.2.3.
Type Aliases
PlanPlacement
PlanPlacement =
object
Properties
actions?
optionalactions?:PlanActions
Absent where nothing can be run — a capture, an embed without a viewer. The plan still draws.
labels
labels:
Readonly<Record<string,string>>
links
links:
Readonly<Record<string,EntityLink>>
palette
palette:
ChartPalette
plans
plans: readonly
SnapshotPlan[]
shown?
optionalshown?:Readonly<Record<string, readonlystring[]>>
The things each plan changes that this view draws, by plan IRI.
strip?
optionalstrip?: (args) =>ReactNode
Draws the plan. Same bargain as writtenView: the kit knows nothing of @manta-eu/react, so a host
that wants its own buttons and badges supplies this. Without it the kit’s own strip draws, which is what
a server render and a capture without a host always see.
Parameters
args
Returns
ReactNode
PlanStatus
PlanStatus =
Pick<SnapshotPlan,"state"|"lastRun"|"name">
PlanStripArgs
PlanStripArgs =
object
What a host needs to draw one plan, already resolved against the snapshot.
Properties
actions?
optionalactions?:PlanActions
labels
labels:
Readonly<Record<string,string>>
links
links:
Readonly<Record<string,EntityLink>>
onView
onView: readonly
string[]
The things the plan changes that this view draws, first in the list.
plan
plan:
SnapshotPlan
SuggestedChangesProps
SuggestedChangesProps =
object
Properties
plan
plan:
string
The plan’s IRI, as the view’s rows carry it.
Variables
PlanPlacementProvider
constPlanPlacementProvider:Provider
Functions
SuggestedChanges()
SuggestedChanges(
__namedParameters):string|number|bigint|boolean|Element|Iterable<ReactNode,any,any> |Promise<string|number|bigint|boolean|ReactPortal|Iterable<ReactNode,any,any> |ReactElement<unknown,string|JSXElementConstructor<any>> |null|undefined> |null|undefined
One plan’s changes and what may be done about them, drawn where the view puts it.
Says so plainly when there is nothing to draw rather than rendering an empty box: a view naming a plan the Horn does not hold is a mistake worth seeing while somebody is reading the code.
Parameters
__namedParameters
Returns
string | number | bigint | boolean | Element | Iterable<ReactNode, any, any> | Promise<string | number | bigint | boolean | ReactPortal | Iterable<ReactNode, any, any> | ReactElement<unknown, string | JSXElementConstructor<any>> | null | undefined> | null | undefined
usePlansBehindView()
usePlansBehindView(): readonly
object[]
The plans behind the view being drawn, so a view can name them without being handed callbacks.
Returns
readonly object[]