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
| Parameter | Type | Description |
|---|---|---|
index | number | The index of the checklist set on which this controller operates. |
bus | EventBus | The event bus. |
Returns
ChecklistController
Properties
index
readonlyindex: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
| Parameter | Type | Description |
|---|---|---|
groupIndex | number | The index of the checklist group containing the checklist to complete. |
listIndex | number | The 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
| Parameter | Type | Description |
|---|---|---|
groupIndex | number | The 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
| Parameter | Type | Description |
|---|---|---|
groupIndex | number | The index of the checklist group containing the checklist to reset. |
listIndex | number | The 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
| Parameter | Type | Description |
|---|---|---|
groupIndex | number | The index of the checklist group containing the item to toggle. |
listIndex | number | The index of the checklist containing the item to toggle within its group. |
branchIndex | number | The index of the branch containing the item to toggle within its list, or -1 if the item is not contained in a branch. |
itemIndex | number | The index of the item to toggle within its checklist. |
force? | boolean | The 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