import { ITask } from "../../../models"; /** * Properties of TaskCardList. * * @typedef Supervisor․TaskCardListProps * @memberof Supervisor․TaskCardList * @property {Array} tasks - List of tasks. * @property {DynamicContentStore.DynamicComponentChildren} [children] - children */ export interface TaskCardListProps { compareFunction?: (a: ITask, b: ITask) => number; filter?: (task: ITask) => boolean; onCardSelected?: (task: ITask) => void; selectedTaskSid?: string; highlightedTaskSid?: string; tasks: Array; } /** * Props passed to children of TaskCardList. * * @typedef Supervisor․TaskCardListChildrenProps * @memberof Supervisor․TaskCardList * @property {Function} [compareFunction] - A compare function that receives two tasks as arguments. Negative number means task a should be above task b, positive number that a should be below b. 0 indicates equal priority. * @property {Function} [filter] - Filter function used to filter tasks for this list. * @property {Function} [onCardSelected] - A function to call with ITask in order to select the task. * @property {string} [selectedTaskSid] - Sid of the selected task. * @property {string} [highlightedTaskSid] - Sid of the highlighted task. * @property {Array} tasks - Unfiltered tasks in the list. * @property {DynamicContentStore.DynamicComponentChildren} [children] - children */ export type TaskCardListChildrenProps = TaskCardListProps; /** * Programmable properties of TaskCardList. * * @typedef Supervisor․TaskCardListProgrammableProps * @memberof Supervisor․TaskCardList * @property {Function} [compareFunction] - A compare function that receives two tasks as arguments. Negative number means task a should be above task b, positive number that a should be below b. 0 indicates equal priority. */ export type TaskCardListProgrammableProps = Partial>;