{"version":3,"file":"survey_page--VM1n3v6.js","sources":["../../app/javascript/components/surveys/shared/use_survey_question.ts","../../app/javascript/components/surveys/shared/validation/question_error_item.tsx","../../app/javascript/components/surveys/shared/validation/notification_for_question_errors.tsx","../../app/javascript/components/surveys/shared/validation/use_survey_validation.tsx","../../app/javascript/components/surveys/survey_page.tsx"],"sourcesContent":["import { useQuery } from \"urql\";\nimport {\n PostSessionSurveyCareerQuestionDocument,\n Survey,\n SurveyQuestionTemplateId,\n} from \"../../generated/graphql\";\nimport useRotatingQuestionIndex from \"../questions/hooks/useRotatingQuestion\";\nimport { SurveyAudienceContext } from \"../survey_page\";\nimport { getRotatingCareerOpenResponseQuestions } from \"../questions/rotating_career_open_response\";\n\nexport function useSurveyQuestion(\n question: Survey[\"questions\"][0],\n surveyAudienceContext?: SurveyAudienceContext\n) {\n const rotatingTemplatesIds = [\n SurveyQuestionTemplateId.RotatingOpenResponse,\n SurveyQuestionTemplateId.RotatingLikert,\n SurveyQuestionTemplateId.RotatingCareerOpenResponse,\n ];\n\n // Rotating career open response nonsense starts here //\n // This is necessary because unlike all other question types in the DB, the rotating career open response\n // question has hard-coded options in the FE.\n const questionIsCareerOpenResponse =\n question.template.templateId === SurveyQuestionTemplateId.RotatingCareerOpenResponse;\n\n const [{ fetching: fetchingSurveyAudienceEntities, data: surveyAudienceEntities }] = useQuery({\n query: PostSessionSurveyCareerQuestionDocument,\n variables: {\n participantId: surveyAudienceContext?.participantId ?? \"\",\n mentorshipId: surveyAudienceContext?.mentorshipId ?? \"\",\n },\n pause: !questionIsCareerOpenResponse || !surveyAudienceContext,\n });\n const careerRotatingQuestions =\n questionIsCareerOpenResponse && surveyAudienceEntities\n ? getRotatingCareerOpenResponseQuestions(\n surveyAudienceEntities?.participant,\n surveyAudienceEntities?.mentorship\n )\n : [];\n // Rotating career open response nonsense ends here /\n\n const numberOfRotatingQuestions =\n questionIsCareerOpenResponse && surveyAudienceEntities\n ? careerRotatingQuestions.length\n : question.customizations?.rotatingQuestions?.length;\n\n const { fetching: fetchingRotatingIndex, questionIndex } = useRotatingQuestionIndex({\n numberOfQuestions: numberOfRotatingQuestions,\n pause: !rotatingTemplatesIds.includes(question.template.templateId),\n surveyAudienceContext,\n });\n\n const getQuestionLabel = () => {\n switch (question.template.templateId) {\n case SurveyQuestionTemplateId.CounterpartsInfo:\n case SurveyQuestionTemplateId.DatePicker:\n case SurveyQuestionTemplateId.Flags:\n case SurveyQuestionTemplateId.Likert:\n case SurveyQuestionTemplateId.MentorshipChatGroupStudentSelect:\n case SurveyQuestionTemplateId.MultiSelect:\n case SurveyQuestionTemplateId.MultiSelectDropdown:\n case SurveyQuestionTemplateId.Nps:\n case SurveyQuestionTemplateId.NumberInput:\n case SurveyQuestionTemplateId.OpenResponse:\n case SurveyQuestionTemplateId.Select:\n case SurveyQuestionTemplateId.SelectWithSelectFollowUp: {\n return question.customizations.prompt;\n }\n case SurveyQuestionTemplateId.Generic: {\n return question.customizations.text;\n }\n case SurveyQuestionTemplateId.RotatingCareerOpenResponse: {\n return questionIndex !== undefined &&\n careerRotatingQuestions[questionIndex] !== undefined &&\n !fetchingRotatingIndex &&\n !fetchingSurveyAudienceEntities\n ? careerRotatingQuestions[questionIndex].prompt\n : \"Question\";\n }\n case SurveyQuestionTemplateId.RotatingLikert:\n case SurveyQuestionTemplateId.RotatingOpenResponse: {\n return fetchingRotatingIndex || questionIndex === undefined\n ? \"Question\"\n : question.customizations.rotatingQuestions[questionIndex].prompt;\n }\n case SurveyQuestionTemplateId.Conversation: {\n return (\n question.customizations.modeOfCommunicationPrompt ?? question.customizations.topicsPrompt\n );\n }\n case SurveyQuestionTemplateId.MentorshipChatGroupOptionalStudentInfo: {\n return question.customizations.yesNoPrompt;\n }\n default: {\n return question.customizations.prompt;\n }\n }\n };\n\n return {\n getQuestionLabel,\n };\n}\n","import React from \"react\";\nimport { useSurveyQuestion } from \"../use_survey_question\";\nimport { Survey } from \"../../../generated/graphql\";\nimport { SurveyAudienceContext } from \"../../survey_page\";\n\nconst TRUNCATE_LIMIT = 150;\n\nconst trailingEllipsis = (str: string) => {\n return str.length > TRUNCATE_LIMIT ? \"...\" : \"\";\n};\n\nexport default function QuestionErrorItem({\n question,\n surveyAudienceContext,\n}: {\n question: Survey[\"questions\"][\"0\"];\n // This is only needed because of the rotatingCareerOpenResponse question, which\n // hard codes the list of question in the FE and uses this object to determine which questions are\n // available to the user. All other questions have this information stored in the metadata of the\n // customizations column. A plague on the house of rotatingCareerOpenResponse.\n surveyAudienceContext?: SurveyAudienceContext;\n}) {\n const { getQuestionLabel } = useSurveyQuestion(question, surveyAudienceContext);\n\n // TODO: enable click to scroll\n // const handleScrollToQuestion = () => {\n // const element = document.getElementById(question.id);\n // element?.scrollIntoView({ behavior: \"smooth\", block: \"center\", inline: \"nearest\" });\n // };\n\n return (\n \n {getQuestionLabel().substring(0, TRUNCATE_LIMIT)}\n {trailingEllipsis(getQuestionLabel())}\n \n );\n}\n","import React from \"react\";\nimport {\n Notification,\n NotificationColorSchemeEnum,\n NotificationKindEnum,\n} from \"../../../components/base_ui/progress_and_validation/notification/index\";\nimport { Survey } from \"../../../generated/graphql\";\nimport QuestionErrorItem from \"./question_error_item\";\nimport styled from \"styled-components\";\nimport { SurveyAudienceContext } from \"../../survey_page\";\nimport { Cell } from \"baseui/layout-grid\";\n\nconst notificationOverrides = {\n Body: {\n style: () => ({\n // This lets the grid control the margins of its content\n marginLeft: 0,\n marginRight: 0,\n marginBottom: 0,\n marginTop: 0,\n }),\n },\n};\n\nconst StyledBoldText = styled.span`\n font-weight: 700;\n text-align: left;\n`;\n\nconst StyledList = styled.ul`\n list-style-position: outside;\n margin-top: 0;\n margin-left: ${({ theme }) => `-${theme.sizing.scale600}`};\n margin-bottom: 0;\n padding-inline-start: 40px;\n`;\n\nexport default function NotificationForQuestionErrors({\n questionsWithErrors,\n onClose,\n surveyAudienceContext,\n}: {\n questionsWithErrors: Survey[\"questions\"];\n onClose: () => void;\n surveyAudienceContext?: SurveyAudienceContext;\n}) {\n const isPlural = questionsWithErrors.length > 1;\n // It's necessary to separate this out explicitly so screen readers can determine what to read out.\n const boldErrorText = isPlural\n ? \"Errors found in the following questions.\"\n : \"Error found in the following question.\";\n\n return (\n \n
\n \n
\n {boldErrorText} Please review them before resubmitting:\n \n {questionsWithErrors\n .sort((q1, q2) => q1.index - q2.index)\n .map((question) => {\n return (\n \n );\n })}\n \n
\n \n
\n
\n );\n}\n","import React, { useContext, useEffect } from \"react\";\nimport usePendoTrackEvent from \"../../../shared/use_pendo_track_event\";\nimport styled from \"styled-components\";\nimport { SurveyType } from \"../../../generated/graphql\";\nimport NotificationForQuestionErrors from \"./notification_for_question_errors\";\nimport { SurveyState } from \"../../survey\";\nimport { AppContext, Environment } from \"../../../../components/app\";\nimport { SurveyAudienceContext } from \"../../survey_page\";\n\nconst StyledNotificationWrapper = styled.div`\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n`;\n\nconst StyledNotificationContainer = styled.div`\n width: 100%;\n`;\n\nexport default function useSurveyValidation(surveyState: SurveyState) {\n const { environment } = useContext(AppContext);\n\n const { survey, ableToSubmit, questionsWithErrors, showValidation, setShowValidation } =\n surveyState;\n\n const surveyType = survey.surveyType ? `-${survey.surveyType}` : \"\";\n\n const QUICK_CONVERSATION_LOGGING_SURVEY_ID = \"28\";\n\n // TA-879: due to time and resource constraints, these surveys will not have a refreshed UI\n const showRefreshedComponents =\n survey.surveyType !== SurveyType.PostSession &&\n survey.id !== QUICK_CONVERSATION_LOGGING_SURVEY_ID;\n\n const pendoTrackEvent = usePendoTrackEvent();\n\n useEffect(() => {\n if (showValidation) {\n const element = document.getElementById(\"survey-validation-message\");\n element?.scrollIntoView({\n // smooth behavior causes flake in e2e tests because they're so fast, so we show the error notification \"instantly\" there\n behavior: environment === Environment.Test ? \"auto\" : \"smooth\",\n block: \"end\",\n inline: \"nearest\",\n });\n }\n }, [showValidation, environment]);\n\n const renderErrorNotification = (context?: SurveyAudienceContext) => {\n return (\n showValidation &&\n questionsWithErrors.length > 0 && (\n \n \n setShowValidation(false)}\n surveyAudienceContext={context}\n />\n \n \n )\n );\n };\n\n const validateSurvey = async () => {\n // clear out any previous errors\n await setShowValidation(false);\n if (!ableToSubmit) {\n pendoTrackEvent(`user-attempted-to-submit-survey-with-errors${surveyType}`);\n setShowValidation(true);\n throw new Error(\"Survey has errors that must be addressed before submitting.\");\n } else {\n pendoTrackEvent(`user-submitted-survey${surveyType}`);\n }\n };\n\n return showRefreshedComponents\n ? {\n renderErrorNotification,\n validateSurvey,\n showValidation,\n }\n : {\n renderErrorNotification: () => null,\n validateSurvey: async () => true,\n showValidation: false,\n };\n}\n","import React, { Fragment, ReactNode } from \"react\";\nimport Survey, { useSurveyState } from \"./survey\";\nimport DeprecatedButton, { ButtonType } from \"../components/data_entry/button\";\nimport { SurveyType } from \"../generated/graphql\";\nimport { KIND } from \"baseui/button\";\nimport styled from \"styled-components\";\nimport { Button } from \"../components/base_ui/inputs/button\";\nimport useSurveyValidation from \"./shared/validation/use_survey_validation\";\nimport {\n SectionBlock,\n ButtonsContainer as RegistrationButtonsContainer,\n} from \"../components/base_ui/surfaces/section_block\";\nimport useDeviceType from \"../shared/use_device_type\";\n\nconst SectionBlockOverrides = {\n Root: {\n style: {\n maxWidth: \"900px\",\n },\n },\n Contents: {\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n },\n};\n\nconst RegistrationFlowSectionBlockOverrides = {\n Root: {\n style: () => ({\n maxWidth: \"900px\",\n marginLeft: \"auto\",\n marginRight: \"auto\",\n }),\n },\n Contents: {\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n },\n};\n\n// The purpose of this container is to keep old question components\n// at a max width of 700px for ease of reading line lengths,\n// and to match the new survey component widths while accounting\n// for the old components not being surrounded by a SectionBlock or Card.\nconst DeprecatedStyledSurveyContainer = styled.div`\n max-width: 700px;\n`;\n\nconst DeprecatedSubmitButtonContainer = styled.div`\n padding-bottom: 0;\n margin: ${({ theme }) => theme.sizing.scale1000} 0px ${({ theme }) => theme.sizing.scale1000}\n ${({ theme }) => theme.sizing.scale300};\n justify-content: start;\n display: flex;\n`;\n\nconst SubmitButtonContainer = styled.div`\n padding-bottom: 0;\n justify-content: start;\n display: flex;\n`;\n\nexport interface SurveyAudienceContext {\n mentorshipChatGroupId?: string;\n mentorshipId?: string;\n participantId?: string;\n programId?: string;\n}\n\nexport default function SurveyPage({\n id,\n userId,\n context,\n introText,\n inRegistrationFlow = false,\n className,\n onSubmit = () => undefined,\n}: {\n id: string;\n userId: string;\n context?: SurveyAudienceContext;\n introText?: ReactNode;\n inRegistrationFlow?: boolean;\n className?: string;\n onSubmit?: () => void;\n}) {\n const { isMobile } = useDeviceType();\n const surveyState = useSurveyState({\n id,\n onSubmit,\n userId,\n participantId: context?.participantId,\n });\n\n const {\n fetching,\n survey,\n answers,\n setAnswers,\n savingResponse,\n setIdsOfQuestionsAbleToSubmit,\n setSavingResponse,\n saveSurveyResponse,\n ableToSubmit,\n showValidation,\n } = surveyState;\n\n const { renderErrorNotification, validateSurvey } = useSurveyValidation(surveyState);\n\n const QUICK_CONVERSATION_LOGGING_SURVEY_ID = \"28\";\n\n // TA-879: due to time and resource constraints, these surveys will not have a refreshed UI\n const showRefreshedComponents =\n survey.surveyType !== SurveyType.PostSession &&\n survey.id !== QUICK_CONVERSATION_LOGGING_SURVEY_ID;\n\n if (fetching) {\n return
...Loading
;\n }\n\n // Buttons are constructed based on whether we're in the registration flow or not\n const Buttons = () => {\n const SubmitButton = ({\n dataAnalyticsId,\n children,\n }: {\n dataAnalyticsId: string;\n children: string;\n }) => (\n {\n try {\n await validateSurvey();\n } catch {\n return;\n }\n\n setSavingResponse(true);\n await saveSurveyResponse({\n inputResponse: {\n surveyId: id,\n userId,\n contextInput: {\n mentorshipChatGroupId: context?.mentorshipChatGroupId,\n mentorshipId: context?.mentorshipId,\n participantId: context?.participantId,\n },\n answers: Object.keys(answers).map((questionId) => ({\n questionId,\n answerJson: answers[questionId],\n })),\n },\n });\n setSavingResponse(false);\n }}\n disabled={savingResponse}\n data-test=\"survey-submit\"\n data-analytics-id={dataAnalyticsId}\n isStretched={isMobile}\n >\n {children}\n \n );\n\n return inRegistrationFlow ? (\n // Buttons for the matching survey in the registration flow\n \n \n Submit and Continue\n \n \n Complete Survey Later\n \n \n ) : (\n // Buttons for all other surveys\n \n \n Submit Responses\n \n \n );\n };\n\n const renderSurvey = () => {\n return (\n <>\n {introText}\n \n \n );\n };\n\n return (\n \n {renderErrorNotification(context)}\n {showRefreshedComponents || inRegistrationFlow ? (\n }\n showFooterHorizontalRule\n >\n {renderSurvey()}\n \n ) : (\n \n {renderSurvey()}\n \n {\n setSavingResponse(true);\n await saveSurveyResponse({\n inputResponse: {\n surveyId: id,\n userId,\n contextInput: {\n mentorshipChatGroupId: context?.mentorshipChatGroupId,\n mentorshipId: context?.mentorshipId,\n participantId: context?.participantId,\n },\n answers: Object.keys(answers).map((questionId) => ({\n questionId,\n answerJson: answers[questionId],\n })),\n },\n });\n setSavingResponse(false);\n }}\n disabled={!ableToSubmit || savingResponse}\n data-test=\"survey-submit\"\n dataAnalyticsId={\n // Not all surveys have types (like the \"I can't get in touch\" survey, which we track in other ways)\n survey.surveyType ? `survey-page-submit-button-${survey.surveyType}` : undefined\n }\n style={isMobile ? { width: \"100%\" } : {}}\n >\n Submit\n \n \n \n )}\n \n );\n}\n"],"names":["useSurveyQuestion","question","surveyAudienceContext","rotatingTemplatesIds","SurveyQuestionTemplateId","questionIsCareerOpenResponse","fetchingSurveyAudienceEntities","surveyAudienceEntities","useQuery","PostSessionSurveyCareerQuestionDocument","careerRotatingQuestions","getRotatingCareerOpenResponseQuestions","numberOfRotatingQuestions","_b","_a","fetchingRotatingIndex","questionIndex","useRotatingQuestionIndex","TRUNCATE_LIMIT","trailingEllipsis","str","QuestionErrorItem","getQuestionLabel","jsxs","notificationOverrides","StyledBoldText","styled","StyledList","theme","NotificationForQuestionErrors","questionsWithErrors","onClose","boldErrorText","Cell","jsx","Notification","NotificationKindEnum","NotificationColorSchemeEnum","q1","q2","StyledNotificationWrapper","StyledNotificationContainer","useSurveyValidation","surveyState","environment","useContext","AppContext","survey","ableToSubmit","showValidation","setShowValidation","surveyType","showRefreshedComponents","SurveyType","pendoTrackEvent","usePendoTrackEvent","useEffect","element","Environment","context","SectionBlockOverrides","RegistrationFlowSectionBlockOverrides","DeprecatedStyledSurveyContainer","DeprecatedSubmitButtonContainer","SubmitButtonContainer","SurveyPage","id","userId","introText","inRegistrationFlow","className","onSubmit","isMobile","useDeviceType","useSurveyState","fetching","answers","setAnswers","savingResponse","setIdsOfQuestionsAbleToSubmit","setSavingResponse","saveSurveyResponse","renderErrorNotification","validateSurvey","Buttons","SubmitButton","dataAnalyticsId","children","Button","questionId","RegistrationButtonsContainer","KIND","renderSurvey","Fragment","Survey","SectionBlock","DeprecatedButton","ButtonType"],"mappings":"u3BAUgB,SAAAA,GACdC,EACAC,EACA,SACA,MAAMC,EAAuB,CAC3BC,EAAyB,qBACzBA,EAAyB,eACzBA,EAAyB,0BAC3B,EAKMC,EACJJ,EAAS,SAAS,aAAeG,EAAyB,2BAEtD,CAAC,CAAE,SAAUE,EAAgC,KAAMC,CAAuB,CAAC,EAAIC,EAAS,CAC5F,MAAOC,EACP,UAAW,CACT,eAAeP,GAAA,YAAAA,EAAuB,gBAAiB,GACvD,cAAcA,GAAA,YAAAA,EAAuB,eAAgB,EACvD,EACA,MAAO,CAACG,GAAgC,CAACH,CAAA,CAC1C,EACKQ,EACJL,GAAgCE,EAC5BI,EACEJ,GAAA,YAAAA,EAAwB,YACxBA,GAAA,YAAAA,EAAwB,UAAA,EAE1B,CAAC,EAGDK,EACJP,GAAgCE,EAC5BG,EAAwB,QACxBG,GAAAC,EAAAb,EAAS,iBAAT,YAAAa,EAAyB,oBAAzB,YAAAD,EAA4C,OAE5C,CAAE,SAAUE,EAAuB,cAAAC,CAAA,EAAkBC,EAAyB,CAClF,kBAAmBL,EACnB,MAAO,CAACT,EAAqB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