@cuemath/leap 3.1.44-beta-0.1 → 3.1.44-beta-0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +1 -1
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js +21 -20
- package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +106 -104
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +14 -13
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +40 -40
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worksheet-helpers.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-helpers.ts"],"sourcesContent":["import type { NODE_TYPES } from '../../../types/models/worksheet';\nimport type { TColorNames, TUserTypes } from '../../ui/types';\nimport type { TWorksheetQuestionPaperColor } from './worksheet-question/worksheet-question-types';\nimport type { ILearnosityQuestionResponse, IWorksheetHeaderLayoutProps } from './worksheet-types';\n\nimport Bulb2Icon from '../../../assets/line-icons/icons/bulb2';\nimport EditStarIcon from '../../../assets/line-icons/icons/edit-star';\nimport Edit2Icon from '../../../assets/line-icons/icons/edit2';\nimport QuestionLetterIcon from '../../../assets/line-icons/icons/question-letter';\nimport Star2Icon from '../../../assets/line-icons/icons/star2';\nimport EVENTS from '../constants/events';\nimport {\n ACTION_BAR_HEIGHT,\n CLOZE_FORMULA_RESPONSE_LIMIT,\n OPTIONAL_ITEM_TYPES,\n QUESTION_WIDTH,\n SPLIT_QUESTION_WIDTH,\n} from './constants';\nimport {\n QUESTION_TAGS,\n type ILearnosityItem,\n type ILearnosityQuestion,\n type ISheetNudgeBannerInfo,\n type IWorksheetBehavior,\n type IWorksheetProps,\n type IWorksheetQuestion,\n type IWorksheetResponse,\n type TInstructorStimulus,\n type TItemType,\n type TSectionName,\n} from './worksheet-types';\n\ninterface IGetSectionNameFromItemType {\n (itemType?: TItemType): TSectionName | undefined;\n}\n\nconst getSectionNameFromItemType: IGetSectionNameFromItemType = itemType => {\n switch (itemType) {\n case 'overview':\n return 'overview';\n case 'learning-we-do':\n case 'learning-your-turn':\n case 'learning-explore':\n return 'learning';\n case 'practice-basic':\n case 'practice-basic-optional':\n return 'practice-basic';\n case 'practice-regular':\n case 'practice-regular-optional':\n return 'practice-regular';\n case 'exit-ticket':\n return 'exit-ticket';\n case 'advanced-explore':\n case 'advanced-we-do':\n case 'advanced-your-turn':\n case 'advanced-practice':\n return 'advanced';\n default:\n return undefined;\n }\n};\n\nconst isConceptIntroWidget = (instructorStimulus?: TInstructorStimulus) => {\n if (!instructorStimulus) {\n return false;\n }\n\n const lowerCaseInstructorStimulus = instructorStimulus.toLowerCase();\n\n return lowerCaseInstructorStimulus === 'intro' || lowerCaseInstructorStimulus === 'concept-intro';\n};\n\nconst getTagsMap = (tags: string[]): Record<string, string> => {\n return tags.reduce((acc, tag) => {\n const [key, value] = tag.split(':');\n const trimmedKey = key?.trim();\n const trimmedValue = value?.trim();\n\n if (!trimmedKey || !trimmedValue) {\n return acc;\n }\n\n return {\n ...acc,\n [trimmedKey.toLowerCase()]: trimmedValue,\n };\n }, {});\n};\n\ninterface IGetQuestionsFromItems {\n (\n items: ILearnosityItem[],\n options: {\n sectioned?: boolean;\n adaptive?: boolean;\n },\n ): IWorksheetQuestion[];\n}\nconst getQuestionsFromItems: IGetQuestionsFromItems = (\n items,\n { sectioned = false, adaptive = false },\n) => {\n if (sectioned) {\n return items.reduce((acc, item, itemIndex) => {\n let hasIntroWidget = false;\n const { content, questions, itemType } = item;\n const sectionName = getSectionNameFromItemType(itemType);\n const prevItem = acc[acc.length - 1];\n const itemDisplayNumber =\n sectionName === prevItem?.section_name && prevItem?.item_display_number\n ? prevItem.item_display_number + 1\n : 1;\n const orderedQuestionIds = content.match(/question-[^\"]*/g);\n const orderedQuestions = orderedQuestionIds?.map((responseId, widgetIndex) => {\n const question = questions.find(\n ({ response_id: respId }) => respId === responseId.replace('question-', ''),\n );\n\n if (!question) {\n throw new Error(`Question not found for the response id: ${responseId}`);\n }\n\n hasIntroWidget = hasIntroWidget || isConceptIntroWidget(question.instructor_stimulus);\n\n return {\n ...question,\n // Some questions are set to limited number of attempts which can show feedback which is causing the question to be stuck in the errored state\n feedback_attempts: undefined,\n item_reference: item.reference,\n item_number: itemIndex,\n item_display_number: itemDisplayNumber,\n section_name: sectionName,\n item_type: sectioned ? itemType : undefined,\n is_optional: itemType ? OPTIONAL_ITEM_TYPES.includes(itemType) : false,\n item_tags: item.tags ?? [],\n item_tags_map: getTagsMap(item.tags ?? []),\n question_number: widgetIndex - (hasIntroWidget ? 1 : 0),\n total_questions: orderedQuestionIds.length,\n } as IWorksheetQuestion;\n });\n\n hasIntroWidget = false;\n\n if (orderedQuestions?.[0] && itemIndex > 0 && items.length > 0) {\n const prevItemType = items[itemIndex - 1]?.itemType;\n const itemTypeDerived = itemType?.startsWith('advanced-') ? 'advanced' : itemType;\n const prevItemTypeDerived = prevItemType?.startsWith('advanced-')\n ? 'advanced'\n : prevItemType;\n\n if (\n (itemTypeDerived === 'practice-basic' ||\n itemTypeDerived === 'practice-regular' ||\n itemTypeDerived === 'exit-ticket' ||\n itemTypeDerived === 'advanced') &&\n itemTypeDerived !== prevItemTypeDerived\n ) {\n return [\n ...acc,\n {\n ...orderedQuestions[0],\n metadata: {\n ...orderedQuestions[0].metadata,\n teacher_tips: undefined,\n hints: undefined,\n solution: undefined,\n },\n instructor_stimulus: 'SystemIntro',\n response_id: `${itemType}-system-intro`,\n is_optional: itemType?.startsWith('advanced-'),\n },\n ...(orderedQuestions ?? []),\n ];\n }\n }\n\n return [...acc, ...(orderedQuestions ?? [])];\n }, [] as IWorksheetQuestion[]);\n }\n\n const finalQuestions = items.reduce((acc, item, itemIndex) => {\n const { content, questions } = item;\n const orderedQuestionIds = content.match(/question-[^\"]*/g);\n const orderedQuestions = orderedQuestionIds?.map<IWorksheetQuestion>(\n (responseId, widgetIndex) => {\n const question = questions.find(\n ({ response_id: respId }) => respId === responseId.replace('question-', ''),\n );\n\n if (!question) {\n throw new Error(`Question not found for the response id: ${responseId}`);\n }\n\n return {\n ...question,\n feedback_attempts: undefined,\n item_reference: item.reference,\n item_number: itemIndex,\n item_display_number: itemIndex + 1,\n item_tags: item.tags ?? [],\n item_tags_map: getTagsMap(item.tags ?? []),\n question_number: widgetIndex,\n total_questions: orderedQuestionIds.length,\n };\n },\n );\n\n return [...acc, ...(orderedQuestions ?? [])];\n }, [] as IWorksheetQuestion[]);\n\n if (adaptive) {\n const topics: string[] = [];\n const topicsOrder: Record<string, number> = {};\n\n return finalQuestions\n .sort((a, b) => {\n const aTopic = a.item_tags_map[QUESTION_TAGS.TRIAL_TOPIC];\n const bTopic = b.item_tags_map[QUESTION_TAGS.TRIAL_TOPIC];\n\n if (aTopic && topicsOrder[aTopic] === undefined) {\n topicsOrder[aTopic] = topics.length;\n topics.push(aTopic);\n }\n\n if (bTopic && topicsOrder[bTopic] === undefined) {\n topicsOrder[bTopic] = topics.length;\n topics.push(bTopic);\n }\n\n if (!aTopic || !bTopic) {\n return 0;\n }\n\n const aSortKey = `${topicsOrder[aTopic]}-${\n a.item_tags_map[QUESTION_TAGS.QUESTION_CODE]?.length ?? 0\n }`;\n const bSortKey = `${topicsOrder[bTopic]}-${\n b.item_tags_map[QUESTION_TAGS.QUESTION_CODE]?.length ?? 0\n }`;\n\n return aSortKey > bSortKey ? 1 : -1;\n })\n .map(question => {\n const topicOrder =\n topicsOrder[question.item_tags_map[QUESTION_TAGS.TRIAL_TOPIC] ?? ''] ?? 0;\n const questionCode = question.item_tags_map[QUESTION_TAGS.QUESTION_CODE] ?? '';\n\n return {\n ...question,\n item_display_number: topicOrder * 3 + questionCode.length,\n };\n });\n }\n\n return finalQuestions;\n};\n\ninterface IGetInitialQuestionId {\n (params: {\n questions: IWorksheetQuestion[];\n initialQuestion: IWorksheetBehavior['initialQuestion'];\n lastUnlockedQuestionIndex: number;\n initialResponseId?: string;\n initialItemIndex?: number;\n }): string;\n}\n\nconst getInitialQuestionId: IGetInitialQuestionId = ({\n questions,\n initialQuestion,\n initialResponseId,\n initialItemIndex,\n lastUnlockedQuestionIndex,\n}) => {\n const unlockedQuestions = questions.slice(0, lastUnlockedQuestionIndex + 1);\n const lastUnlockedQuestion = questions[lastUnlockedQuestionIndex]!;\n\n if (initialResponseId && unlockedQuestions.find(q => q.response_id === initialResponseId)) {\n return initialResponseId;\n }\n\n if (\n typeof initialItemIndex === 'number' &&\n initialItemIndex <= lastUnlockedQuestion.item_number\n ) {\n const question = questions.find(q => q.item_number === initialItemIndex);\n\n if (question?.response_id) {\n return question.response_id;\n }\n }\n\n if (initialQuestion === 'FIRST' && questions[0]?.response_id) {\n return questions[0].response_id;\n }\n\n if (initialQuestion === 'CURRENT') {\n return lastUnlockedQuestion.response_id;\n }\n\n if (questions[0]?.response_id) {\n return questions[0].response_id;\n }\n\n throw new Error('Initial question not found');\n};\n\ninterface IGetLastUnlockedQuestionIndex {\n (options: {\n questions: IWorksheetQuestion[];\n responses: Record<string, IWorksheetResponse>;\n behavior: IWorksheetBehavior;\n userType: TUserTypes;\n }): number;\n}\n\nconst getLastUnlockedQuestionIndex: IGetLastUnlockedQuestionIndex = ({\n questions,\n responses,\n behavior,\n userType,\n}) => {\n const { maximumAttempts, teacherValidationEnabled, validation, navigationMode } = behavior;\n const questionIndex = [...questions].reverse().findIndex(q => {\n const qResp = responses[q.response_id];\n\n const { attemptsHistory, validatedByTeacher, assignStatus } = qResp ?? {};\n\n if (teacherValidationEnabled) {\n if (validatedByTeacher) {\n return true;\n }\n\n if (assignStatus === 'skipped') {\n return true;\n }\n\n return false;\n }\n\n const lastAttemptScore = attemptsHistory?.slice(-1)[0]?.score;\n\n if (lastAttemptScore) {\n if ((lastAttemptScore.score ?? 0) === lastAttemptScore.max_score) {\n return true;\n }\n\n const maximumAttemptsReached = (attemptsHistory?.length ?? 0) >= maximumAttempts;\n\n return maximumAttemptsReached;\n }\n\n if (!validation && navigationMode === 'LINEAR' && (qResp?.response || qResp?.skipped)) {\n return true;\n }\n\n return false;\n });\n\n if (questionIndex === -1) {\n return 0;\n }\n\n if (questionIndex === 0) {\n if (teacherValidationEnabled) {\n const unskippedQuestionIndex = [...questions].reverse().findIndex(q => {\n return responses[q.response_id]?.assignStatus !== 'skipped';\n });\n\n return questions.length - unskippedQuestionIndex - 1;\n }\n\n return questions.length - 1;\n }\n\n if (teacherValidationEnabled && userType === 'STUDENT') {\n const lastUnlockedQuestionIndex = questions.length - questionIndex;\n const lastUnlockedQuestion = questions[lastUnlockedQuestionIndex]!;\n const { assignStatus } = responses[lastUnlockedQuestion.response_id] ?? {};\n\n if (lastUnlockedQuestion.is_optional && !assignStatus) {\n return lastUnlockedQuestionIndex - 1;\n }\n\n return lastUnlockedQuestionIndex;\n }\n\n return questions.length - questionIndex;\n};\n\ntype TQuestionMetadata = Pick<\n IWorksheetResponse,\n 'widgetReference' | 'itemReference' | 'itemPosition' | 'questionPosition' | 'isOkayTypeQuestion'\n>;\n\nfunction getQuestionMetadata(\n questions: IWorksheetQuestion[],\n questionId: string,\n): TQuestionMetadata;\nfunction getQuestionMetadata(question: IWorksheetQuestion): TQuestionMetadata;\nfunction getQuestionMetadata(\n questions: IWorksheetQuestion | IWorksheetQuestion[],\n questionId?: string,\n) {\n const question = Array.isArray(questions)\n ? questions.find(q => q.response_id === questionId)\n : questions;\n\n if (!question) {\n throw new Error(`Question with id ${questionId} not found`);\n }\n\n return {\n widgetReference: question.metadata.widget_reference,\n itemReference: question.item_reference,\n itemPosition: question.item_number,\n questionPosition: question.question_number,\n isOkayTypeQuestion: isOkayTypeQuestion(question),\n score: {\n max_score:\n question?.validation?.valid_response?.score ?? 0 * question.metadata.valid_response_count,\n },\n tags: {\n ...question.item_tags_map,\n instructor_stimulus: question.instructor_stimulus,\n },\n };\n}\n\ninterface IGetInitialResponses {\n (questions: IWorksheetQuestion[]): Record<string, IWorksheetResponse>;\n}\n\nconst getInitialResponses: IGetInitialResponses = questions => {\n return questions.reduce(\n (acc, question) => ({\n ...acc,\n [question.response_id]: getQuestionMetadata(questions, question.response_id),\n }),\n {},\n );\n};\n\ninterface IGetWorksheetDimensions {\n (\n items: ILearnosityItem[],\n layout: IWorksheetProps['layout'],\n ): {\n questionsContainerWidth: number;\n maxQuestionWidth: number;\n actionbarHeight: number;\n };\n}\n\nconst getWorksheetDimensions: IGetWorksheetDimensions = (items, layout) => {\n const { actionBar } = layout;\n const isSingleColumn = !items.some(item =>\n item.questions.some(question => question.stimulus_review),\n );\n const actionbarHeight = actionBar === 'bottom' ? ACTION_BAR_HEIGHT : 0;\n\n return {\n questionsContainerWidth: isSingleColumn ? QUESTION_WIDTH : SPLIT_QUESTION_WIDTH,\n maxQuestionWidth: QUESTION_WIDTH,\n actionbarHeight,\n };\n};\n\ninterface IGetRenderableQuestions {\n (options: {\n questions: IWorksheetQuestion[];\n lastUnlockedQuestionIndex: number;\n userType: TUserTypes;\n }): IWorksheetQuestion[];\n}\nconst getRenderableQuestions: IGetRenderableQuestions = ({\n questions,\n lastUnlockedQuestionIndex,\n userType,\n}) => {\n if (userType === 'STUDENT') return questions.slice(0, lastUnlockedQuestionIndex + 1);\n\n return questions;\n};\n\ninterface IScrollToQuestion {\n (questionId: string, params?: { animation?: boolean }): void;\n}\n\nconst scrollToQuestion: IScrollToQuestion = (questionId, { animation = false } = {}) => {\n const $questionEl = document.querySelectorAll(`.widget-${questionId}`)[0];\n\n if ($questionEl) {\n $questionEl.scrollIntoView({\n block: 'start',\n behavior: animation ? 'smooth' : 'instant',\n });\n }\n};\n\ninterface IIsOkayTypeQuestion {\n (question: IWorksheetQuestion | ILearnosityQuestion): boolean;\n}\n\nconst isOkayTypeQuestion: IIsOkayTypeQuestion = question => {\n const { type, options, instructor_stimulus } = question;\n const itemType = 'item_type' in question ? question.item_type : undefined;\n\n if (\n itemType === 'overview' ||\n instructor_stimulus === 'Intro' ||\n instructor_stimulus === 'SystemIntro' ||\n instructor_stimulus === 'Concept-Intro'\n ) {\n return true;\n }\n\n return type === 'mcq' && options?.length === 1 ? true : false;\n};\n\nconst setMathJaxConfigInWindow = (\n logger: (eventName: string, data?: Record<string, unknown>) => void,\n) => {\n window.MathJax = {\n options: {\n enableMenu: false,\n ignoreHtmlClass: 'lrn_noMath',\n compileError: function (doc, math, err) {\n logger(EVENTS.MATHJAX_COMPILE_ERROR);\n doc.compileError(math, err);\n },\n typesetError: function (doc, math, err) {\n logger(EVENTS.MATHJAX_TYPESET_ERROR);\n doc.typesetError(math, err);\n // throw new Error('typesetError');\n },\n },\n tex: {\n inlineMath: [\n ['\\\\(', '\\\\)'],\n ['$$', '$$'],\n ],\n displayMath: [['\\\\[', '\\\\]']],\n macros: {\n abs: ['{|#1|}', 1],\n degree: ['°'],\n longdiv: ['{\\\\enclose{longdiv}{#1}}', 1],\n atomic: ['{_{#1}^{#2}}', 2],\n polyatomic: ['{_{#2}{}^{#1}}', 2],\n circledot: ['{\\\\odot}'],\n parallelogram: ['\\\\unicode{x25B1}'],\n ngtr: ['\\\\unicode{x226F}'],\n nless: ['\\\\unicode{x226E}'],\n MathQuillVarField: ['#1', 1],\n overarc: ['{\\\\overparen{#1}}', 1],\n },\n formatError: (jax, err) => {\n logger(EVENTS.MATHJAX_FORMAT_ERROR, {\n id: err.id,\n message: err.message,\n });\n jax.formatError(err);\n },\n },\n chtml: {\n minScale: 1,\n matchFontHeight: false,\n },\n };\n};\n\ninterface IGetPaperColorByQuestion {\n (question: IWorksheetQuestion): TWorksheetQuestionPaperColor;\n}\n\nconst getPaperColorByQuestion: IGetPaperColorByQuestion = question => {\n const { item_type, instructor_stimulus } = question;\n const lowerCaseInstructorStimulus = instructor_stimulus?.toLowerCase();\n\n switch (item_type) {\n case 'overview':\n return 'white';\n case 'learning-we-do':\n case 'learning-your-turn':\n case 'learning-explore':\n if (\n lowerCaseInstructorStimulus === 'instruction' ||\n lowerCaseInstructorStimulus === 'intro' ||\n lowerCaseInstructorStimulus === 'concept-intro'\n ) {\n return 'blue';\n }\n\n if (lowerCaseInstructorStimulus === 'task') {\n return 'green';\n }\n\n return 'yellow';\n case 'practice-basic':\n case 'practice-regular':\n return 'yellow';\n case 'exit-ticket':\n return 'purple';\n case 'advanced-practice':\n return 'orange';\n default:\n if (lowerCaseInstructorStimulus === 'learn') return 'blue';\n\n if (lowerCaseInstructorStimulus === 'try' || lowerCaseInstructorStimulus === 'apply')\n return 'green';\n\n return 'yellow';\n }\n};\n\nconst getQuestionBackgroundImage = (paperColor: TWorksheetQuestionPaperColor) => {\n return `https://cuemath-intel.s3.ap-southeast-1.amazonaws.com/media/math-canvas/paper-${paperColor}.png`;\n};\n\nconst getQuestionBorderColor = (\n paperColor: TWorksheetQuestionPaperColor,\n isActive?: boolean,\n): TColorNames => {\n if (!isActive) {\n return 'GREY_3';\n }\n\n switch (paperColor) {\n case 'orange':\n case 'white':\n return 'ORANGE_2';\n case 'blue':\n return 'BLUE_2';\n case 'green':\n return 'GREEN_2';\n case 'yellow':\n return 'YELLOW_2';\n case 'purple':\n return 'PURPLE_2';\n default:\n return 'GREY_3';\n }\n};\n\nconst getNavigationSectionBackgroundColor = (sectionName?: TSectionName): TColorNames => {\n switch (sectionName) {\n case 'learning':\n return 'BLUE_1';\n case 'practice-basic':\n case 'practice-regular':\n return 'YELLOW_1';\n case 'exit-ticket':\n return 'PURPLE_1';\n case 'advanced':\n return 'ORANGE_1';\n default:\n return 'YELLOW_1';\n }\n};\n\nconst getNavigationSectionName = (sectionName?: TSectionName): string => {\n switch (sectionName) {\n case 'learning':\n return 'Learning';\n case 'practice-basic':\n return 'Basic practice';\n case 'practice-regular':\n return 'Regular practice';\n case 'exit-ticket':\n return 'Mini quiz';\n case 'advanced':\n return 'Advanced work';\n default:\n return '';\n }\n};\n\nconst getNavigationSectionIcon = (sectionName?: TSectionName) => {\n switch (sectionName) {\n case 'learning':\n return Bulb2Icon;\n case 'practice-basic':\n return Edit2Icon;\n case 'practice-regular':\n return EditStarIcon;\n case 'exit-ticket':\n return QuestionLetterIcon;\n case 'advanced':\n return Star2Icon;\n default:\n return Bulb2Icon;\n }\n};\n\nconst isSATAssessmentNode = (nodeType: NODE_TYPES) =>\n nodeType === 'SAT_ENGLISH_ASSESSMENT' || nodeType === 'SAT_MATH_ASSESSMENT';\n\nconst checkIsClozeFormulaResponseInvalid = (response: ILearnosityQuestionResponse) => {\n if (Array.isArray(response.value)) {\n const isInvalid = response.value.some(\n item => typeof item === 'string' && item.length > CLOZE_FORMULA_RESPONSE_LIMIT,\n );\n\n return isInvalid;\n }\n\n return false;\n};\n\nconst getWorksheetNudgeBannerInfo = (\n userType: TUserTypes,\n markedAsCompleted: boolean,\n): ISheetNudgeBannerInfo => {\n const isTeacher = userType === 'TEACHER';\n\n if (markedAsCompleted) {\n return {\n bannerBackgroundColor: 'GREEN_4',\n label: isTeacher\n ? 'This sheet was marked as completed.'\n : 'Marked as completed by the teacher',\n };\n }\n\n return {\n bannerBackgroundColor: 'ORANGE_2',\n label: 'Complete this with your tutor in class',\n };\n};\n\nconst getWorksheetHeaderLayout: IWorksheetHeaderLayoutProps = ({\n isPuzzleWorksheet,\n isTestWorksheet,\n imageHue = 'BLUE',\n}) => {\n if (isPuzzleWorksheet) {\n return {\n bgColor: `${imageHue}_3`,\n borderColor: `${imageHue}_4`,\n };\n }\n\n if (isTestWorksheet) {\n return {\n bgColor: 'WHITE_3',\n borderColor: 'WHITE_4',\n };\n }\n\n return {\n bgColor: 'BLACK_1',\n borderColor: 'BLACK_4',\n };\n};\n\nexport {\n getInitialQuestionId,\n getInitialResponses,\n getLastUnlockedQuestionIndex,\n getNavigationSectionBackgroundColor,\n getNavigationSectionIcon,\n getNavigationSectionName,\n getPaperColorByQuestion,\n getQuestionBackgroundImage,\n getQuestionBorderColor,\n getQuestionMetadata,\n getQuestionsFromItems,\n getRenderableQuestions,\n getWorksheetDimensions,\n isConceptIntroWidget,\n isSATAssessmentNode,\n isOkayTypeQuestion,\n scrollToQuestion,\n setMathJaxConfigInWindow,\n getWorksheetNudgeBannerInfo,\n checkIsClozeFormulaResponseInvalid,\n getWorksheetHeaderLayout,\n};\n"],"names":["getSectionNameFromItemType","itemType","isConceptIntroWidget","instructorStimulus","lowerCaseInstructorStimulus","getTagsMap","tags","acc","tag","key","value","trimmedKey","trimmedValue","getQuestionsFromItems","items","sectioned","adaptive","item","itemIndex","hasIntroWidget","content","questions","sectionName","prevItem","itemDisplayNumber","orderedQuestionIds","orderedQuestions","responseId","widgetIndex","question","respId","OPTIONAL_ITEM_TYPES","prevItemType","_a","itemTypeDerived","prevItemTypeDerived","finalQuestions","topics","topicsOrder","a","b","aTopic","QUESTION_TAGS","bTopic","aSortKey","bSortKey","_b","topicOrder","questionCode","getInitialQuestionId","initialQuestion","initialResponseId","initialItemIndex","lastUnlockedQuestionIndex","unlockedQuestions","lastUnlockedQuestion","q","getLastUnlockedQuestionIndex","responses","behavior","userType","maximumAttempts","teacherValidationEnabled","validation","navigationMode","questionIndex","qResp","attemptsHistory","validatedByTeacher","assignStatus","lastAttemptScore","unskippedQuestionIndex","getQuestionMetadata","questionId","isOkayTypeQuestion","getInitialResponses","getWorksheetDimensions","layout","actionBar","QUESTION_WIDTH","SPLIT_QUESTION_WIDTH","ACTION_BAR_HEIGHT","getRenderableQuestions","scrollToQuestion","animation","$questionEl","type","options","instructor_stimulus","setMathJaxConfigInWindow","logger","doc","math","err","EVENTS","jax","getPaperColorByQuestion","item_type","getQuestionBackgroundImage","paperColor","getQuestionBorderColor","isActive","getNavigationSectionBackgroundColor","getNavigationSectionName","getNavigationSectionIcon","Bulb2Icon","Edit2Icon","EditStarIcon","QuestionLetterIcon","Star2Icon","checkIsClozeFormulaResponseInvalid","response","CLOZE_FORMULA_RESPONSE_LIMIT","getWorksheetNudgeBannerInfo","markedAsCompleted","isTeacher","getWorksheetHeaderLayout","isPuzzleWorksheet","isTestWorksheet","imageHue"],"mappings":";;;;;;;;AAoCA,MAAMA,IAA0D,CAAYC,MAAA;AAC1E,UAAQA,GAAU;AAAA,IAChB,KAAK;AACI,aAAA;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,IACT,KAAK;AACI,aAAA;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,IACT;AACS;AAAA,EACX;AACF,GAEMC,IAAuB,CAACC,MAA6C;AACzE,MAAI,CAACA;AACI,WAAA;AAGH,QAAAC,IAA8BD,EAAmB;AAEhD,SAAAC,MAAgC,WAAWA,MAAgC;AACpF,GAEMC,IAAa,CAACC,MACXA,EAAK,OAAO,CAACC,GAAKC,MAAQ;AAC/B,QAAM,CAACC,GAAKC,CAAK,IAAIF,EAAI,MAAM,GAAG,GAC5BG,IAAaF,KAAA,gBAAAA,EAAK,QAClBG,IAAeF,KAAA,gBAAAA,EAAO;AAExB,SAAA,CAACC,KAAc,CAACC,IACXL,IAGF;AAAA,IACL,GAAGA;AAAA,IACH,CAACI,EAAW,YAAY,CAAC,GAAGC;AAAA,EAAA;AAEhC,GAAG,CAAE,CAAA,GAYDC,IAAgD,CACpDC,GACA,EAAE,WAAAC,IAAY,IAAO,UAAAC,IAAW,SAC7B;AACH,MAAID;AACF,WAAOD,EAAM,OAAO,CAACP,GAAKU,GAAMC,MAAc;;AAC5C,UAAIC,IAAiB;AACrB,YA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,IACT;AACS,aAAA;AAAA,EACX;AACF,GAEMkF,KAA2B,CAAClF,MAA+B;AAC/D,UAAQA,GAAa;AAAA,IACnB,KAAK;AACI,aAAAmF;AAAA,IACT,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AACI,aAAAC;AAAA,IACT;AACS,aAAAJ;AAAA,EACX;AACF,GAKMK,KAAqC,CAACC,MACtC,MAAM,QAAQA,EAAS,KAAK,IACZA,EAAS,MAAM;AAAA,EAC/B,CAAQ9F,MAAA,OAAOA,KAAS,YAAYA,EAAK,SAAS+F;AAAA,IAM/C,IAGHC,KAA8B,CAClCrD,GACAsD,MAC0B;AAC1B,QAAMC,IAAYvD,MAAa;AAE/B,SAAIsD,IACK;AAAA,IACL,uBAAuB;AAAA,IACvB,OAAOC,IACH,wCACA;AAAA,EAAA,IAID;AAAA,IACL,uBAAuB;AAAA,IACvB,OAAO;AAAA,EAAA;AAEX,GAEMC,KAAwD,CAAC;AAAA,EAC7D,mBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,UAAAC,IAAW;AACb,MACMF,IACK;AAAA,EACL,SAAS,GAAGE,CAAQ;AAAA,EACpB,aAAa,GAAGA,CAAQ;AAAA,IAIxBD,IACK;AAAA,EACL,SAAS;AAAA,EACT,aAAa;AAAA,IAIV;AAAA,EACL,SAAS;AAAA,EACT,aAAa;AAAA;"}
|
|
1
|
+
{"version":3,"file":"worksheet-helpers.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-helpers.ts"],"sourcesContent":["import type { NODE_TYPES } from '../../../types/models/worksheet';\nimport type { TColorNames, TUserTypes } from '../../ui/types';\nimport type { TWorksheetQuestionPaperColor } from './worksheet-question/worksheet-question-types';\nimport type { ILearnosityQuestionResponse, IWorksheetHeaderLayoutProps } from './worksheet-types';\n\nimport Bulb2Icon from '../../../assets/line-icons/icons/bulb2';\nimport EditStarIcon from '../../../assets/line-icons/icons/edit-star';\nimport Edit2Icon from '../../../assets/line-icons/icons/edit2';\nimport QuestionLetterIcon from '../../../assets/line-icons/icons/question-letter';\nimport Star2Icon from '../../../assets/line-icons/icons/star2';\nimport EVENTS from '../constants/events';\nimport {\n ACTION_BAR_HEIGHT,\n CLOZE_FORMULA_RESPONSE_LIMIT,\n OPTIONAL_ITEM_TYPES,\n QUESTION_WIDTH,\n SPLIT_QUESTION_WIDTH,\n} from './constants';\nimport {\n QUESTION_TAGS,\n type ILearnosityItem,\n type ILearnosityQuestion,\n type ISheetNudgeBannerInfo,\n type IWorksheetBehavior,\n type IWorksheetProps,\n type IWorksheetQuestion,\n type IWorksheetResponse,\n type TInstructorStimulus,\n type TItemType,\n type TSectionName,\n} from './worksheet-types';\n\ninterface IGetSectionNameFromItemType {\n (itemType?: TItemType): TSectionName | undefined;\n}\n\nconst getSectionNameFromItemType: IGetSectionNameFromItemType = itemType => {\n switch (itemType) {\n case 'overview':\n return 'overview';\n case 'learning-we-do':\n case 'learning-your-turn':\n case 'learning-explore':\n return 'learning';\n case 'practice-basic':\n case 'practice-basic-optional':\n return 'practice-basic';\n case 'practice-regular':\n case 'practice-regular-optional':\n return 'practice-regular';\n case 'exit-ticket':\n return 'exit-ticket';\n case 'advanced-explore':\n case 'advanced-we-do':\n case 'advanced-your-turn':\n case 'advanced-practice':\n return 'advanced';\n default:\n return undefined;\n }\n};\n\nconst isConceptIntroWidget = (instructorStimulus?: TInstructorStimulus) => {\n if (!instructorStimulus) {\n return false;\n }\n\n const lowerCaseInstructorStimulus = instructorStimulus.toLowerCase();\n\n return lowerCaseInstructorStimulus === 'intro' || lowerCaseInstructorStimulus === 'concept-intro';\n};\n\nconst getTagsMap = (tags: string[]): Record<string, string> => {\n return tags.reduce((acc, tag) => {\n const [key, value] = tag.split(':');\n const trimmedKey = key?.trim();\n const trimmedValue = value?.trim();\n\n if (!trimmedKey || !trimmedValue) {\n return acc;\n }\n\n return {\n ...acc,\n [trimmedKey.toLowerCase()]: trimmedValue,\n };\n }, {});\n};\n\ninterface IGetQuestionsFromItems {\n (\n items: ILearnosityItem[],\n options: {\n sectioned?: boolean;\n adaptive?: boolean;\n },\n ): IWorksheetQuestion[];\n}\nconst getQuestionsFromItems: IGetQuestionsFromItems = (\n items,\n { sectioned = false, adaptive = false },\n) => {\n if (sectioned) {\n return items.reduce((acc, item, itemIndex) => {\n let hasIntroWidget = false;\n const { content, questions, itemType } = item;\n const sectionName = getSectionNameFromItemType(itemType);\n const prevItem = acc[acc.length - 1];\n const itemDisplayNumber =\n sectionName === prevItem?.section_name && prevItem?.item_display_number\n ? prevItem.item_display_number + 1\n : 1;\n const orderedQuestionIds = content.match(/question-[^\"]*/g);\n const orderedQuestions = orderedQuestionIds?.map((responseId, widgetIndex) => {\n const question = questions.find(\n ({ response_id: respId }) => respId === responseId.replace('question-', ''),\n );\n\n if (!question) {\n throw new Error(`Question not found for the response id: ${responseId}`);\n }\n\n hasIntroWidget = hasIntroWidget || isConceptIntroWidget(question.instructor_stimulus);\n\n return {\n ...question,\n // Some questions are set to limited number of attempts which can show feedback which is causing the question to be stuck in the errored state\n feedback_attempts: undefined,\n item_reference: item.reference,\n item_number: itemIndex,\n item_display_number: itemDisplayNumber,\n section_name: sectionName,\n item_type: sectioned ? itemType : undefined,\n is_optional: itemType ? OPTIONAL_ITEM_TYPES.includes(itemType) : false,\n item_tags: item.tags ?? [],\n item_tags_map: getTagsMap(item.tags ?? []),\n question_number: widgetIndex - (hasIntroWidget ? 1 : 0),\n total_questions: orderedQuestionIds.length,\n } as IWorksheetQuestion;\n });\n\n hasIntroWidget = false;\n\n if (orderedQuestions?.[0] && itemIndex > 0 && items.length > 0) {\n const prevItemType = items[itemIndex - 1]?.itemType;\n const itemTypeDerived = itemType?.startsWith('advanced-') ? 'advanced' : itemType;\n const prevItemTypeDerived = prevItemType?.startsWith('advanced-')\n ? 'advanced'\n : prevItemType;\n\n if (\n (itemTypeDerived === 'practice-basic' ||\n itemTypeDerived === 'practice-regular' ||\n itemTypeDerived === 'exit-ticket' ||\n itemTypeDerived === 'advanced') &&\n itemTypeDerived !== prevItemTypeDerived\n ) {\n return [\n ...acc,\n {\n ...orderedQuestions[0],\n metadata: {\n ...orderedQuestions[0].metadata,\n teacher_tips: undefined,\n hints: undefined,\n solution: undefined,\n },\n instructor_stimulus: 'SystemIntro',\n response_id: `${itemType}-system-intro`,\n is_optional: itemType?.startsWith('advanced-'),\n },\n ...(orderedQuestions ?? []),\n ];\n }\n }\n\n return [...acc, ...(orderedQuestions ?? [])];\n }, [] as IWorksheetQuestion[]);\n }\n\n const finalQuestions = items.reduce((acc, item, itemIndex) => {\n const { content, questions } = item;\n const orderedQuestionIds = content.match(/question-[^\"]*/g);\n const orderedQuestions = orderedQuestionIds?.map<IWorksheetQuestion>(\n (responseId, widgetIndex) => {\n const question = questions.find(\n ({ response_id: respId }) => respId === responseId.replace('question-', ''),\n );\n\n if (!question) {\n throw new Error(`Question not found for the response id: ${responseId}`);\n }\n\n return {\n ...question,\n feedback_attempts: undefined,\n item_reference: item.reference,\n item_number: itemIndex,\n item_display_number: itemIndex + 1,\n item_tags: item.tags ?? [],\n item_tags_map: getTagsMap(item.tags ?? []),\n question_number: widgetIndex,\n total_questions: orderedQuestionIds.length,\n };\n },\n );\n\n return [...acc, ...(orderedQuestions ?? [])];\n }, [] as IWorksheetQuestion[]);\n\n if (adaptive) {\n const topics: string[] = [];\n const topicsOrder: Record<string, number> = {};\n\n return finalQuestions\n .sort((a, b) => {\n const aTopic = a.item_tags_map[QUESTION_TAGS.TRIAL_TOPIC];\n const bTopic = b.item_tags_map[QUESTION_TAGS.TRIAL_TOPIC];\n\n if (aTopic && topicsOrder[aTopic] === undefined) {\n topicsOrder[aTopic] = topics.length;\n topics.push(aTopic);\n }\n\n if (bTopic && topicsOrder[bTopic] === undefined) {\n topicsOrder[bTopic] = topics.length;\n topics.push(bTopic);\n }\n\n if (!aTopic || !bTopic) {\n return 0;\n }\n\n const aSortKey = `${topicsOrder[aTopic]}-${\n a.item_tags_map[QUESTION_TAGS.QUESTION_CODE]?.length ?? 0\n }`;\n const bSortKey = `${topicsOrder[bTopic]}-${\n b.item_tags_map[QUESTION_TAGS.QUESTION_CODE]?.length ?? 0\n }`;\n\n return aSortKey > bSortKey ? 1 : -1;\n })\n .map(question => {\n const topicOrder =\n topicsOrder[question.item_tags_map[QUESTION_TAGS.TRIAL_TOPIC] ?? ''] ?? 0;\n const questionCode = question.item_tags_map[QUESTION_TAGS.QUESTION_CODE] ?? '';\n\n return {\n ...question,\n item_display_number: topicOrder * 3 + questionCode.length,\n };\n });\n }\n\n return finalQuestions;\n};\n\ninterface IGetInitialQuestionId {\n (params: {\n questions: IWorksheetQuestion[];\n initialQuestion: IWorksheetBehavior['initialQuestion'];\n lastUnlockedQuestionIndex: number;\n initialResponseId?: string;\n initialItemIndex?: number;\n }): string;\n}\n\nconst getInitialQuestionId: IGetInitialQuestionId = ({\n questions,\n initialQuestion,\n initialResponseId,\n initialItemIndex,\n lastUnlockedQuestionIndex,\n}) => {\n const unlockedQuestions = questions.slice(0, lastUnlockedQuestionIndex + 1);\n const lastUnlockedQuestion = questions[lastUnlockedQuestionIndex]!;\n\n if (initialResponseId && unlockedQuestions.find(q => q.response_id === initialResponseId)) {\n return initialResponseId;\n }\n\n if (\n typeof initialItemIndex === 'number' &&\n initialItemIndex <= lastUnlockedQuestion.item_number\n ) {\n const question = questions.find(q => q.item_number === initialItemIndex);\n\n if (question?.response_id) {\n return question.response_id;\n }\n }\n\n if (initialQuestion === 'FIRST' && questions[0]?.response_id) {\n return questions[0].response_id;\n }\n\n if (initialQuestion === 'CURRENT') {\n return lastUnlockedQuestion.response_id;\n }\n\n if (questions[0]?.response_id) {\n return questions[0].response_id;\n }\n\n throw new Error('Initial question not found');\n};\n\ninterface IGetLastUnlockedQuestionIndex {\n (options: {\n questions: IWorksheetQuestion[];\n responses: Record<string, IWorksheetResponse>;\n behavior: IWorksheetBehavior;\n userType: TUserTypes;\n }): number;\n}\n\nconst getLastUnlockedQuestionIndex: IGetLastUnlockedQuestionIndex = ({\n questions,\n responses,\n behavior,\n userType,\n}) => {\n const { maximumAttempts, teacherValidationEnabled, validation, navigationMode } = behavior;\n const questionIndex = [...questions].reverse().findIndex(q => {\n const qResp = responses[q.response_id];\n\n const { attemptsHistory, validatedByTeacher, assignStatus } = qResp ?? {};\n\n if (teacherValidationEnabled) {\n if (validatedByTeacher) {\n return true;\n }\n\n if (assignStatus === 'skipped') {\n return true;\n }\n\n return false;\n }\n\n const lastAttemptScore = attemptsHistory?.slice(-1)[0]?.score;\n\n if (lastAttemptScore) {\n if ((lastAttemptScore.score ?? 0) === lastAttemptScore.max_score) {\n return true;\n }\n\n const maximumAttemptsReached = (attemptsHistory?.length ?? 0) >= maximumAttempts;\n\n return maximumAttemptsReached;\n }\n\n if (!validation && navigationMode === 'LINEAR' && (qResp?.response || qResp?.skipped)) {\n return true;\n }\n\n return false;\n });\n\n if (questionIndex === -1) {\n return 0;\n }\n\n if (questionIndex === 0) {\n if (teacherValidationEnabled) {\n const unskippedQuestionIndex = [...questions].reverse().findIndex(q => {\n return responses[q.response_id]?.assignStatus !== 'skipped';\n });\n\n return questions.length - unskippedQuestionIndex - 1;\n }\n\n return questions.length - 1;\n }\n\n if (teacherValidationEnabled && userType === 'STUDENT') {\n const lastUnlockedQuestionIndex = questions.length - questionIndex;\n const lastUnlockedQuestion = questions[lastUnlockedQuestionIndex]!;\n const { assignStatus } = responses[lastUnlockedQuestion.response_id] ?? {};\n\n if (lastUnlockedQuestion.is_optional && !assignStatus) {\n return lastUnlockedQuestionIndex - 1;\n }\n\n return lastUnlockedQuestionIndex;\n }\n\n return questions.length - questionIndex;\n};\n\ntype TQuestionMetadata = Pick<\n IWorksheetResponse,\n 'widgetReference' | 'itemReference' | 'itemPosition' | 'questionPosition' | 'isOkayTypeQuestion'\n>;\n\nfunction getQuestionMetadata(\n questions: IWorksheetQuestion[],\n questionId: string,\n): TQuestionMetadata;\nfunction getQuestionMetadata(question: IWorksheetQuestion): TQuestionMetadata;\nfunction getQuestionMetadata(\n questions: IWorksheetQuestion | IWorksheetQuestion[],\n questionId?: string,\n) {\n const question = Array.isArray(questions)\n ? questions.find(q => q.response_id === questionId)\n : questions;\n\n if (!question) {\n throw new Error(`Question with id ${questionId} not found`);\n }\n\n return {\n widgetReference: question.metadata.widget_reference,\n itemReference: question.item_reference,\n itemPosition: question.item_number,\n questionPosition: question.question_number,\n isOkayTypeQuestion: isOkayTypeQuestion(question),\n score: {\n max_score:\n question?.validation?.valid_response?.score ?? 0 * question.metadata.valid_response_count,\n },\n tags: {\n ...question.item_tags_map,\n instructor_stimulus: question.instructor_stimulus,\n },\n };\n}\n\ninterface IGetInitialResponses {\n (questions: IWorksheetQuestion[]): Record<string, IWorksheetResponse>;\n}\n\nconst getInitialResponses: IGetInitialResponses = questions => {\n return questions.reduce(\n (acc, question) => ({\n ...acc,\n [question.response_id]: getQuestionMetadata(questions, question.response_id),\n }),\n {},\n );\n};\n\ninterface IGetWorksheetDimensions {\n (\n items: ILearnosityItem[],\n layout: IWorksheetProps['layout'],\n ): {\n questionsContainerWidth: number;\n maxQuestionWidth: number;\n actionbarHeight: number;\n };\n}\n\nconst getWorksheetDimensions: IGetWorksheetDimensions = (items, layout) => {\n const { actionBar } = layout;\n const isSingleColumn = !items.some(item =>\n item.questions.some(question => question.stimulus_review),\n );\n const actionbarHeight = actionBar === 'bottom' ? ACTION_BAR_HEIGHT : 0;\n\n return {\n questionsContainerWidth: isSingleColumn ? QUESTION_WIDTH : SPLIT_QUESTION_WIDTH,\n maxQuestionWidth: QUESTION_WIDTH,\n actionbarHeight,\n };\n};\n\ninterface IGetRenderableQuestions {\n (options: {\n questions: IWorksheetQuestion[];\n lastUnlockedQuestionIndex: number;\n userType: TUserTypes;\n }): IWorksheetQuestion[];\n}\nconst getRenderableQuestions: IGetRenderableQuestions = ({\n questions,\n lastUnlockedQuestionIndex,\n userType,\n}) => {\n if (userType === 'STUDENT') return questions.slice(0, lastUnlockedQuestionIndex + 1);\n\n return questions;\n};\n\ninterface IScrollToQuestion {\n (questionId: string, params?: { animation?: boolean }): void;\n}\n\nconst scrollToQuestion: IScrollToQuestion = (questionId, { animation = false } = {}) => {\n const $questionEl = document.querySelectorAll(`.widget-${questionId}`)[0];\n\n if ($questionEl) {\n $questionEl.scrollIntoView({\n block: 'start',\n behavior: animation ? 'smooth' : 'instant',\n });\n }\n};\n\ninterface IIsOkayTypeQuestion {\n (question: IWorksheetQuestion | ILearnosityQuestion): boolean;\n}\n\nconst isOkayTypeQuestion: IIsOkayTypeQuestion = question => {\n const { type, options, instructor_stimulus } = question;\n const itemType = 'item_type' in question ? question.item_type : undefined;\n\n if (\n itemType === 'overview' ||\n instructor_stimulus === 'Intro' ||\n instructor_stimulus === 'SystemIntro' ||\n instructor_stimulus === 'Concept-Intro'\n ) {\n return true;\n }\n\n return type === 'mcq' && options?.length === 1 ? true : false;\n};\n\nconst setMathJaxConfigInWindow = (\n logger: (eventName: string, data?: Record<string, unknown>) => void,\n) => {\n window.MathJax = {\n options: {\n enableMenu: false,\n ignoreHtmlClass: 'lrn_noMath',\n compileError: function (doc, math, err) {\n logger(EVENTS.MATHJAX_COMPILE_ERROR);\n doc.compileError(math, err);\n },\n typesetError: function (doc, math, err) {\n logger(EVENTS.MATHJAX_TYPESET_ERROR);\n doc.typesetError(math, err);\n // throw new Error('typesetError');\n },\n },\n tex: {\n inlineMath: [\n ['\\\\(', '\\\\)'],\n ['$$', '$$'],\n ],\n displayMath: [['\\\\[', '\\\\]']],\n macros: {\n abs: ['{|#1|}', 1],\n degree: ['°'],\n longdiv: ['{\\\\enclose{longdiv}{#1}}', 1],\n atomic: ['{_{#1}^{#2}}', 2],\n polyatomic: ['{_{#2}{}^{#1}}', 2],\n circledot: ['{\\\\odot}'],\n parallelogram: ['\\\\unicode{x25B1}'],\n ngtr: ['\\\\unicode{x226F}'],\n nless: ['\\\\unicode{x226E}'],\n MathQuillVarField: ['#1', 1],\n overarc: ['{\\\\overparen{#1}}', 1],\n },\n formatError: (jax, err) => {\n logger(EVENTS.MATHJAX_FORMAT_ERROR, {\n id: err.id,\n message: err.message,\n });\n jax.formatError(err);\n },\n },\n chtml: {\n minScale: 1,\n matchFontHeight: false,\n },\n };\n};\n\ninterface IGetPaperColorByQuestion {\n (question: IWorksheetQuestion): TWorksheetQuestionPaperColor;\n}\n\nconst getPaperColorByQuestion: IGetPaperColorByQuestion = question => {\n const { item_type, instructor_stimulus } = question;\n const lowerCaseInstructorStimulus = instructor_stimulus?.toLowerCase();\n\n switch (item_type) {\n case 'overview':\n return 'white';\n case 'learning-we-do':\n case 'learning-your-turn':\n case 'learning-explore':\n if (\n lowerCaseInstructorStimulus === 'instruction' ||\n lowerCaseInstructorStimulus === 'intro' ||\n lowerCaseInstructorStimulus === 'concept-intro'\n ) {\n return 'blue';\n }\n\n if (lowerCaseInstructorStimulus === 'task') {\n return 'green';\n }\n\n return 'yellow';\n case 'practice-basic':\n case 'practice-regular':\n return 'yellow';\n case 'exit-ticket':\n return 'purple';\n case 'advanced-practice':\n return 'orange';\n default:\n if (lowerCaseInstructorStimulus === 'learn') return 'blue';\n\n if (lowerCaseInstructorStimulus === 'try' || lowerCaseInstructorStimulus === 'apply')\n return 'green';\n\n return 'yellow';\n }\n};\n\nconst getQuestionBackgroundImage = (paperColor: TWorksheetQuestionPaperColor) => {\n return `https://cuemath-intel.s3.ap-southeast-1.amazonaws.com/media/math-canvas/paper-${paperColor}.png`;\n};\n\nconst getQuestionBorderColor = (\n paperColor: TWorksheetQuestionPaperColor,\n isActive?: boolean,\n): TColorNames => {\n if (!isActive) {\n return 'GREY_3';\n }\n\n switch (paperColor) {\n case 'orange':\n case 'white':\n return 'ORANGE_2';\n case 'blue':\n return 'BLUE_2';\n case 'green':\n return 'GREEN_2';\n case 'yellow':\n return 'YELLOW_2';\n case 'purple':\n return 'PURPLE_2';\n default:\n return 'GREY_3';\n }\n};\n\nconst getNavigationSectionBackgroundColor = (sectionName?: TSectionName): TColorNames => {\n switch (sectionName) {\n case 'learning':\n return 'BLUE_1';\n case 'practice-basic':\n case 'practice-regular':\n return 'YELLOW_1';\n case 'exit-ticket':\n return 'PURPLE_1';\n case 'advanced':\n return 'ORANGE_1';\n default:\n return 'YELLOW_1';\n }\n};\n\nconst getNavigationSectionName = (sectionName?: TSectionName): string => {\n switch (sectionName) {\n case 'learning':\n return 'Learning';\n case 'practice-basic':\n return 'Basic practice';\n case 'practice-regular':\n return 'Regular practice';\n case 'exit-ticket':\n return 'Mini quiz';\n case 'advanced':\n return 'Advanced work';\n default:\n return '';\n }\n};\n\nconst getNavigationSectionIcon = (sectionName?: TSectionName) => {\n switch (sectionName) {\n case 'learning':\n return Bulb2Icon;\n case 'practice-basic':\n return Edit2Icon;\n case 'practice-regular':\n return EditStarIcon;\n case 'exit-ticket':\n return QuestionLetterIcon;\n case 'advanced':\n return Star2Icon;\n default:\n return Bulb2Icon;\n }\n};\n\nconst isSATAssessmentNode = (nodeType: NODE_TYPES) =>\n nodeType === 'SAT_ENGLISH_ASSESSMENT' || nodeType === 'SAT_MATH_ASSESSMENT';\n\nconst checkIsClozeFormulaResponseInvalid = (response: ILearnosityQuestionResponse) => {\n if (Array.isArray(response.value)) {\n const isInvalid = response.value.some(\n item => typeof item === 'string' && item.length > CLOZE_FORMULA_RESPONSE_LIMIT,\n );\n\n return isInvalid;\n }\n\n return false;\n};\n\nconst getWorksheetNudgeBannerInfo = (\n userType: TUserTypes,\n markedAsCompleted: boolean,\n): ISheetNudgeBannerInfo => {\n const isTeacher = userType === 'TEACHER';\n\n if (markedAsCompleted) {\n return {\n bannerBackgroundColor: 'GREEN_4',\n label: isTeacher\n ? 'This sheet was marked as completed.'\n : 'Marked as completed by the teacher',\n };\n }\n\n return {\n bannerBackgroundColor: 'ORANGE_2',\n label: 'Complete this with your tutor in class',\n };\n};\n\nconst getWorksheetHeaderLayout: IWorksheetHeaderLayoutProps = ({\n isPuzzleWorksheet,\n isTestWorksheet,\n imageHue = 'BLUE',\n}) => {\n if (isPuzzleWorksheet) {\n return {\n bgColor: `${imageHue}_3`,\n borderColor: `${imageHue}_4`,\n };\n }\n\n if (isTestWorksheet) {\n return {\n bgColor: 'WHITE_3',\n borderColor: 'WHITE_4',\n };\n }\n\n return {\n bgColor: 'BLACK',\n borderColor: 'BLACK_4',\n };\n};\n\nexport {\n getInitialQuestionId,\n getInitialResponses,\n getLastUnlockedQuestionIndex,\n getNavigationSectionBackgroundColor,\n getNavigationSectionIcon,\n getNavigationSectionName,\n getPaperColorByQuestion,\n getQuestionBackgroundImage,\n getQuestionBorderColor,\n getQuestionMetadata,\n getQuestionsFromItems,\n getRenderableQuestions,\n getWorksheetDimensions,\n isConceptIntroWidget,\n isSATAssessmentNode,\n isOkayTypeQuestion,\n scrollToQuestion,\n setMathJaxConfigInWindow,\n getWorksheetNudgeBannerInfo,\n checkIsClozeFormulaResponseInvalid,\n getWorksheetHeaderLayout,\n};\n"],"names":["getSectionNameFromItemType","itemType","isConceptIntroWidget","instructorStimulus","lowerCaseInstructorStimulus","getTagsMap","tags","acc","tag","key","value","trimmedKey","trimmedValue","getQuestionsFromItems","items","sectioned","adaptive","item","itemIndex","hasIntroWidget","content","questions","sectionName","prevItem","itemDisplayNumber","orderedQuestionIds","orderedQuestions","responseId","widgetIndex","question","respId","OPTIONAL_ITEM_TYPES","prevItemType","_a","itemTypeDerived","prevItemTypeDerived","finalQuestions","topics","topicsOrder","a","b","aTopic","QUESTION_TAGS","bTopic","aSortKey","bSortKey","_b","topicOrder","questionCode","getInitialQuestionId","initialQuestion","initialResponseId","initialItemIndex","lastUnlockedQuestionIndex","unlockedQuestions","lastUnlockedQuestion","q","getLastUnlockedQuestionIndex","responses","behavior","userType","maximumAttempts","teacherValidationEnabled","validation","navigationMode","questionIndex","qResp","attemptsHistory","validatedByTeacher","assignStatus","lastAttemptScore","unskippedQuestionIndex","getQuestionMetadata","questionId","isOkayTypeQuestion","getInitialResponses","getWorksheetDimensions","layout","actionBar","QUESTION_WIDTH","SPLIT_QUESTION_WIDTH","ACTION_BAR_HEIGHT","getRenderableQuestions","scrollToQuestion","animation","$questionEl","type","options","instructor_stimulus","setMathJaxConfigInWindow","logger","doc","math","err","EVENTS","jax","getPaperColorByQuestion","item_type","getQuestionBackgroundImage","paperColor","getQuestionBorderColor","isActive","getNavigationSectionBackgroundColor","getNavigationSectionName","getNavigationSectionIcon","Bulb2Icon","Edit2Icon","EditStarIcon","QuestionLetterIcon","Star2Icon","checkIsClozeFormulaResponseInvalid","response","CLOZE_FORMULA_RESPONSE_LIMIT","getWorksheetNudgeBannerInfo","markedAsCompleted","isTeacher","getWorksheetHeaderLayout","isPuzzleWorksheet","isTestWorksheet","imageHue"],"mappings":";;;;;;;;AAoCA,MAAMA,IAA0D,CAAYC,MAAA;AAC1E,UAAQA,GAAU;AAAA,IAChB,KAAK;AACI,aAAA;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,IACT,KAAK;AACI,aAAA;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACI,aAAA;AAAA,IACT;AACS;AAAA,EACX;AACF,GAEMC,IAAuB,CAACC,MAA6C;AACzE,MAAI,CAACA;AACI,WAAA;AAGH,QAAAC,IAA8BD,EAAmB;AAEhD,SAAAC,MAAgC,WAAWA,MAAgC;AACpF,GAEMC,IAAa,CAACC,MACXA,EAAK,OAAO,CAACC,GAAKC,MAAQ;AAC/B,QAAM,CAACC,GAAKC,CAAK,IAAIF,EAAI,MAAM,GAAG,GAC5BG,IAAaF,KAAA,gBAAAA,EAAK,QAClBG,IAAeF,KAAA,gBAAAA,EAAO;AAExB,SAAA,CAACC,KAAc,CAACC,IACXL,IAGF;AAAA,IACL,GAAGA;AAAA,IACH,CAACI,EAAW,YAAY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import
|
|
2
|
+
import { memo as x, useCallback as C } from "react";
|
|
3
|
+
import g from "../../../ui/layout/flex-view.js";
|
|
4
|
+
import u from "../../../ui/separator/separator.js";
|
|
5
5
|
import { SIDEBAR_WIDTH as f } from "../constants.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { SideBarContainer as
|
|
9
|
-
const I =
|
|
6
|
+
import w from "./navigator.js";
|
|
7
|
+
import S from "./question-guide.js";
|
|
8
|
+
import { SideBarContainer as T, UnderlinedTextWrapper as j, UnderlinedText as k } from "./worksheet-sidebar-styled.js";
|
|
9
|
+
const I = x(
|
|
10
10
|
({
|
|
11
11
|
questionWidth: t,
|
|
12
12
|
questions: i,
|
|
13
|
-
activeQuestionIndex:
|
|
13
|
+
activeQuestionIndex: o,
|
|
14
14
|
learnosity: a,
|
|
15
15
|
userType: c,
|
|
16
16
|
height: l,
|
|
17
17
|
actionbarHeight: s,
|
|
18
18
|
openQuestionFeedbackModal: e,
|
|
19
|
-
loggerRef:
|
|
19
|
+
loggerRef: d,
|
|
20
|
+
renderQuestionFeedback: h
|
|
20
21
|
}) => {
|
|
21
|
-
const p = i[
|
|
22
|
-
e && e(
|
|
23
|
-
}, [
|
|
22
|
+
const p = i[o], { item_reference: m } = p ?? {}, $ = C(() => {
|
|
23
|
+
e && e(m || "");
|
|
24
|
+
}, [m, e]);
|
|
24
25
|
return c !== "TEACHER" || !e ? null : /* @__PURE__ */ n(
|
|
25
|
-
|
|
26
|
+
T,
|
|
26
27
|
{
|
|
27
28
|
$width: f,
|
|
28
29
|
$questionWidth: t,
|
|
29
30
|
$height: l,
|
|
30
31
|
$justifyContent: "space-between",
|
|
31
32
|
children: [
|
|
32
|
-
/* @__PURE__ */ r(
|
|
33
|
-
/* @__PURE__ */ n(
|
|
33
|
+
/* @__PURE__ */ r(j, { $width: f, $alignItems: "flex-start", $gapX: 0.5, children: h ? /* @__PURE__ */ r(k, { $renderAs: "cta1", onClick: $, children: "Question Feedback" }) : void 0 }),
|
|
34
|
+
/* @__PURE__ */ n(g, { children: [
|
|
34
35
|
/* @__PURE__ */ r(
|
|
35
|
-
|
|
36
|
+
S,
|
|
36
37
|
{
|
|
37
38
|
questionWidth: t,
|
|
38
39
|
questions: i,
|
|
39
|
-
activeQuestionIndex:
|
|
40
|
+
activeQuestionIndex: o,
|
|
40
41
|
learnosity: a,
|
|
41
42
|
actionbarHeight: s,
|
|
42
|
-
loggerRef:
|
|
43
|
+
loggerRef: d
|
|
43
44
|
}
|
|
44
45
|
),
|
|
45
|
-
/* @__PURE__ */ r(
|
|
46
|
-
/* @__PURE__ */ r(
|
|
46
|
+
/* @__PURE__ */ r(u, { heightX: 0.5 }),
|
|
47
|
+
/* @__PURE__ */ r(w, {})
|
|
47
48
|
] })
|
|
48
49
|
]
|
|
49
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-sidebar/sidebar.tsx"],"sourcesContent":["import type { TUserTypes } from '../../../ui/types';\nimport type { ILearnosity, IWorksheetProps, IWorksheetQuestion } from '../worksheet-types';\n\nimport { memo, useCallback } from 'react';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport { SIDEBAR_WIDTH } from '../constants';\nimport Navigator from './navigator';\nimport QuestionGuide from './question-guide';\nimport {\n SideBarContainer,\n UnderlinedText,\n UnderlinedTextWrapper,\n} from './worksheet-sidebar-styled';\n\ninterface IWorksheetSideBarProps extends Pick<IWorksheetProps, 'loggerRef'> {\n questionWidth: number;\n questions: IWorksheetQuestion[];\n activeQuestionIndex: number;\n learnosity: ILearnosity;\n userType: TUserTypes;\n height: number | string;\n actionbarHeight: number;\n openQuestionFeedbackModal?: (itemRef: string) => void;\n}\n\nconst WorksheetSideBar: React.FC<IWorksheetSideBarProps> = memo(\n ({\n questionWidth,\n questions,\n activeQuestionIndex,\n learnosity,\n userType,\n height,\n actionbarHeight,\n openQuestionFeedbackModal,\n loggerRef,\n }) => {\n const activeQuestion = questions[activeQuestionIndex];\n const { item_reference: itemRef } = activeQuestion ?? {};\n\n const onFeedbackClick = useCallback(() => {\n if (openQuestionFeedbackModal) {\n openQuestionFeedbackModal(itemRef || '');\n }\n }, [itemRef, openQuestionFeedbackModal]);\n\n if (userType !== 'TEACHER' || !openQuestionFeedbackModal) return null;\n\n return (\n <SideBarContainer\n $width={SIDEBAR_WIDTH}\n $questionWidth={questionWidth}\n $height={height}\n $justifyContent=\"space-between\"\n >\n <UnderlinedTextWrapper $width={SIDEBAR_WIDTH} $alignItems=\"flex-start\" $gapX={0.5}>\n <UnderlinedText $renderAs=\"cta1\" onClick={onFeedbackClick}>\n
|
|
1
|
+
{"version":3,"file":"sidebar.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-sidebar/sidebar.tsx"],"sourcesContent":["import type { TUserTypes } from '../../../ui/types';\nimport type { ILearnosity, IWorksheetProps, IWorksheetQuestion } from '../worksheet-types';\n\nimport { memo, useCallback } from 'react';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport { SIDEBAR_WIDTH } from '../constants';\nimport Navigator from './navigator';\nimport QuestionGuide from './question-guide';\nimport {\n SideBarContainer,\n UnderlinedText,\n UnderlinedTextWrapper,\n} from './worksheet-sidebar-styled';\n\ninterface IWorksheetSideBarProps extends Pick<IWorksheetProps, 'loggerRef'> {\n questionWidth: number;\n questions: IWorksheetQuestion[];\n activeQuestionIndex: number;\n learnosity: ILearnosity;\n userType: TUserTypes;\n height: number | string;\n actionbarHeight: number;\n openQuestionFeedbackModal?: (itemRef: string) => void;\n renderQuestionFeedback?: boolean;\n}\n\nconst WorksheetSideBar: React.FC<IWorksheetSideBarProps> = memo(\n ({\n questionWidth,\n questions,\n activeQuestionIndex,\n learnosity,\n userType,\n height,\n actionbarHeight,\n openQuestionFeedbackModal,\n loggerRef,\n renderQuestionFeedback,\n }) => {\n const activeQuestion = questions[activeQuestionIndex];\n const { item_reference: itemRef } = activeQuestion ?? {};\n\n const onFeedbackClick = useCallback(() => {\n if (openQuestionFeedbackModal) {\n openQuestionFeedbackModal(itemRef || '');\n }\n }, [itemRef, openQuestionFeedbackModal]);\n\n if (userType !== 'TEACHER' || !openQuestionFeedbackModal) return null;\n\n return (\n <SideBarContainer\n $width={SIDEBAR_WIDTH}\n $questionWidth={questionWidth}\n $height={height}\n $justifyContent=\"space-between\"\n >\n <UnderlinedTextWrapper $width={SIDEBAR_WIDTH} $alignItems=\"flex-start\" $gapX={0.5}>\n {renderQuestionFeedback ? (\n <UnderlinedText $renderAs=\"cta1\" onClick={onFeedbackClick}>\n Question Feedback\n </UnderlinedText>\n ) : undefined}\n </UnderlinedTextWrapper>\n\n <FlexView>\n <QuestionGuide\n questionWidth={questionWidth}\n questions={questions}\n activeQuestionIndex={activeQuestionIndex}\n learnosity={learnosity}\n actionbarHeight={actionbarHeight}\n loggerRef={loggerRef}\n />\n <Separator heightX={0.5} />\n <Navigator />\n </FlexView>\n </SideBarContainer>\n );\n },\n);\n\nexport default WorksheetSideBar;\n"],"names":["WorksheetSideBar","memo","questionWidth","questions","activeQuestionIndex","learnosity","userType","height","actionbarHeight","openQuestionFeedbackModal","loggerRef","renderQuestionFeedback","activeQuestion","itemRef","onFeedbackClick","useCallback","jsxs","SideBarContainer","SIDEBAR_WIDTH","jsx","UnderlinedTextWrapper","UnderlinedText","FlexView","QuestionGuide","Separator","Navigator"],"mappings":";;;;;;;;AA4BA,MAAMA,IAAqDC;AAAA,EACzD,CAAC;AAAA,IACC,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,2BAAAC;AAAA,IACA,WAAAC;AAAA,IACA,wBAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAiBT,EAAUC,CAAmB,GAC9C,EAAE,gBAAgBS,MAAYD,KAAkB,CAAA,GAEhDE,IAAkBC,EAAY,MAAM;AACxC,MAAIN,KACFA,EAA0BI,KAAW,EAAE;AAAA,IACzC,GACC,CAACA,GAASJ,CAAyB,CAAC;AAEvC,WAAIH,MAAa,aAAa,CAACG,IAAkC,OAG/D,gBAAAO;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,QAAQC;AAAA,QACR,gBAAgBhB;AAAA,QAChB,SAASK;AAAA,QACT,iBAAgB;AAAA,QAEhB,UAAA;AAAA,UAAA,gBAAAY,EAACC,KAAsB,QAAQF,GAAe,aAAY,cAAa,OAAO,KAC3E,UAAAP,IACE,gBAAAQ,EAAAE,GAAA,EAAe,WAAU,QAAO,SAASP,GAAiB,UAAA,oBAE3D,CAAA,IACE,QACN;AAAA,4BAECQ,GACC,EAAA,UAAA;AAAA,YAAA,gBAAAH;AAAA,cAACI;AAAA,cAAA;AAAA,gBACC,eAAArB;AAAA,gBACA,WAAAC;AAAA,gBACA,qBAAAC;AAAA,gBACA,YAAAC;AAAA,gBACA,iBAAAG;AAAA,gBACA,WAAAE;AAAA,cAAA;AAAA,YACF;AAAA,YACA,gBAAAS,EAACK,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,8BACxBC,GAAU,EAAA;AAAA,UAAA,GACb;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worksheet-types.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-types.ts"],"sourcesContent":["import type { IActionData, TPublish, TSubscribe } from '../../cue-canvas/types/cue-canvas';\nimport type { TPublishMouseMove, TSubscribeMouseMove } from '../../pointer-sync/pointer-types';\nimport type { TColorNames, THueNames, TUserTypes } from '../../ui/types';\nimport type { IFile } from './worksheet-question/subjective-review';\nimport type { MutableRefObject, ReactElement } from 'react';\n\nexport enum QUESTION_TAGS {\n TRIAL_TOPIC = 'trial-topic',\n QUESTION_CODE = 'question code',\n}\n\nexport enum QUESTIONS_RATING {\n E = 3,\n S = 2, // Just right\n H = 1,\n}\n\nexport interface ILearnosityError {\n code: number;\n consumerKey: string;\n detail: string;\n errorUI: string;\n msg: string;\n}\n\ninterface ILearnosityQuestionMetadata {\n widget_reference: string;\n sheet_reference: string;\n hints?: string[];\n solution?: string[];\n teacher_tips?: string[];\n valid_response_count: number;\n source: {\n organisation_id: number;\n };\n}\n\nexport type TInstructorStimulus =\n | 'SystemIntro' // lesson v3\n | 'Intro' // lesson v3\n | 'Concept-Intro' // lesson v3\n | 'Instruction' // lesson v3\n | 'Task' // lesson v3\n | 'Try' // trial v3\n | 'Learn' // trial v3\n | 'Apply'; // trial v3\nexport type TItemType =\n | 'overview'\n | 'learning-we-do'\n | 'learning-your-turn'\n | 'learning-explore'\n | 'practice-basic'\n | 'practice-basic-optional'\n | 'practice-regular'\n | 'practice-regular-optional'\n | 'exit-ticket'\n | 'advanced-we-do'\n | 'advanced-your-turn'\n | 'advanced-explore'\n | 'advanced-practice';\n\nexport type TSectionName =\n | 'overview'\n | 'learning'\n | 'practice-basic'\n | 'practice-regular'\n | 'exit-ticket'\n | 'advanced';\n\nexport interface IQuestionValidResponse {\n score: number;\n value: unknown[];\n}\n\nexport interface ISheetNudgeBannerInfo {\n bannerBackgroundColor: TColorNames;\n label: string;\n}\n\nexport interface ILearnosityQuestion {\n response_id: string;\n instructor_stimulus?: TInstructorStimulus;\n metadata: ILearnosityQuestionMetadata;\n instant_feedback?: boolean;\n math_renderer?: string;\n template?: string;\n tokenization?: string;\n numberPad?: string[];\n symbols?: unknown[];\n response_container?: Record<string, unknown>;\n ui_style?: Record<string, unknown>;\n shuffle_options?: boolean;\n // for custom type question validation is undefined.\n validation?: {\n scoring_type?: string;\n unscored?: boolean;\n valid_response?: IQuestionValidResponse;\n alt_responses?: IQuestionValidResponse[];\n penalty?: number;\n min_score_if_attempted?: number;\n };\n is_math?: boolean;\n labels?: Record<string, unknown>;\n line?: Record<string, unknown>;\n points?: string[];\n snap_to_ticks?: boolean;\n ticks?: Record<string, unknown>;\n max_length?: number;\n type:\n | 'hotspot'\n | 'tokenhighlight'\n | 'numberline'\n | 'clozeassociation'\n | 'clozetext'\n | 'association'\n | 'classification'\n | 'clozedropdown'\n | 'clozeformula'\n | 'mcq'\n | 'choicematrix'\n | 'plaintext'\n | 'drawing';\n case_sensitive?: boolean;\n show_copy?: boolean;\n show_cut?: boolean;\n show_paste?: boolean;\n spellcheck?: boolean;\n stimulus?: string;\n stimulus_review?: string;\n stimulus_list?: string[];\n image?: Record<string, unknown>;\n areas?: unknown[];\n area_attributes?: Record<string, unknown>;\n possible_responses?: string[][] | string[];\n duplicate_responses?: boolean;\n response_containers?: unknown[];\n options?: Record<string, unknown>[] | string[];\n feedback_attempts?: number;\n stems?: string[];\n multiple_responses?: boolean;\n}\n\nexport interface ILearnosityItem {\n reference: string;\n questions: ILearnosityQuestion[];\n source: Record<string, unknown>;\n content: string;\n metadata: Record<string, unknown> | unknown[];\n workflow: unknown[];\n response_ids: string[];\n feature_ids: unknown[];\n features: unknown[];\n itemType?: TItemType;\n tags?: string[];\n}\n\nexport interface IWorksheetQuestion extends ILearnosityQuestion {\n item_reference: string;\n item_type?: TItemType;\n section_name?: TSectionName;\n is_optional?: boolean;\n item_tags: string[];\n item_tags_map: Record<string, string>;\n item_number: number;\n item_display_number: number;\n question_number: number;\n total_questions: number;\n}\n\nexport interface ILearnosityQuestionScore {\n score?: number | null;\n max_score: number;\n unscored?: boolean;\n}\n\nexport interface ILearnosityQuestionResponse {\n value: unknown;\n responses?: unknown;\n type: unknown;\n updatedFormat?: boolean;\n wordCount?: number;\n apiVersion: string;\n revision: number;\n feedbackAttemptsCount?: number;\n}\n\nexport interface IAttempt {\n response: ILearnosityQuestionResponse;\n score: ILearnosityQuestionScore;\n}\n\ninterface ITeacherReview {\n reviewComment?: string;\n images?: string[];\n}\nexport interface IWorksheetResponse {\n widgetReference: string;\n itemReference: string;\n itemPosition: number; // 0 based\n questionPosition: number; // 0 based\n isOkayTypeQuestion: boolean;\n response?: ILearnosityQuestionResponse;\n simState?: Record<string, unknown>;\n score?: ILearnosityQuestionScore;\n responseEdited?: boolean;\n hintsUsed?: number;\n markedForReview?: boolean;\n attemptsHistory?: IAttempt[];\n validatedByTeacher?: boolean;\n submittedByStudent?: boolean;\n assignStatus?: 'assigned' | 'skipped';\n rating?: number;\n skipped?: boolean;\n doubtResolved?: boolean;\n teacherReview?: ITeacherReview;\n tags?: Record<string, string>;\n timeSpent?: number;\n}\n\ntype TMathRenderer = 'mathjax' | 'mathquill';\nexport interface ILearnosity {\n ready: () => void;\n questions: () => Record<string, unknown>;\n question: (responseId: string) =>\n | {\n enable: () => boolean;\n disable: () => boolean;\n getQuestion: () => ILearnosityQuestion;\n getMetadata: () => ILearnosityQuestionMetadata;\n getResponse: () => ILearnosityQuestionResponse;\n getScore: (\n callback?: (score: ILearnosityQuestionScore | null) => void,\n ) => ILearnosityQuestionScore;\n validate: (\n options?: { showCorrectAnswers?: boolean; feedbackAttempts?: boolean },\n callback?: () => void,\n ) => void;\n resetValidationUI: () => void;\n on: (eventName: 'changed', callback: () => void) => void;\n off: (eventName: 'changed', callback?: () => void) => void;\n }\n | undefined;\n append: (toAppend: {\n questions: ILearnosityQuestion[];\n responses?: Record<string, unknown>;\n }) => void;\n appendQuestion: (toAppend: {\n questions: ILearnosityQuestion[];\n responses?: Record<string, unknown>;\n }) => void;\n reset: () => void;\n renderMath: (renderer: TMathRenderer) => void;\n}\n\nexport interface IWorksheetBehavior {\n /**\n * If true, Opens the worksheet in resume mode.\n * - If false, Opens the worksheet in review mode.\n */\n canAttempt: boolean;\n /**\n * If true, the user can mark the question for review.\n */\n canMarkForReview: boolean;\n /**\n * The mode of navigation for the worksheet.\n * - `OPEN` mode allows the user to navigate to any question in the worksheet.\n * - `LINEAR` mode allows the user to navigate to the next question only.\n * - `ADAPTIVE` mode allows the user to navigate future questions based on the rating of the current question.\n * - `CURRENT` mode allows the user to navigate to the current question only. Back and forth not allowed.\n */\n navigationMode: 'OPEN' | 'LINEAR' | 'ADAPTIVE' | 'CURRENT';\n /**\n * The initial question to display when the worksheet is loaded.\n * - `FIRST` mode displays the first question in the worksheet.\n * - `CURRENT` mode displays the question that the user was last on.\n */\n initialQuestion: 'FIRST' | 'CURRENT';\n /**\n * If hints are available, on clicking the help button, first availble hint will be shown.\n * Clicking again will show the next hint.\n * If no more hints are available, onHelp will be called.\n */\n hints: boolean;\n /**\n * The time in seconds after which the hints button will be shown.\n */\n hintsTimer?: number; // in seconds\n /**\n * If true, the user can skip the question without attempting it.\n * Skip button will be shown only after the hints are exausted and skipTimer is reached.\n */\n skippable?: boolean;\n /**\n * The time in seconds after which the user can skip the question.\n */\n skippableTime?: number; // in seconds\n /**\n * If true, teacher validation is needed for the question to proceed\n */\n teacherValidationEnabled: boolean;\n /**\n * If worksheet is attempting outside the class setting\n */\n canTeacherValidate: boolean;\n /**\n * If true, questions will be validated and feedback will be shown.\n */\n validation: boolean;\n /**\n * If true, questions will be validated and feedback will be shown along with the correct answer.\n */\n solutionHidden?: boolean;\n /**\n * If true, solution will be hidden.\n */\n review: boolean;\n /**\n * The maximum number of attempts allowed for each question.\n * 0 means unlimited attempts.\n * -1 means attempts will not be validated, hence not pushed to attempt history.\n * After reaching the maximum number of attempts, the user cannot attempt the question anymore.\n * If maxAtttmpts reached and canExceedAttempts is true, the user can still attempt the question\n * , also user will have the option to move to next question\n */\n maximumAttempts: number;\n /**\n * If true, the user can exceed the maximum number of attempts.\n */\n canExceedAttempts: boolean;\n /**\n * If the worksheet minimumAccuracy is not met, on clicking the final submit button, onMinimumAccuracyNotMet will be called.\n */\n minimumAccuracy: number;\n /**\n * Label for the check button\n * For example,\n * - \"Check\" for Checking the answer\n * - \"Submit\" for Submitting the answer when doing assessment\n */\n checkButtonLabel: string;\n /**\n * If attempt is incorrect, we show retry button, this is the label for the retry button\n * For example,\n * - 'Try Again' for retrying the question\n */\n retryButtonLabel: string;\n /**\n * If true show demos calculator https://www.desmos.com/calculator\n */\n canShowDesmosCalc: boolean;\n /**\n * If true, the user can unassign the sheet.\n */\n canUnAssign?: boolean;\n /**\n * If true, cta specific to puzzles will be shown\n */\n showPuzzleCta?: boolean;\n}\n\nexport type TWORKSHHET_QUESTION_MEDIA_TYPE = 'SIMULATION' | 'VIDEO' | 'AUDIO';\n\nexport interface IWorksheetCallbackProps {\n onResponseChange?: (options: {\n responseId: string;\n response: IWorksheetResponse;\n isNewAttempt: boolean;\n question: IWorksheetQuestion;\n }) => void;\n onBulkResponsesChange?: (responses: Record<string, IWorksheetResponse>) => void;\n onResponsesChange?: (responses: Record<string, IWorksheetResponse>) => void;\n onMediaStateChange?: (\n question: IWorksheetQuestion,\n mediaType: TWORKSHHET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n onTeacherValidation?: (questionId: string, rating?: keyof typeof QUESTIONS_RATING) => void;\n onOptionalItemAssignment?: (itemType: TItemType) => void;\n onOptionalItemSkip?: (itemType: TItemType) => void;\n onHelp?: (options: { questionId: string; questionNumber: string }) => void;\n onMinimumAccuracyNotMet?: (accuracy: number) => void;\n onExitTicketStart?: () => void;\n onExitTicketSubmit?: () => void;\n onSubmit?: (responses: Record<string, IWorksheetResponse>) => void;\n onUnassign?: () => void;\n loggerRef: MutableRefObject<(eventName: string, data?: Record<string, unknown>) => void>;\n}\n\nexport interface ICueCanvasCallbackProps {\n onPublishStrokes?: TPublish;\n onReceiveStrokes?: TSubscribe;\n}\n\nexport interface ICueCanvasProps {\n initialStrokesData?: Record<string, IActionData[]>;\n isCanvasEnabled: boolean;\n canToggleScribbling?: boolean;\n}\n\nexport interface IPointerSyncCallbackProps {\n onPublishMouseMove?: TPublishMouseMove;\n onSubscribeMouseMove?: TSubscribeMouseMove;\n}\n\nexport interface IWorksheetLayout {\n containerStyle: 'none' | 'card';\n navigationBar: 'none' | 'top' | 'bottom';\n actionBar: 'none' | 'bottom';\n containerWidth: string;\n topOffset: number; // Offset from the top of the screen, for eg: height of the header\n questionsScrollable: boolean;\n minQuestionHeight: string | number;\n minSummaryHeight: string | number;\n renderSideBar: boolean;\n showUserPointer?: boolean;\n renderQuestionHeader?: boolean;\n renderSheetHeader?: boolean;\n imageHue?: THueNames;\n}\n\nexport interface ISubjectiveSheetProps {\n onAddReviewComment?: (\n responseId: string,\n commentData: {\n score: ILearnosityQuestionScore;\n teacherReview: ITeacherReview;\n },\n ) => void;\n openImagesReviewModal?: (props: IOpenImageReviewModalProps) => void;\n handleReviewSubmit?: () => void;\n isSubmittingReview?: boolean;\n isReviewPending?: boolean;\n}\n\ninterface IBaseWorksheetProps {\n userType: TUserTypes;\n userId: string;\n studentId: string;\n studentName?: string;\n worksheetName: string;\n background?: 'none' | 'paper';\n layout: IWorksheetLayout;\n behavior: IWorksheetBehavior;\n initialResponseId?: string;\n initialItemIndex?: number;\n updatedResponses?: Record<string, IWorksheetResponse>;\n worksheetCompleted: boolean;\n showNudgeBanner?: boolean;\n markedAsCompleted?: boolean;\n onResolveDoubt?: (responseId: string) => void;\n onActiveQuestionChange?: (question: IWorksheetQuestion) => void;\n canResolveDoubt?: boolean;\n onSkip?: (itemIndex: number, widgetIndex: number) => void;\n canShowActionBar?: boolean;\n}\n\nexport interface IWorksheetProps\n extends IBaseWorksheetProps,\n IWorksheetCallbackProps,\n ICueCanvasProps,\n ICueCanvasCallbackProps,\n IPointerSyncCallbackProps {\n learnosityActivityRef?: string;\n learnosityItems: ILearnosityItem[];\n learnosityResponses?: Record<string, IWorksheetResponse>;\n learnosity: ILearnosity;\n appendedQuestionIds: string[];\n questionsSignedRequest: string;\n openQuestionFeedbackModal?: (itemRef: string) => void;\n summaryDescription?: ReactElement | null;\n canSubmitWorksheet?: boolean;\n studentId: string;\n attemptId?: string;\n subjectiveProps?: ISubjectiveSheetProps;\n}\n\nexport interface IUpdateImages {\n filteredImages: string[];\n newImages: IFile[];\n}\nexport interface IOpenImageReviewModalProps {\n isReviewed?: boolean;\n disableScoreForm?: boolean;\n imageUrls?: string[];\n filteredImageUrls?: (props: IUpdateImages) => void;\n uploadedImages?: (IFile | string)[];\n image?: string;\n}\n\nexport interface IWorksheetContainerProps\n extends IBaseWorksheetProps,\n IWorksheetCallbackProps,\n ICueCanvasProps,\n ICueCanvasCallbackProps,\n IPointerSyncCallbackProps {\n studentId: string;\n attemptId?: string;\n itemsSignedRequest: string;\n questionsSignedRequest: string;\n onLoaded: () => void;\n onErrored: (error: { code?: number; message: string }) => void;\n onResponsesLoaded?: (responses: Record<string, IWorksheetResponse>) => void;\n openQuestionFeedbackModal?: (itemRef: string) => void;\n summaryDescription?: ReactElement | null;\n canSubmitWorksheet?: boolean;\n subjectiveProps?: ISubjectiveSheetProps;\n}\n\nexport interface IWorksheetRef {\n validateQuestion: (\n responseId: string,\n rating?: keyof typeof QUESTIONS_RATING,\n skipRemainingQuestions?: boolean,\n ) => void;\n assignOptionalItems: (itemType: TItemType) => void;\n skipOptionalItems: (itemType: TItemType) => void;\n updateMediaState: (\n responseId: string,\n mediaType: TWORKSHHET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n}\n\ninterface IWorksheetHeaderLayoutArgs {\n isPuzzleWorksheet?: boolean;\n isTestWorksheet?: boolean;\n imageHue?: THueNames;\n}\n\nexport interface IWorksheetHeaderLayoutProps {\n (args: IWorksheetHeaderLayoutArgs): {\n bgColor: TColorNames;\n borderColor?: TColorNames;\n };\n}\n"],"names":["QUESTION_TAGS","QUESTIONS_RATING"],"mappings":"AAMY,IAAAA,sBAAAA,OACVA,EAAA,cAAc,eACdA,EAAA,gBAAgB,iBAFNA,IAAAA,KAAA,CAAA,CAAA,GAKAC,sBAAAA,OACVA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KACAA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KACAA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KAHUA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"worksheet-types.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-types.ts"],"sourcesContent":["import type { IActionData, TPublish, TSubscribe } from '../../cue-canvas/types/cue-canvas';\nimport type { TPublishMouseMove, TSubscribeMouseMove } from '../../pointer-sync/pointer-types';\nimport type { TColorNames, THueNames, TUserTypes } from '../../ui/types';\nimport type { IFile } from './worksheet-question/subjective-review';\nimport type { MutableRefObject, ReactElement } from 'react';\n\nexport enum QUESTION_TAGS {\n TRIAL_TOPIC = 'trial-topic',\n QUESTION_CODE = 'question code',\n}\n\nexport enum QUESTIONS_RATING {\n E = 3,\n S = 2, // Just right\n H = 1,\n}\n\nexport interface ILearnosityError {\n code: number;\n consumerKey: string;\n detail: string;\n errorUI: string;\n msg: string;\n}\n\ninterface ILearnosityQuestionMetadata {\n widget_reference: string;\n sheet_reference: string;\n hints?: string[];\n solution?: string[];\n teacher_tips?: string[];\n valid_response_count: number;\n source: {\n organisation_id: number;\n };\n}\n\nexport type TInstructorStimulus =\n | 'SystemIntro' // lesson v3\n | 'Intro' // lesson v3\n | 'Concept-Intro' // lesson v3\n | 'Instruction' // lesson v3\n | 'Task' // lesson v3\n | 'Try' // trial v3\n | 'Learn' // trial v3\n | 'Apply'; // trial v3\nexport type TItemType =\n | 'overview'\n | 'learning-we-do'\n | 'learning-your-turn'\n | 'learning-explore'\n | 'practice-basic'\n | 'practice-basic-optional'\n | 'practice-regular'\n | 'practice-regular-optional'\n | 'exit-ticket'\n | 'advanced-we-do'\n | 'advanced-your-turn'\n | 'advanced-explore'\n | 'advanced-practice';\n\nexport type TSectionName =\n | 'overview'\n | 'learning'\n | 'practice-basic'\n | 'practice-regular'\n | 'exit-ticket'\n | 'advanced';\n\nexport interface IQuestionValidResponse {\n score: number;\n value: unknown[];\n}\n\nexport interface ISheetNudgeBannerInfo {\n bannerBackgroundColor: TColorNames;\n label: string;\n}\n\nexport interface ILearnosityQuestion {\n response_id: string;\n instructor_stimulus?: TInstructorStimulus;\n metadata: ILearnosityQuestionMetadata;\n instant_feedback?: boolean;\n math_renderer?: string;\n template?: string;\n tokenization?: string;\n numberPad?: string[];\n symbols?: unknown[];\n response_container?: Record<string, unknown>;\n ui_style?: Record<string, unknown>;\n shuffle_options?: boolean;\n // for custom type question validation is undefined.\n validation?: {\n scoring_type?: string;\n unscored?: boolean;\n valid_response?: IQuestionValidResponse;\n alt_responses?: IQuestionValidResponse[];\n penalty?: number;\n min_score_if_attempted?: number;\n };\n is_math?: boolean;\n labels?: Record<string, unknown>;\n line?: Record<string, unknown>;\n points?: string[];\n snap_to_ticks?: boolean;\n ticks?: Record<string, unknown>;\n max_length?: number;\n type:\n | 'hotspot'\n | 'tokenhighlight'\n | 'numberline'\n | 'clozeassociation'\n | 'clozetext'\n | 'association'\n | 'classification'\n | 'clozedropdown'\n | 'clozeformula'\n | 'mcq'\n | 'choicematrix'\n | 'plaintext'\n | 'drawing';\n case_sensitive?: boolean;\n show_copy?: boolean;\n show_cut?: boolean;\n show_paste?: boolean;\n spellcheck?: boolean;\n stimulus?: string;\n stimulus_review?: string;\n stimulus_list?: string[];\n image?: Record<string, unknown>;\n areas?: unknown[];\n area_attributes?: Record<string, unknown>;\n possible_responses?: string[][] | string[];\n duplicate_responses?: boolean;\n response_containers?: unknown[];\n options?: Record<string, unknown>[] | string[];\n feedback_attempts?: number;\n stems?: string[];\n multiple_responses?: boolean;\n}\n\nexport interface ILearnosityItem {\n reference: string;\n questions: ILearnosityQuestion[];\n source: Record<string, unknown>;\n content: string;\n metadata: Record<string, unknown> | unknown[];\n workflow: unknown[];\n response_ids: string[];\n feature_ids: unknown[];\n features: unknown[];\n itemType?: TItemType;\n tags?: string[];\n}\n\nexport interface IWorksheetQuestion extends ILearnosityQuestion {\n item_reference: string;\n item_type?: TItemType;\n section_name?: TSectionName;\n is_optional?: boolean;\n item_tags: string[];\n item_tags_map: Record<string, string>;\n item_number: number;\n item_display_number: number;\n question_number: number;\n total_questions: number;\n}\n\nexport interface ILearnosityQuestionScore {\n score?: number | null;\n max_score: number;\n unscored?: boolean;\n}\n\nexport interface ILearnosityQuestionResponse {\n value: unknown;\n responses?: unknown;\n type: unknown;\n updatedFormat?: boolean;\n wordCount?: number;\n apiVersion: string;\n revision: number;\n feedbackAttemptsCount?: number;\n}\n\nexport interface IAttempt {\n response: ILearnosityQuestionResponse;\n score: ILearnosityQuestionScore;\n}\n\ninterface ITeacherReview {\n reviewComment?: string;\n images?: string[];\n}\nexport interface IWorksheetResponse {\n widgetReference: string;\n itemReference: string;\n itemPosition: number; // 0 based\n questionPosition: number; // 0 based\n isOkayTypeQuestion: boolean;\n response?: ILearnosityQuestionResponse;\n simState?: Record<string, unknown>;\n score?: ILearnosityQuestionScore;\n responseEdited?: boolean;\n hintsUsed?: number;\n markedForReview?: boolean;\n attemptsHistory?: IAttempt[];\n validatedByTeacher?: boolean;\n submittedByStudent?: boolean;\n assignStatus?: 'assigned' | 'skipped';\n rating?: number;\n skipped?: boolean;\n doubtResolved?: boolean;\n teacherReview?: ITeacherReview;\n tags?: Record<string, string>;\n timeSpent?: number;\n}\n\ntype TMathRenderer = 'mathjax' | 'mathquill';\nexport interface ILearnosity {\n ready: () => void;\n questions: () => Record<string, unknown>;\n question: (responseId: string) =>\n | {\n enable: () => boolean;\n disable: () => boolean;\n getQuestion: () => ILearnosityQuestion;\n getMetadata: () => ILearnosityQuestionMetadata;\n getResponse: () => ILearnosityQuestionResponse;\n getScore: (\n callback?: (score: ILearnosityQuestionScore | null) => void,\n ) => ILearnosityQuestionScore;\n validate: (\n options?: { showCorrectAnswers?: boolean; feedbackAttempts?: boolean },\n callback?: () => void,\n ) => void;\n resetValidationUI: () => void;\n on: (eventName: 'changed', callback: () => void) => void;\n off: (eventName: 'changed', callback?: () => void) => void;\n }\n | undefined;\n append: (toAppend: {\n questions: ILearnosityQuestion[];\n responses?: Record<string, unknown>;\n }) => void;\n appendQuestion: (toAppend: {\n questions: ILearnosityQuestion[];\n responses?: Record<string, unknown>;\n }) => void;\n reset: () => void;\n renderMath: (renderer: TMathRenderer) => void;\n}\n\nexport interface IWorksheetBehavior {\n /**\n * If true, Opens the worksheet in resume mode.\n * - If false, Opens the worksheet in review mode.\n */\n canAttempt: boolean;\n /**\n * If true, the user can mark the question for review.\n */\n canMarkForReview: boolean;\n /**\n * The mode of navigation for the worksheet.\n * - `OPEN` mode allows the user to navigate to any question in the worksheet.\n * - `LINEAR` mode allows the user to navigate to the next question only.\n * - `ADAPTIVE` mode allows the user to navigate future questions based on the rating of the current question.\n * - `CURRENT` mode allows the user to navigate to the current question only. Back and forth not allowed.\n */\n navigationMode: 'OPEN' | 'LINEAR' | 'ADAPTIVE' | 'CURRENT';\n /**\n * The initial question to display when the worksheet is loaded.\n * - `FIRST` mode displays the first question in the worksheet.\n * - `CURRENT` mode displays the question that the user was last on.\n */\n initialQuestion: 'FIRST' | 'CURRENT';\n /**\n * If hints are available, on clicking the help button, first availble hint will be shown.\n * Clicking again will show the next hint.\n * If no more hints are available, onHelp will be called.\n */\n hints: boolean;\n /**\n * The time in seconds after which the hints button will be shown.\n */\n hintsTimer?: number; // in seconds\n /**\n * If true, the user can skip the question without attempting it.\n * Skip button will be shown only after the hints are exausted and skipTimer is reached.\n */\n skippable?: boolean;\n /**\n * The time in seconds after which the user can skip the question.\n */\n skippableTime?: number; // in seconds\n /**\n * If true, teacher validation is needed for the question to proceed\n */\n teacherValidationEnabled: boolean;\n /**\n * If worksheet is attempting outside the class setting\n */\n canTeacherValidate: boolean;\n /**\n * If true, questions will be validated and feedback will be shown.\n */\n validation: boolean;\n /**\n * If true, questions will be validated and feedback will be shown along with the correct answer.\n */\n solutionHidden?: boolean;\n /**\n * If true, solution will be hidden.\n */\n review: boolean;\n /**\n * The maximum number of attempts allowed for each question.\n * 0 means unlimited attempts.\n * -1 means attempts will not be validated, hence not pushed to attempt history.\n * After reaching the maximum number of attempts, the user cannot attempt the question anymore.\n * If maxAtttmpts reached and canExceedAttempts is true, the user can still attempt the question\n * , also user will have the option to move to next question\n */\n maximumAttempts: number;\n /**\n * If true, the user can exceed the maximum number of attempts.\n */\n canExceedAttempts: boolean;\n /**\n * If the worksheet minimumAccuracy is not met, on clicking the final submit button, onMinimumAccuracyNotMet will be called.\n */\n minimumAccuracy: number;\n /**\n * Label for the check button\n * For example,\n * - \"Check\" for Checking the answer\n * - \"Submit\" for Submitting the answer when doing assessment\n */\n checkButtonLabel: string;\n /**\n * If attempt is incorrect, we show retry button, this is the label for the retry button\n * For example,\n * - 'Try Again' for retrying the question\n */\n retryButtonLabel: string;\n /**\n * If true show demos calculator https://www.desmos.com/calculator\n */\n canShowDesmosCalc: boolean;\n /**\n * If true, the user can unassign the sheet.\n */\n canUnAssign?: boolean;\n /**\n * If true, cta specific to puzzles will be shown\n */\n showPuzzleCta?: boolean;\n}\n\nexport type TWORKSHHET_QUESTION_MEDIA_TYPE = 'SIMULATION' | 'VIDEO' | 'AUDIO';\n\nexport interface IWorksheetCallbackProps {\n onResponseChange?: (options: {\n responseId: string;\n response: IWorksheetResponse;\n isNewAttempt: boolean;\n question: IWorksheetQuestion;\n }) => void;\n onBulkResponsesChange?: (responses: Record<string, IWorksheetResponse>) => void;\n onResponsesChange?: (responses: Record<string, IWorksheetResponse>) => void;\n onMediaStateChange?: (\n question: IWorksheetQuestion,\n mediaType: TWORKSHHET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n onTeacherValidation?: (questionId: string, rating?: keyof typeof QUESTIONS_RATING) => void;\n onOptionalItemAssignment?: (itemType: TItemType) => void;\n onOptionalItemSkip?: (itemType: TItemType) => void;\n onHelp?: (options: { questionId: string; questionNumber: string }) => void;\n onMinimumAccuracyNotMet?: (accuracy: number) => void;\n onExitTicketStart?: () => void;\n onExitTicketSubmit?: () => void;\n onSubmit?: (responses: Record<string, IWorksheetResponse>) => void;\n onUnassign?: () => void;\n loggerRef: MutableRefObject<(eventName: string, data?: Record<string, unknown>) => void>;\n}\n\nexport interface ICueCanvasCallbackProps {\n onPublishStrokes?: TPublish;\n onReceiveStrokes?: TSubscribe;\n}\n\nexport interface ICueCanvasProps {\n initialStrokesData?: Record<string, IActionData[]>;\n isCanvasEnabled: boolean;\n canToggleScribbling?: boolean;\n}\n\nexport interface IPointerSyncCallbackProps {\n onPublishMouseMove?: TPublishMouseMove;\n onSubscribeMouseMove?: TSubscribeMouseMove;\n}\n\nexport interface IWorksheetLayout {\n containerStyle: 'none' | 'card';\n navigationBar: 'none' | 'top' | 'bottom';\n actionBar: 'none' | 'bottom';\n containerWidth: string;\n topOffset: number; // Offset from the top of the screen, for eg: height of the header\n questionsScrollable: boolean;\n minQuestionHeight: string | number;\n minSummaryHeight: string | number;\n renderSideBar: boolean;\n showUserPointer?: boolean;\n renderQuestionHeader?: boolean;\n renderSheetHeader?: boolean;\n imageHue?: THueNames;\n renderQuestionFeedback?: boolean;\n}\n\nexport interface ISubjectiveSheetProps {\n onAddReviewComment?: (\n responseId: string,\n commentData: {\n score: ILearnosityQuestionScore;\n teacherReview: ITeacherReview;\n },\n ) => void;\n openImagesReviewModal?: (props: IOpenImageReviewModalProps) => void;\n handleReviewSubmit?: () => void;\n isSubmittingReview?: boolean;\n isReviewPending?: boolean;\n}\n\ninterface IBaseWorksheetProps {\n userType: TUserTypes;\n userId: string;\n studentId: string;\n studentName?: string;\n worksheetName: string;\n background?: 'none' | 'paper';\n layout: IWorksheetLayout;\n behavior: IWorksheetBehavior;\n initialResponseId?: string;\n initialItemIndex?: number;\n updatedResponses?: Record<string, IWorksheetResponse>;\n worksheetCompleted: boolean;\n showNudgeBanner?: boolean;\n markedAsCompleted?: boolean;\n onResolveDoubt?: (responseId: string) => void;\n onActiveQuestionChange?: (question: IWorksheetQuestion) => void;\n canResolveDoubt?: boolean;\n onSkip?: (itemIndex: number, widgetIndex: number) => void;\n canShowActionBar?: boolean;\n}\n\nexport interface IWorksheetProps\n extends IBaseWorksheetProps,\n IWorksheetCallbackProps,\n ICueCanvasProps,\n ICueCanvasCallbackProps,\n IPointerSyncCallbackProps {\n learnosityActivityRef?: string;\n learnosityItems: ILearnosityItem[];\n learnosityResponses?: Record<string, IWorksheetResponse>;\n learnosity: ILearnosity;\n appendedQuestionIds: string[];\n questionsSignedRequest: string;\n openQuestionFeedbackModal?: (itemRef: string) => void;\n summaryDescription?: ReactElement | null;\n canSubmitWorksheet?: boolean;\n studentId: string;\n attemptId?: string;\n subjectiveProps?: ISubjectiveSheetProps;\n}\n\nexport interface IUpdateImages {\n filteredImages: string[];\n newImages: IFile[];\n}\nexport interface IOpenImageReviewModalProps {\n isReviewed?: boolean;\n disableScoreForm?: boolean;\n imageUrls?: string[];\n filteredImageUrls?: (props: IUpdateImages) => void;\n uploadedImages?: (IFile | string)[];\n image?: string;\n}\n\nexport interface IWorksheetContainerProps\n extends IBaseWorksheetProps,\n IWorksheetCallbackProps,\n ICueCanvasProps,\n ICueCanvasCallbackProps,\n IPointerSyncCallbackProps {\n studentId: string;\n attemptId?: string;\n itemsSignedRequest: string;\n questionsSignedRequest: string;\n onLoaded: () => void;\n onErrored: (error: { code?: number; message: string }) => void;\n onResponsesLoaded?: (responses: Record<string, IWorksheetResponse>) => void;\n openQuestionFeedbackModal?: (itemRef: string) => void;\n summaryDescription?: ReactElement | null;\n canSubmitWorksheet?: boolean;\n subjectiveProps?: ISubjectiveSheetProps;\n}\n\nexport interface IWorksheetRef {\n validateQuestion: (\n responseId: string,\n rating?: keyof typeof QUESTIONS_RATING,\n skipRemainingQuestions?: boolean,\n ) => void;\n assignOptionalItems: (itemType: TItemType) => void;\n skipOptionalItems: (itemType: TItemType) => void;\n updateMediaState: (\n responseId: string,\n mediaType: TWORKSHHET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n}\n\ninterface IWorksheetHeaderLayoutArgs {\n isPuzzleWorksheet?: boolean;\n isTestWorksheet?: boolean;\n imageHue?: THueNames;\n}\n\nexport interface IWorksheetHeaderLayoutProps {\n (args: IWorksheetHeaderLayoutArgs): {\n bgColor: TColorNames;\n borderColor?: TColorNames;\n };\n}\n"],"names":["QUESTION_TAGS","QUESTIONS_RATING"],"mappings":"AAMY,IAAAA,sBAAAA,OACVA,EAAA,cAAc,eACdA,EAAA,gBAAgB,iBAFNA,IAAAA,KAAA,CAAA,CAAA,GAKAC,sBAAAA,OACVA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KACAA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KACAA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KAHUA,IAAAA,KAAA,CAAA,CAAA;"}
|