API overview
To Do List methods
| Name | Description |
|---|---|
| addProject() | Adds a new project |
| addTask() | Adds a new task into the list |
| assignUser() | Assigns a person to the specified task |
| checkTask() | Marks a task as complete |
| closeInlineEditor() | Closes the inline editor of a task/project |
| collapseTask() | Collapses a task by its id |
| copyTask() | Copies a task into the clipboard and pastes into the specified position |
| deleteProject() | Removes a project |
| deleteTask() | Removes the specified task from DataStore |
| destructor() | Removes all HTML elements of the To Do List, and detaches all related events |
| eachSelected() | Iterates over all selected tasks |
| existsProject() | Checks whether the specified project exists in DataStore |
| existsTask() | Checks whether the specified task exists in DataStore |
| expandTask() | Expands a collapsed task by its id |
| getChildrenIds() | Returns the IDs of child tasks of the specified parent task |
| getParentIds() | Returns the IDs of parent tasks of the specified child task |
| getProject() | Gets an object of the project by its ID |
| getSelection() | Gets an array with ID of the selected task |
| getTask() | Gets an object of the task by its ID |
| hasChildren() | Checks whether the specified task has child tasks |
| hideCompletedTasks() | Switches To Do List to the mode when completed tasks are hidden from the page |
| indentTask() | Demotes the nesting level of the task to one lower level, depending on the nearby task |
| moveTask() | Moves a task to the specified position |
| openInlineEditor() | Opens the inline editor of a task/project |
| parse() | Loads data into To Do List |
| pasteTask() | Pastes the copied task from the clipboard into the specified position |
| redo() | Repeats the action that was reverted by the undo action |
| selectTask() | Selects the specified task by its ID |
| serialize() | Serializes data of To Do List into a JSON object |
| setConfig() | Sets a new configuration for the To Do List |
| setLocale() | Sets the specified locale for To Do List |
| setFilter() | Filters tasks by the specified criteria within an active project |
| setProject() | Sets the specified project as an active one |
| setSort() | Sorts tasks of the active project by the specified parameters |
| showCompletedTasks() | Switches To Do List to the mode when completed tasks are shown on the page |
| unassignUser() | Unassigns a person from the specified task |
| uncheckTask() | Marks a task as incomplete |
| undo() | Reverts the last operation in To Do List |
| unindentTask() | Promotes the nesting level of the task to one higher level, depending on the nearby task |
| unselectTask() | Unselects a task(s) |
| updateProject() | Updates configuration parameters of a project |
| updateTask() | Updates configuration parameters of a task |
To Do List internal API
Event Bus methods
| Name | Description |
|---|---|
| api.exec() | Allows triggering the inner events |
| api.intercept() | Allows intercepting and preventing the inner events |
| api.on() | Allows attaching a handler to the inner events |
| api.setNext() | Allows adding some action into the Event Bus order |
State methods
| Name | Description |
|---|---|
| api.getReactiveState() | Gets an object with the reactive properties of the DataStore of To Do List |
| api.getState() | Gets an object with the current properties of the DataStore of To Do List |
| api.getStores() | Gets an object with the DataStore object of To Do List |
To Do List events
| Name | Description |
|---|---|
| add-project | Fires when adding a new project |
| add-task | Fires when adding a new task |
| assign-user | Fires when a user is assigned to a task |
| check-task | Fires when a task is marked as completed |
| clone-task | Fires when a task is pasted from the clipboard into the specified position |
| close-inline-editor | Fires when closing the inline editor of a task/project |
| close-menu | Fires when closing the menu |
| collapse-task | Fires when collapsing a task |
| copy-task | Fires when a task is copied into the clipboard |
| delete-project | Fires when removing a project |
| delete-task | Fires when removing a task |
| drag | Fires when the user is dragging the tasks |
| edit-item | Fires when the value of a task/project is edited via the inline editor |
| end-drag | Fires when the dragging of task(s) was finished |
| expand-task | Fires when expanding a task |
| hide-completed-tasks | Fires when To Do List is switched to the mode of hiding completed tasks |
| indent-task | Fires when the nesting level of a task is demoted by one |
| keypress-on-todo | Fires when a task is in focus at the time of using key navigation |
| move-task | Fires when moving a task |
| open-inline-editor | Fires when opening the inline editor of a task/project |
| open-menu | Fires when opening the menu |
| paste-task | Fires when a task is pasted from the clipboard into the specified position |
| select-task | Fires when selecting a task |
| set-filter | Fires when filtering data by the specified criteria |
| set-project | Fires when changing the active project |
| set-sort | Fires when sorting tasks |
| show-completed-tasks | Fires when To Do List is switched to the mode of showing completed tasks |
| start-drag | Fires when the user starts to drag the tasks |
| unassign-user | Fires when a user is unassigned from a task |
| uncheck-task | Fires when a task is marked as uncompleted |
| unindent-task | Fires when the nesting level of a task is promoted by one |
| unselect-task | Fires when unselecting a task |
| update-project | Fires when updating a project |
| update-task | Fires when updating a task |
To Do List properties
| Name | Description |
|---|---|
| activeProject | Optional. The ID of the active project |
| drag | Optional. Specifies settings for drag-n-drop |
| history | Optional. Enables/disables managing the history of changes |
| id | Optional. The ID of the To Do List |
| locale | Optional. Applies the necessary locale to the component |
| menu | Optional. Specifies the context menu visibility (if boolean) or configuration parameters (if function) |
| priorities | Optional. Specifies an array of objects containing the priorities data |
| projects | Optional. Specifies an array of project objects to set into the list |
| readonly | Optional. Makes To Do List readonly |
| selected | Optional. An array with IDs of the tasks which need to be selected on initialization of To Do List |
| tags | Optional. An array of hashtags to be shown by default |
| tasks | Required. Specifies an array of task objects to set into the list |
| taskShape | Optional. An object with settings for the appearance of tasks |
| users | Optional. Specifies an array of objects containing the users data |