Hiyve Components - v1.0.0
    Preparing search index...

    Result of useCourseBuilder.

    interface UseCourseBuilderResult {
        addBlock: (type: NewBlockType) => void;
        addLesson: (sectionId: string) => void;
        addSection: () => void;
        content: LessonContent | null;
        course: Course | null;
        error: Error | null;
        flush: () => Promise<void>;
        issues: CourseIssue[];
        loading: boolean;
        moveBlock: (blockId: string, toIndex: number) => void;
        moveLesson: (
            lessonId: string,
            toSectionId: string,
            toIndex: number,
        ) => void;
        moveSection: (sectionId: string, toIndex: number) => void;
        removeBlock: (blockId: string) => void;
        removeLesson: (lessonId: string) => void;
        removeSection: (sectionId: string) => void;
        renameCourse: (title: string) => void;
        renameSection: (sectionId: string, title: string) => void;
        saveState: SaveState;
        selectedLesson: LessonSummary | null;
        selectedLessonId: string | null;
        selectLesson: (lessonId: string | null) => void;
        setAccess: (lessonId: string, access: AccessRule) => void;
        setCover: (cover: MediaRef | null) => void;
        setCoverColor: (color: string | null) => void;
        setDescription: (description: string) => void;
        setProgression: (progression: CourseProgression) => void;
        setStatus: (status: CourseStatus) => void;
        updateBlock: (blockId: string, patch: Partial<Block>) => void;
        updateLessonSummary: (
            lessonId: string,
            patch: Partial<Omit<LessonSummary, "id" | "access">>,
        ) => void;
        uploadMedia: (file: File) => Promise<MediaRef>;
    }
    Index

    Properties

    addBlock: (type: NewBlockType) => void
    addLesson: (sectionId: string) => void
    addSection: () => void
    content: LessonContent | null

    The selected lesson's blocks, with 'review' quiz answers in place for editing.

    course: Course | null
    error: Error | null
    flush: () => Promise<void>

    Save anything waiting now.

    issues: CourseIssue[]
    loading: boolean
    moveBlock: (blockId: string, toIndex: number) => void
    moveLesson: (lessonId: string, toSectionId: string, toIndex: number) => void
    moveSection: (sectionId: string, toIndex: number) => void
    removeBlock: (blockId: string) => void
    removeLesson: (lessonId: string) => void
    removeSection: (sectionId: string) => void
    renameCourse: (title: string) => void
    renameSection: (sectionId: string, title: string) => void
    saveState: SaveState
    selectedLesson: LessonSummary | null
    selectedLessonId: string | null
    selectLesson: (lessonId: string | null) => void
    setAccess: (lessonId: string, access: AccessRule) => void
    setCover: (cover: MediaRef | null) => void

    Set or remove the cover image shown with the course in lists.

    setCoverColor: (color: string | null) => void

    Choose the color shown when there is no cover image, or null for the automatic one.

    setDescription: (description: string) => void
    setProgression: (progression: CourseProgression) => void
    setStatus: (status: CourseStatus) => void

    Publish, archive or restore the course.

    updateBlock: (blockId: string, patch: Partial<Block>) => void
    updateLessonSummary: (
        lessonId: string,
        patch: Partial<Omit<LessonSummary, "id" | "access">>,
    ) => void
    uploadMedia: (file: File) => Promise<MediaRef>