Skip to main content

Class: ChecklistController

Defined in: src/sdk/checklist/ChecklistController.ts:9

A controller for a checklist set. The controller provides a convenient interface for publishing the control events defined in ChecklistControlEvents.

Constructors​

Constructor​

new ChecklistController(index, bus): ChecklistController

Defined in: src/sdk/checklist/ChecklistController.ts:21

Creates a new instance of ChecklistController.

Parameters​

ParameterTypeDescription
indexnumberThe index of the checklist set on which this controller operates.
busEventBusThe event bus.

Returns​

ChecklistController

Properties​

index​

readonly index: number

Defined in: src/sdk/checklist/ChecklistController.ts:21

The index of the checklist set on which this controller operates.

Methods​

completeList()​

completeList(groupIndex, listIndex): void

Defined in: src/sdk/checklist/ChecklistController.ts:68

Completes all actionable items in a single checklist.

Parameters​

ParameterTypeDescription
groupIndexnumberThe index of the checklist group containing the checklist to complete.
listIndexnumberThe index of the checklist to complete within its group.

Returns​

void


resetAll()​

resetAll(): void

Defined in: src/sdk/checklist/ChecklistController.ts:42

Resets all checklists in the checklist set.

Returns​

void


resetGroup()​

resetGroup(groupIndex): void

Defined in: src/sdk/checklist/ChecklistController.ts:50

Resets all checklists in a single checklist group.

Parameters​

ParameterTypeDescription
groupIndexnumberThe index of the group to reset.

Returns​

void


resetList()​

resetList(groupIndex, listIndex): void

Defined in: src/sdk/checklist/ChecklistController.ts:59

Resets all actionable items in a single checklist.

Parameters​

ParameterTypeDescription
groupIndexnumberThe index of the checklist group containing the checklist to reset.
listIndexnumberThe index of the checklist to reset within its group.

Returns​

void


toggleItem()​

toggleItem(groupIndex, listIndex, branchIndex, itemIndex, force?): void

Defined in: src/sdk/checklist/ChecklistController.ts:82

Toggles whether an actionable item is completed.

Parameters​

ParameterTypeDescription
groupIndexnumberThe index of the checklist group containing the item to toggle.
listIndexnumberThe index of the checklist containing the item to toggle within its group.
branchIndexnumberThe index of the branch containing the item to toggle within its list, or -1 if the item is not contained in a branch.
itemIndexnumberThe index of the item to toggle within its checklist.
force?booleanThe state to force onto the item. If true, then the item will be completed. If false, then the item will be reset. If undefined, then the item will be toggled to the opposite of its current state.

Returns​

void