87574.js.map 50 KB

1
  1. {"version":3,"file":"87574.js","mappings":";;;;;;;;;;;;;AAAA;AACA,sBAAsB,wEAAwE,gBAAgB,sBAAsB,OAAO,sBAAsB,oBAAoB,gDAAgD,WAAW;AACjN;AAC/B;AACA,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA,GAAG,yCAAyC,gDAAmB;AAC/D;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,iEAAe,QAAQ;;;;;;;;;;;;;ACjBvB;AACA,sBAAsB,wEAAwE,gBAAgB,sBAAsB,OAAO,sBAAsB,oBAAoB,gDAAgD,WAAW;AACjN;AAC/B;AACA,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA,GAAG,yCAAyC,gDAAmB;AAC/D;AACA;AACA,GAAG;AACH;AACA,iEAAe,OAAO;;;;;;;ACftB;AACA;AACA;AACA;;;;;;;;ACHA;AACA;AACA;AACA;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACRA;AAA0B;AAE1B,MAAMC,aAAa,GAAG,IAAM;IAC1B,qBAAO,mDAACC,MAAI;kBAAE,CAAC,EAAE,CAAC;MAAQ,CAAC;AAC7B,CAAC;AAED,iEAAeD,aAAa,EAAC;;;;;;;;;;;;;;;;;;ACN7B;AAA0B;AAE0B;AAMpD,MAAMG,gBAAgB,GAAoB,CAAC,EAAEC,QAAQ,GAAE,GAAK;IAC1D,qBAAO,mDAACC,KAAG;QAACC,SAAS,EAAEJ,gFAAgB;kBAAGE,QAAQ;MAAO,CAAC;AAC5D,CAAC;AAED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,EAAE;IACjC,MAAMtM,yBAAyB,GAAGqM,kDAAW,CAC3C,CAACkB,GAAQ,EAAEZ,QAAyB,GAAK;QACvCF,MAAM,CAACc,GAAG,EAAEZ,QAAQ,EAAEJ,+BAA+B,CAAC,CAAC;IACzD,CAAC,EACD;QAACE,MAAM;KAAC,CACT;IACD,OAAOzM,yBAAyB,CAAC;AACnC,CAAC;AAED,iEAAef,4BAA4B,EAAC;;;;;;;;;;;;;;ACtB5C,kBAMC;UANIC,cAAc;IAAdA,cAAc,CACjBsO,cAAY,IAAG,eAAe;IAD3BtO,cAAc,CAEjBsC,eAAa,IAAG,gBAAgB;IAF7BtC,cAAc,CAGjBwI,cAAY,IAAG,eAAe;IAH3BxI,cAAc,CAIjByC,eAAa,IAAG,gBAAgB;IAJ7BzC,cAAc,CAKjBuO,eAAa,IAAG,gBAAgB;GAL7BvO,cAAc,KAAdA,cAAc;AAQnB,iEAAeA,cAAc,EAAC","sources":["webpack://quran.com/./public/icons/close.svg","webpack://quran.com/./public/icons/west.svg","webpack://quran.com/./src/components/Course/ContentContainer/ContentContainer.module.scss","webpack://quran.com/./src/components/Course/CourseFeedback/CourseFeedback.module.scss","webpack://quran.com/./src/components/Course/CourseFeedback/CourseFeedbackForm/CourseFeedbackForm.module.scss","webpack://quran.com/./src/components/Course/CourseFeedback/CourseFeedbackModal/CourseFeedbackModal.module.scss","webpack://quran.com/./src/components/MarkdownEditor/MarkdownEditor.module.scss","webpack://quran.com/./src/components/PageContainer/PageContainer.module.scss","webpack://quran.com/./src/components/dls/ContentModal/ContentModal.module.scss","webpack://quran.com/./src/pages/index.module.scss","webpack://quran.com/./src/components/Course/CompletedTick/index.tsx","webpack://quran.com/./src/components/Course/ContentContainer/index.tsx","webpack://quran.com/./src/components/Course/CourseFeedback/CourseFeedbackForm/index.tsx","webpack://quran.com/./src/components/Course/CourseFeedback/CourseFeedbackModal/index.tsx","webpack://quran.com/./src/components/Course/CourseFeedback/index.tsx","webpack://quran.com/./src/components/Course/utils/mutations.ts","webpack://quran.com/./src/components/FormBuilder/buildFormBuilderFormField.ts","webpack://quran.com/./src/components/FormBuilder/buildTranslatedErrorMessageByErrorId.ts","webpack://quran.com/./src/components/MarkdownEditor/index.tsx","webpack://quran.com/./src/components/PageContainer/index.tsx","webpack://quran.com/./src/components/dls/ContentModal/ContentModal.tsx","webpack://quran.com/./src/hooks/useMutateMultipleKeys.ts","webpack://quran.com/./src/hooks/useMutateWithoutRevalidation.ts","webpack://quran.com/./types/ErrorMessageId.ts"],"sourcesContent":["var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgClose = function SvgClose(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 15 15\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M11.782 4.032a.575.575 0 1 0-.813-.814L7.5 6.687 4.032 3.218a.575.575 0 0 0-.814.814L6.687 7.5l-3.469 3.468a.575.575 0 0 0 .814.814L7.5 8.313l3.469 3.469a.575.575 0 0 0 .813-.814L8.313 7.5l3.469-3.468Z\",\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n })));\n};\nexport default SvgClose;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgWest = function SvgWest(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m9 19 1.41-1.41L5.83 13H22v-2H5.83l4.59-4.59L9 5l-7 7 7 7Z\",\n fill: \"currentColor\"\n })));\n};\nexport default SvgWest;","// Exports\nmodule.exports = {\n\t\"container\": \"ContentContainer_container__s7dX2\"\n};\n","// Exports\nmodule.exports = {\n\t\"container\": \"CourseFeedback_container__iBDGv\"\n};\n","// Exports\nmodule.exports = {\n\t\"bodyInput\": \"CourseFeedbackForm_bodyInput__0TtN_\",\n\t\"submitButton\": \"CourseFeedbackForm_submitButton__vLdJc\",\n\t\"ratingContainer\": \"CourseFeedbackForm_ratingContainer__AF_0R\"\n};\n","// Exports\nmodule.exports = {\n\t\"headerContainer\": \"CourseFeedbackModal_headerContainer__pubww\",\n\t\"desc\": \"CourseFeedbackModal_desc__UebUq\"\n};\n","// Exports\nmodule.exports = {\n\t\"editor\": \"MarkdownEditor_editor__yKRsX\",\n\t\"content\": \"MarkdownEditor_content__4M3H4\"\n};\n","// Exports\nmodule.exports = {\n\t\"container\": \"PageContainer_container__1TUET\",\n\t\"fullWidth\": \"PageContainer_fullWidth__RU5GM\"\n};\n","// Exports\nmodule.exports = {\n\t\"modalContainer\": \"ContentModal_modalContainer__i7bo0\",\n\t\"contentContainer\": \"ContentModal_contentContainer___ciX5\",\n\t\"overlay\": \"ContentModal_overlay__qZfQY\",\n\t\"contentWrapper\": \"ContentModal_contentWrapper__VaiRB\",\n\t\"autoHeight\": \"ContentModal_autoHeight__A3IW7\",\n\t\"medium\": \"ContentModal_medium__EKB5h\",\n\t\"small\": \"ContentModal_small__YBKtM\",\n\t\"fadeIn\": \"ContentModal_fadeIn__JGh_A\",\n\t\"fadeOut\": \"ContentModal_fadeOut__36m_B\",\n\t\"contentIn\": \"ContentModal_contentIn__EAwQw\",\n\t\"contentOut\": \"ContentModal_contentOut__2x8WN\",\n\t\"closeIcon\": \"ContentModal_closeIcon__xppin\",\n\t\"header\": \"ContentModal_header__384F2\",\n\t\"content\": \"ContentModal_content__9M2Iy\"\n};\n","// Exports\nmodule.exports = {\n\t\"pageContainer\": \"index_pageContainer__Pxtn3\",\n\t\"loadingContainer\": \"index_loadingContainer__WEZFc\",\n\t\"flow\": \"index_flow__rCTR5\",\n\t\"flowItem\": \"index_flowItem__GnXWz\",\n\t\"additionalVerticalGap\": \"index_additionalVerticalGap__nzYz6\",\n\t\"fullWidth\": \"index_fullWidth__1n4ux\"\n};\n","import React from 'react';\n\nconst CompletedTick = () => {\n return <span>{` ✔`}</span>;\n};\n\nexport default CompletedTick;\n","import React from 'react';\n\nimport styles from './ContentContainer.module.scss';\n\ntype Props = {\n children: React.ReactNode;\n};\n\nconst ContentContainer: React.FC<Props> = ({ children }) => {\n return <div className={styles.container}>{children}</div>;\n};\n\nexport default ContentContainer;\n","import React, { useState } from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport styles from './CourseFeedbackForm.module.scss';\n\nimport {\n mutateCachedCourseAfterFeedback,\n mutateCachedLessonsAfterFeedback,\n} from '@/components/Course/utils/mutations';\nimport buildFormBuilderFormField from '@/components/FormBuilder/buildFormBuilderFormField';\nimport buildTranslatedErrorMessageByErrorId from '@/components/FormBuilder/buildTranslatedErrorMessageByErrorId';\nimport FormBuilder from '@/components/FormBuilder/FormBuilder';\nimport Button from '@/dls/Button/Button';\nimport { ToastStatus, useToast } from '@/dls/Toast/Toast';\nimport useMutateMultipleKeys from '@/hooks/useMutateMultipleKeys';\nimport useMutateWithoutRevalidation from '@/hooks/useMutateWithoutRevalidation';\nimport { Course } from '@/types/auth/Course';\nimport ErrorMessageId from '@/types/ErrorMessageId';\nimport { RuleType } from '@/types/FieldRule';\nimport { FormFieldType } from '@/types/FormField';\nimport { postCourseFeedback } from '@/utils/auth/api';\nimport { logFormSubmission } from '@/utils/eventLogger';\n\ntype Props = {\n course: Course;\n onSuccess: () => void;\n};\n\ntype CourseFeedbackFormData = {\n rating: number;\n body?: string;\n};\n\nconst BODY_MAX_VALIDATION_PARAMS = {\n value: 10000,\n};\n\nconst CourseFeedbackForm: React.FC<Props> = ({ course, onSuccess }) => {\n const { t } = useTranslation('learn');\n const [isLoading, setIsLoading] = useState(false);\n const toast = useToast();\n const mutateWithoutRevalidation = useMutateWithoutRevalidation();\n const mutateMultipleKeys = useMutateMultipleKeys();\n\n const submitFeedback = async (formData: CourseFeedbackFormData) => {\n setIsLoading(true);\n postCourseFeedback({\n courseId: course.id,\n ...formData,\n })\n .then(() => {\n toast(t('feedback.feedback-success'), {\n status: ToastStatus.Success,\n });\n // update local cache to set userHasFeedback to true\n mutateCachedCourseAfterFeedback(mutateWithoutRevalidation, course.slug);\n mutateCachedLessonsAfterFeedback(mutateMultipleKeys, course.slug);\n onSuccess();\n })\n .catch(() => {\n toast(t('common:error.general'), {\n status: ToastStatus.Error,\n });\n })\n .finally(() => {\n setIsLoading(false);\n });\n };\n\n const onSubmit = async (formData: CourseFeedbackFormData) => {\n logFormSubmission('course_feedback', formData);\n submitFeedback(formData);\n };\n\n return (\n <FormBuilder\n formFields={[\n {\n field: 'rating',\n type: FormFieldType.StarRating,\n // user must pick a rating\n defaultValue: null,\n containerClassName: styles.ratingContainer,\n rules: [\n {\n type: RuleType.Required,\n value: true,\n errorId: ErrorMessageId.RequiredField,\n errorMessage: buildTranslatedErrorMessageByErrorId(\n ErrorMessageId.RequiredField,\n 'rating',\n t,\n ),\n },\n ],\n },\n {\n field: 'body',\n placeholder: t('feedback.feedback-placeholder'),\n rules: [\n {\n ...BODY_MAX_VALIDATION_PARAMS,\n type: RuleType.MaximumLength,\n errorId: ErrorMessageId.MaximumLength,\n errorExtraParams: {\n ...BODY_MAX_VALIDATION_PARAMS,\n },\n errorMessage: buildTranslatedErrorMessageByErrorId(\n ErrorMessageId.MaximumLength,\n 'body',\n t,\n {\n ...BODY_MAX_VALIDATION_PARAMS,\n },\n ),\n },\n ],\n type: FormFieldType.TextArea,\n containerClassName: styles.bodyInput,\n fieldSetLegend: t('feedback.your-feedback'),\n },\n ].map((field) => buildFormBuilderFormField(field, t))}\n onSubmit={onSubmit}\n isSubmitting={isLoading}\n renderAction={({ isLoading: isSubmitting }) => {\n return (\n <div className={styles.submitButton}>\n <Button htmlType=\"submit\" isLoading={isSubmitting} isDisabled={isSubmitting}>\n {t('common:submit')}\n </Button>\n </div>\n );\n }}\n />\n );\n};\n\nexport default CourseFeedbackForm;\n","import { useRef } from 'react';\n\nimport Trans from 'next-translate/Trans';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport CourseFeedbackForm from '../CourseFeedbackForm';\n\nimport styles from './CourseFeedbackModal.module.scss';\n\nimport ContentModal, { ContentModalSize } from '@/dls/ContentModal/ContentModal';\nimport ContentModalHandles from '@/dls/ContentModal/types/ContentModalHandles';\nimport { Course } from '@/types/auth/Course';\nimport { Note } from '@/types/auth/Note';\n\ninterface NoteModalProps {\n isOpen: boolean;\n onClose: () => void;\n course: Course;\n onNoteUpdated?: (data: Note) => void;\n onNoteDeleted?: () => void;\n}\n\nconst CourseFeedbackModal: React.FC<NoteModalProps> = ({ onClose, isOpen, course }) => {\n const { t } = useTranslation('learn');\n const contentModalRef = useRef<ContentModalHandles>();\n\n const { title } = course;\n\n return (\n <ContentModal\n innerRef={contentModalRef}\n isOpen={isOpen}\n header={<div className={styles.headerContainer}>{t('feedback.add-feedback')}</div>}\n hasCloseButton\n onClose={onClose}\n onEscapeKeyDown={onClose}\n size={ContentModalSize.MEDIUM}\n >\n <div className={styles.desc}>\n <Trans\n components={{ br: <br /> }}\n i18nKey=\"learn:feedback.desc\"\n values={{\n courseName: title,\n }}\n />\n </div>\n <CourseFeedbackForm onSuccess={onClose} course={course} />\n </ContentModal>\n );\n};\n\nexport default CourseFeedbackModal;\n","import React, { useEffect, useState } from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport styles from './CourseFeedback.module.scss';\nimport CourseFeedbackModal from './CourseFeedbackModal';\n\nimport Button, { ButtonSize, ButtonType } from '@/dls/Button/Button';\nimport { Course } from '@/types/auth/Course';\nimport { logButtonClick } from '@/utils/eventLogger';\n\ntype Props = {\n course: Course;\n source: FeedbackSource;\n shouldOpenModal?: boolean;\n};\n\nexport enum FeedbackSource {\n CoursePage = 'course_page',\n LessonPage = 'lesson_page',\n}\n\nconst CourseFeedback: React.FC<Props> = ({ source, course, shouldOpenModal = false }) => {\n const { t } = useTranslation('learn');\n const [isModalOpen, setIsModalOpen] = useState(false);\n\n /**\n * listen to changes from the parent component. This will happen when the user\n * completes last lesson of the course.\n */\n useEffect(() => {\n if (shouldOpenModal) {\n setIsModalOpen(true);\n }\n }, [shouldOpenModal]);\n\n const onAddFeedbackClicked = () => {\n logButtonClick('add_course_feedback', {\n source,\n });\n setIsModalOpen(true);\n };\n\n return (\n <div className={styles.container}>\n <Button size={ButtonSize.Small} type={ButtonType.Primary} onClick={onAddFeedbackClicked}>\n {t('feedback.add-feedback')}\n </Button>\n <CourseFeedbackModal\n course={course}\n isOpen={isModalOpen}\n onClose={() => setIsModalOpen(false)}\n />\n </div>\n );\n};\n\nexport default CourseFeedback;\n","import { Course, Lesson } from '@/types/auth/Course';\nimport { makeGetCourseUrl, makeGetLessonUrlPrefix } from '@/utils/auth/apiPaths';\n\n/**\n * Given an ordered list of lessons and a list of completed lessons:\n *\n * – If all of them are completed, return the first\n * - If none of them are completed, return the first\n * - If only some of them are completed, return the 1st uncompleted lesson.\n *\n * @param {Lesson[]} lessons\n *\n * @returns {string}\n */\nexport const getContinueFromLesson = (lessons: Lesson[]): string => {\n if (!lessons) {\n return null;\n }\n const completedLessonIds = lessons\n .filter((lesson) => lesson.isCompleted)\n .map((lesson) => lesson.id);\n const numberOfCompletedLessons = completedLessonIds.length;\n // if no lessons were completed, return the first lesson\n if (numberOfCompletedLessons === 0) {\n return lessons[0].slug;\n }\n // if all lessons were completed, return the first lesson\n if (numberOfCompletedLessons === lessons.length) {\n return lessons[0].slug;\n }\n // 1. make sure the lessons are sorted by day\n const sortedLessons = lessons.sort((a, b) => a.day - b.day);\n // 2. pick first uncompleted lesson\n for (let index = 0; index < sortedLessons.length; index += 1) {\n // if the lessons has not been completed, return in\n if (!completedLessonIds.includes(sortedLessons[index].id)) {\n return sortedLessons[index].slug;\n }\n }\n return null;\n};\n\n/**\n * Given a lessons array and a lesson id, it returns a new lessons array\n * after setting the lesson with the given id set as completed.\n *\n * @param {Lesson[]} lessons\n * @param {string} lessonId\n * @returns {Lesson[]}\n */\nexport const mutateLessonAsCompleted = (lessons: Lesson[], lessonId: string): Lesson[] => {\n const newLessons = [...lessons];\n const lessonIndex = newLessons.findIndex((loopLesson) => loopLesson.id === lessonId);\n // safety check: if the lesson was found in the lessons array, set it as completed\n if (lessonIndex !== -1) {\n newLessons[lessonIndex].isCompleted = true;\n }\n return newLessons;\n};\n\n/**\n * This function receives the cached lesson data and the id of the lesson that was just completed\n * and expects to return the updated lesson data with the lesson marked as completed\n * which will be used to update the local cache without having to call the API again.\n *\n * @param {Lesson} cachedLessonData\n * @param {string} completedLessonId\n * @returns {Lesson}\n */\nexport const getUpdatedLessonDataAfterCompletion = (\n cachedLessonData: Lesson,\n completedLessonId: string,\n): Lesson => {\n if (cachedLessonData) {\n const updatedLessonData = { ...cachedLessonData };\n // only set the completed lesson data to completed\n if (updatedLessonData.id === completedLessonId) {\n updatedLessonData.isCompleted = true;\n }\n // if the lesson has a course, we should update the lessons array of the course\n if (cachedLessonData?.course?.lessons) {\n updatedLessonData.course.lessons = mutateLessonAsCompleted(\n updatedLessonData.course.lessons,\n completedLessonId,\n );\n }\n return updatedLessonData;\n }\n return cachedLessonData;\n};\n\n/**\n * This function receives the cached course data and the id of the lesson that was just completed\n * and expects to return the updated course data with the lesson marked as completed\n * which will be used to update the local cache without having to call the API again.\n *\n * @param {Course} cachedCourseData\n * @param {string} completedLessonId\n * @returns {Course}\n */\nexport const getUpdatedCourseDataAfterCompletion = (\n cachedCourseData: Course,\n completedLessonId: string,\n): Course => {\n if (cachedCourseData) {\n const updatedCourseData = { ...cachedCourseData };\n // if the course has lessons, we should update the lessons array\n if (updatedCourseData?.lessons) {\n const completedLessons = updatedCourseData.lessons.filter(\n (loopLesson) => loopLesson.isCompleted,\n );\n // if we are marking the last un-completed lesson in the course, we should mark the course itself as completed\n if (completedLessons.length + 1 === updatedCourseData.lessons.length) {\n updatedCourseData.isCompleted = true;\n }\n updatedCourseData.lessons = mutateLessonAsCompleted(\n updatedCourseData.lessons,\n completedLessonId,\n );\n updatedCourseData.continueFromLesson = getContinueFromLesson(updatedCourseData.lessons);\n }\n return updatedCourseData;\n }\n return cachedCourseData;\n};\n\n/**\n * we need to update all the cached lessons of the course to set the current lesson as completed\n *\n * @param {any} mutatorFunction\n * @param {string} courseSlug\n * @param {string} completedLessonId\n *\n * @returns {void}\n */\nexport const mutateCachedLessonsAfterCompletion = (\n mutatorFunction: any,\n courseSlug: string,\n completedLessonId: string,\n): void => {\n const courseLessonsUrlRegex = `^${makeGetLessonUrlPrefix(courseSlug)}/.+`;\n mutatorFunction(courseLessonsUrlRegex, (cachedLessonData: Lesson) =>\n getUpdatedLessonDataAfterCompletion(cachedLessonData, completedLessonId),\n );\n};\n\n/**\n * update local cache of the course to set the current lesson as completed in the lessons array\n *\n * @param {any} mutatorFunction\n * @param {string} courseSlug\n * @param {string} completedLessonId\n *\n * @returns {void}\n */\nexport const mutateCachedCourseAfterCompletion = (\n mutatorFunction: any,\n courseSlug: string,\n completedLessonId: string,\n): void => {\n mutatorFunction(makeGetCourseUrl(courseSlug), (cachedCourseData: Course) =>\n getUpdatedCourseDataAfterCompletion(cachedCourseData, completedLessonId),\n );\n};\n\n/**\n * we need to update all the cached lessons of the course to set the current lesson as completed\n *\n * @param {any} mutatorFunction\n * @param {string} courseSlug\n *\n * @returns {void}\n */\nexport const mutateCachedLessonsAfterFeedback = (\n mutatorFunction: any,\n courseSlug: string,\n): void => {\n const courseLessonsUrlRegex = `^${makeGetLessonUrlPrefix(courseSlug)}/.+`;\n mutatorFunction(courseLessonsUrlRegex, (cachedLessonData: Lesson) =>\n getUpdatedLessonDataAfterFeedback(cachedLessonData),\n );\n};\n\n/**\n * update local cache of the course to set the current lesson as completed in the lessons array\n *\n * @param {any} mutatorFunction\n * @param {string} courseSlug\n *\n * @returns {void}\n */\nexport const mutateCachedCourseAfterFeedback = (mutatorFunction: any, courseSlug: string): void => {\n mutatorFunction(makeGetCourseUrl(courseSlug), (cachedCourseData: Course) =>\n getUpdatedCourseDataAfterFeedback(cachedCourseData),\n );\n};\n\n/**\n * This function receives the cached course data and the id of the lesson that was just completed\n * and expects to return the updated course data with the lesson marked as completed\n * which will be used to update the local cache without having to call the API again.\n *\n * @param {Course} cachedCourseData\n * @returns {Course}\n */\nexport const getUpdatedCourseDataAfterFeedback = (cachedCourseData: Course): Course => {\n if (cachedCourseData) {\n const updatedCourseData = { ...cachedCourseData };\n updatedCourseData.userHasFeedback = true;\n return updatedCourseData;\n }\n return cachedCourseData;\n};\n\n/**\n * This function receives the cached lesson data and the id of the lesson that was just completed\n * and expects to return the updated lesson data with the lesson marked as completed\n * which will be used to update the local cache without having to call the API again.\n *\n * @param {Lesson} cachedLessonData\n * @returns {Lesson}\n */\nexport const getUpdatedLessonDataAfterFeedback = (cachedLessonData: Lesson): Lesson => {\n if (cachedLessonData) {\n const updatedLessonData = { ...cachedLessonData };\n // if the lesson has a course, we should update it to userHasFeedback = true\n if (cachedLessonData?.course) {\n updatedLessonData.course = {\n ...updatedLessonData.course,\n userHasFeedback: true,\n };\n }\n return updatedLessonData;\n }\n return cachedLessonData;\n};\n","import capitalize from 'lodash/capitalize';\nimport { Translate } from 'next-translate';\n\nimport { FormBuilderFormField } from './FormBuilderTypes';\n\nimport FormField, { FormFieldType } from 'types/FormField';\n\n/**\n * Transform FormField to be FormBuilderFormField\n *\n * FormField and FormBuilderFormField are the same except, FormBuilderFormField is not tied to errorId and translationId\n * - Previously FormBuilder was tied to common.json, next-translate.\n * - and it's also tied to ErrorMessageId\n * - and the `label` is also less flexible because it's tied to `field` value\n *\n * This function help to transform FormField to FormBuilderFormField for common use case.\n * But when we need a more flexible use case, we can use FormBuilderFormField directly. Without using this helper function\n *\n * check ./FormBuilderTypes.ts for more info\n *\n * Note that this function expect the `t` translate function to be used with `common.json`. And expect `form.$field` and `validation.$errorId` to exist.\n *\n * @param {FormField} formField\n * @returns {FormBuilderFormField} formBuilderFormField\n */\nconst buildFormBuilderFormField = (formField: FormField, t: Translate): FormBuilderFormField => {\n return {\n ...formField,\n ...(formField.rules && {\n rules: formField.rules.map((rule) => ({\n type: rule.type,\n value: rule.value,\n errorMessage: t(`common:validation.${rule.errorId}`, {\n field: capitalize(formField.field),\n ...rule.errorExtraParams,\n }),\n })),\n }),\n ...(formField.label && {\n label:\n formField.type === FormFieldType.Checkbox ? formField.label : t(`form.${formField.label}`),\n }),\n ...(formField.defaultValue && { defaultValue: formField.defaultValue }),\n ...(formField.placeholder && { placeholder: formField.placeholder }),\n };\n};\n\nexport default buildFormBuilderFormField;\n","import capitalize from 'lodash/capitalize';\nimport { Translate } from 'next-translate';\n\nimport ErrorMessageId from 'types/ErrorMessageId';\n\nconst DEFAULT_ERROR_ID = ErrorMessageId.InvalidField;\n\nconst buildTranslatedErrorMessageByErrorId = (\n errorId: ErrorMessageId,\n fieldName: string,\n t: Translate,\n extraParams?: Record<string, unknown>,\n) => {\n if (Object.values(ErrorMessageId).includes(errorId)) {\n return t(`common:validation.${errorId}`, { field: capitalize(fieldName), ...extraParams });\n }\n return t(`common:validation.${DEFAULT_ERROR_ID}`, { field: capitalize(fieldName) });\n};\n\nexport default buildTranslatedErrorMessageByErrorId;\n","import React, { useEffect } from 'react';\n\nimport { defaultValueCtx, Editor, rootCtx, editorViewOptionsCtx } from '@milkdown/core';\nimport { commonmark } from '@milkdown/preset-commonmark';\nimport { Milkdown, useEditor } from '@milkdown/react';\nimport { replaceAll } from '@milkdown/utils';\n\nimport styles from '@/components/MarkdownEditor/MarkdownEditor.module.scss';\n\ntype Props = {\n isEditable?: boolean;\n defaultValue?: string;\n};\n\nconst MarkdownEditor: React.FC<Props> = ({ isEditable = true, defaultValue }) => {\n const { get } = useEditor((root) => {\n return Editor.make()\n .config((ctx) => {\n ctx.set(rootCtx, root);\n if (defaultValue) {\n ctx.set(defaultValueCtx, defaultValue);\n }\n // Add attributes to the editor container\n ctx.update(editorViewOptionsCtx, (prev) => ({\n ...prev,\n editable: () => isEditable,\n attributes: { class: styles.editor, spellcheck: 'false' },\n }));\n })\n .use(commonmark);\n }, []);\n\n useEffect(() => {\n if (defaultValue) {\n get()?.action(replaceAll(defaultValue));\n }\n }, [defaultValue, get]);\n\n return (\n <div className={styles.content}>\n <Milkdown />\n </div>\n );\n};\n\nexport default MarkdownEditor;\n","import { ReactNode, FC } from 'react';\n\nimport styles from './PageContainer.module.scss';\n\ntype Props = {\n children: ReactNode | ReactNode[];\n};\n\nconst PageContainer: FC<Props> = ({ children }) => {\n return <div className={styles.container}>{children}</div>;\n};\n\nexport default PageContainer;\n","import { useRef, useImperativeHandle, ForwardedRef } from 'react';\n\nimport * as Dialog from '@radix-ui/react-dialog';\nimport classNames from 'classnames';\nimport { useRouter } from 'next/router';\n\nimport Button, { ButtonShape, ButtonVariant } from '../Button/Button';\n\nimport styles from './ContentModal.module.scss';\n\nimport ContentModalHandles from '@/dls/ContentModal/types/ContentModalHandles';\nimport CloseIcon from '@/icons/close.svg';\nimport { isRTLLocale } from '@/utils/locale';\n\nexport enum ContentModalSize {\n SMALL = 'small',\n MEDIUM = 'medium',\n}\n\ntype ContentModalProps = {\n isOpen?: boolean;\n onClose?: () => void;\n onEscapeKeyDown?: () => void;\n children: React.ReactNode;\n hasCloseButton?: boolean;\n hasHeader?: boolean;\n header?: React.ReactNode;\n innerRef?: ForwardedRef<ContentModalHandles>;\n // using innerRef instead of using function forwardRef so we can dynamically load this component https://github.com/vercel/next.js/issues/4957#issuecomment-413841689\n contentClassName?: string;\n size?: ContentModalSize;\n isFixedHeight?: boolean;\n};\n\nconst SCROLLBAR_WIDTH = 15;\n\nconst ContentModal = ({\n isOpen,\n onClose,\n onEscapeKeyDown,\n hasCloseButton,\n children,\n header,\n innerRef,\n contentClassName,\n size = ContentModalSize.MEDIUM,\n isFixedHeight,\n hasHeader = true,\n}: ContentModalProps) => {\n const overlayRef = useRef<HTMLDivElement>();\n const { locale } = useRouter();\n\n useImperativeHandle(innerRef, () => ({\n scrollToTop: () => {\n if (overlayRef.current) overlayRef.current.scrollTop = 0;\n },\n }));\n\n /**\n * We need to manually check what the user is targeting. If it lies at the\n * area where the scroll bar is (assuming the scrollbar width is equivalent\n * to SCROLLBAR_WIDTH), then we don't close the Modal, otherwise we do.\n * We also need to check if the current locale is RTL or LTR because the side\n * where the scrollbar is will be different and therefor the value of\n * {e.detail.originalEvent.offsetX} will be different.\n *\n * inspired by {@see https://github.com/radix-ui/primitives/issues/1280#issuecomment-1198248523}\n *\n * @param {any} e\n */\n const onPointerDownOutside = (e: any) => {\n const currentTarget = e.currentTarget as HTMLElement;\n\n const shouldPreventOnClose = isRTLLocale(locale)\n ? e.detail.originalEvent.offsetX < SCROLLBAR_WIDTH // left side of the screen clicked\n : e.detail.originalEvent.offsetX > currentTarget.clientWidth - SCROLLBAR_WIDTH; // right side of the screen clicked\n\n if (shouldPreventOnClose) {\n e.preventDefault();\n return;\n }\n if (onClose) {\n onClose();\n }\n };\n\n return (\n <Dialog.Root open={isOpen}>\n <Dialog.Portal>\n <Dialog.Overlay className={styles.overlay} ref={overlayRef}>\n <Dialog.Content\n className={classNames(styles.contentWrapper, {\n [contentClassName]: contentClassName,\n [styles.small]: size === ContentModalSize.SMALL,\n [styles.medium]: size === ContentModalSize.MEDIUM,\n [styles.autoHeight]: !isFixedHeight,\n })}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n >\n {hasHeader && (\n <div className={styles.header}>\n {hasCloseButton && (\n <Dialog.Close className={styles.closeIcon}>\n <Button\n variant={ButtonVariant.Ghost}\n shape={ButtonShape.Circle}\n onClick={onClose}\n >\n <CloseIcon />\n </Button>\n </Dialog.Close>\n )}\n {header}\n </div>\n )}\n\n <div className={styles.content}>{children}</div>\n </Dialog.Content>\n </Dialog.Overlay>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\nexport default ContentModal;\n","import { useCallback } from 'react';\n\nimport { useSWRConfig, MutatorCallback } from 'swr';\n\nimport { NO_REVALIDATION_MUTATOR_OPTIONS } from './useMutateWithoutRevalidation';\n\n/**\n * a hook on top of useSWRConfig.mutate to mutate multiple keys in the cache by matching a regex expression against\n * each of the keys in the cache.\n *\n * Inspired by {@see https://github.com/vercel/swr/discussions/488#discussioncomment-743074}\n *\n * @returns {(url: string, callback: MutatorCallback, options: MutatorOptions) => void} mutateMultipleKeys\n */\nconst useMutateMultipleKeys = (): ((url: string, callback: MutatorCallback) => void) => {\n const { cache, mutate } = useSWRConfig();\n const mutateMultipleKeys = useCallback(\n (regexExpression: string, callback: MutatorCallback) => {\n // @ts-ignore\n const cacheKeys = Array.from(cache.keys());\n const pattern = new RegExp(regexExpression);\n cacheKeys.forEach((key: string) => {\n const keyMatches = pattern.test(key);\n if (keyMatches) {\n mutate(key, callback, NO_REVALIDATION_MUTATOR_OPTIONS);\n }\n });\n },\n\n [cache, mutate],\n );\n return mutateMultipleKeys;\n};\n\nexport default useMutateMultipleKeys;\n","import { useCallback } from 'react';\n\nimport { useSWRConfig, MutatorCallback, MutatorOptions, Key } from 'swr';\n\nexport const NO_REVALIDATION_MUTATOR_OPTIONS: MutatorOptions = { revalidate: false };\n\n/**\n * a hook on top of useSWRConfig.mutate to mutate without revalidation\n *\n * @returns {(url: string, callback: MutatorCallback) => void} mutateWithoutRevalidation\n */\nconst useMutateWithoutRevalidation = (): ((url: Key, callback: MutatorCallback) => void) => {\n const { mutate } = useSWRConfig();\n const mutateWithoutRevalidation = useCallback(\n (url: Key, callback: MutatorCallback) => {\n mutate(url, callback, NO_REVALIDATION_MUTATOR_OPTIONS);\n },\n [mutate],\n );\n return mutateWithoutRevalidation;\n};\n\nexport default useMutateWithoutRevalidation;\n","enum ErrorMessageId {\n InvalidEmail = 'invalid-email',\n RequiredField = 'required-field',\n InvalidField = 'invalid-field',\n MaximumLength = 'maximum-length',\n MinimumLength = 'minimum-length',\n}\n\nexport default ErrorMessageId;\n"],"names":["React","CompletedTick","span","styles","ContentContainer","children","div","className","container","useState","useTranslation","mutateCachedCourseAfterFeedback","mutateCachedLessonsAfterFeedback","buildFormBuilderFormField","buildTranslatedErrorMessageByErrorId","FormBuilder","Button","ToastStatus","useToast","useMutateMultipleKeys","useMutateWithoutRevalidation","ErrorMessageId","RuleType","FormFieldType","postCourseFeedback","logFormSubmission","BODY_MAX_VALIDATION_PARAMS","value","CourseFeedbackForm","course","onSuccess","t","isLoading","setIsLoading","toast","mutateWithoutRevalidation","mutateMultipleKeys","submitFeedback","formData","courseId","id","then","status","Success","slug","catch","Error","finally","onSubmit","formFields","field","type","StarRating","defaultValue","containerClassName","ratingContainer","rules","Required","errorId","RequiredField","errorMessage","placeholder","MaximumLength","errorExtraParams","TextArea","bodyInput","fieldSetLegend","map","isSubmitting","renderAction","submitButton","htmlType","isDisabled","useRef","Trans","ContentModal","ContentModalSize","CourseFeedbackModal","onClose","isOpen","contentModalRef","title","innerRef","header","headerContainer","hasCloseButton","onEscapeKeyDown","size","MEDIUM","desc","components","br","i18nKey","values","courseName","useEffect","ButtonSize","ButtonType","logButtonClick","FeedbackSource","CoursePage","LessonPage","CourseFeedback","source","shouldOpenModal","isModalOpen","setIsModalOpen","onAddFeedbackClicked","Small","Primary","onClick","makeGetCourseUrl","makeGetLessonUrlPrefix","getContinueFromLesson","lessons","completedLessonIds","filter","lesson","isCompleted","numberOfCompletedLessons","length","sortedLessons","sort","a","b","day","index","includes","mutateLessonAsCompleted","lessonId","newLessons","lessonIndex","findIndex","loopLesson","getUpdatedLessonDataAfterCompletion","cachedLessonData","completedLessonId","updatedLessonData","getUpdatedCourseDataAfterCompletion","cachedCourseData","updatedCourseData","completedLessons","continueFromLesson","mutateCachedLessonsAfterCompletion","mutatorFunction","courseSlug","courseLessonsUrlRegex","mutateCachedCourseAfterCompletion","getUpdatedLessonDataAfterFeedback","getUpdatedCourseDataAfterFeedback","userHasFeedback","capitalize","formField","rule","label","Checkbox","DEFAULT_ERROR_ID","InvalidField","fieldName","extraParams","Object","defaultValueCtx","Editor","rootCtx","editorViewOptionsCtx","commonmark","Milkdown","useEditor","replaceAll","MarkdownEditor","isEditable","get","root","make","config","ctx","set","update","prev","editable","attributes","class","editor","spellcheck","use","action","content","PageContainer","useImperativeHandle","Dialog","classNames","useRouter","ButtonShape","ButtonVariant","CloseIcon","isRTLLocale","SMALL","SCROLLBAR_WIDTH","contentClassName","isFixedHeight","hasHeader","overlayRef","locale","scrollToTop","current","scrollTop","onPointerDownOutside","e","currentTarget","shouldPreventOnClose","detail","originalEvent","offsetX","clientWidth","preventDefault","Root","open","Portal","Overlay","overlay","ref","Content","contentWrapper","small","medium","autoHeight","Close","closeIcon","variant","Ghost","shape","Circle","useCallback","useSWRConfig","NO_REVALIDATION_MUTATOR_OPTIONS","cache","mutate","regexExpression","callback","cacheKeys","Array","from","keys","pattern","RegExp","forEach","key","keyMatches","test","revalidate","url","InvalidEmail","MinimumLength"],"sourceRoot":""}