{"version":3,"sources":["img/privacy_tip.svg","utility/languageUtility.js","services/common/azure/AuthConfig.js","commons/net/CallApiHelper.js","constants/routerRole.js","commons/config/PagesUrl.js","commons/index.js","services/common/azure/AzureCallHelper.js","services/common/index.js","services/login/MsalProvider.js","services/login/LoginContext.js","services/localization/LanguageContext.js","components/page-loading/PageLoading.jsx","components/router-manage/RouterManage.jsx","pages/logout/LogoutPage.jsx","img/success.svg","img/mb-logo-white.png","components/footer/PageFooter.jsx","services/store/index.js","img/confirmation.svg","img/error.svg","components/dialog/constants.js","components/dialog/CustomDialog.jsx","pages/consent-form/helper.js","services/store/form-stores/eConsentFormStore.js","components/navigation-bar/NavigationBarItem.jsx","img/mb-logo.png","components/navigation-bar/NavBarLogo.jsx","components/navigation-bar/NavigationBarItemGroup.jsx","components/navigation-bar/NavigationDrawer.jsx","img/edit-card.svg","components/navigation-bar/NavigationBar.jsx","components/navigation-bar/DetailNavigationBar.jsx","components/page-layout/PageLayout.jsx","utility/pageTitle.js","constants/links.js","components/faq/FAQSections.jsx","pages/public-faq/FAQProxyPage.jsx","components/button/CustomizedButton.jsx","components/form/inputs/RadioGroupCustom.jsx","components/form/inputs/SelectCustom.jsx","components/form/inputs/CheckboxCustom.jsx","components/inputs/TextMaskCustom.jsx","components/form/inputs/TextFieldCustom.jsx","components/form/inputs/DatePickerCustom.jsx","components/form/FormInput.jsx","components/form/FormSection.jsx","utility/common.js","utility/osUtility.js","utility/fileUtility.js","components/backdrop/index.js","pages/consent-form/Loading.js","pages/consent-form/SchoolsDropdown.jsx","pages/consent-form/consentFormFields.js","utility/constant.js","utility/consentFormMapper.js","pages/consent-form/index.jsx","components/react-virtualized-grid/helpers.js","components/react-virtualized-grid/index.js","components/react-virtualized-grid/SortDirection.js","components/react-virtualized-grid/components/RVHeader.js","components/react-virtualized-grid/components/RVHeaderCell.js","components/react-virtualized-grid/components/RVBodyCell.js","pages/consent-list/NoData.js","pages/consent-list/columns.js","pages/consent-list/index.js","pages/consent-list/helpers.js","pages/privacy-notice-and-consent/components/PrivateSection.jsx","pages/privacy-notice-and-consent/index.jsx","pages/homepage/index.js","pages/survey/index.js","RouterConfig.js","styles/theme/theme.js","App.js","index.js"],"names":["_g","LANG","langURLParam","getProperty","key","object","parts","split","obj","forEach","part","getLanguageById","id","toLowerCase","getLanguage","search","URLSearchParams","get","getLanguageFromParam","browserLang","navigator","language","userLanguage","slice","getLanguageFromBrowser","b2cPolicies","names","signUpSignIn","process","editProfile","forgotPassword","authorities","authority","authorityDomain","loginRequest","scopes","extraQueryParameters","ui_locales","protectedResources","citizen","endpoints","getCitizen","method","baseUrl","addCitizen","registerCitizen","removeCitizenCertificate","getCitizenCertificates","consentForm","submitConsentForm","validateClient","verify","getCertificate","schools","getSchools","consentList","getList","PDF","covid19","survey","msalConfig","auth","clientId","knownAuthorities","redirectUri","postLogoutRedirectUri","navigateToLoginRequestUrl","cache","cacheLocation","storeAuthStateInCookie","secureCookies","msalInstance","PublicClientApplication","CallParams","this","url","headers","params","timeout","responseType","data","wrapperAxios","a","Axios","result","callApi","extraParams","Error","config","isCancel","message","RouterRole","PUBLIC","PROTECTED","_excluded","_extends","Object","assign","target","i","arguments","length","source","prototype","hasOwnProperty","call","apply","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","SvgPrivacyTip","_ref","svgRef","title","titleId","props","xmlns","enableBackground","height","viewBox","width","fill","ref","d","ForwardRef","pagesUrl","Map","showInNavBar","showName","group","name","icon","role","set","subMenu","newPage","Common","getGroup","groupId","value","push","getCommon","getAccount","instance","accountIdentifiers","allAccounts","getAllAccounts","homeAccountId","localAccountId","username","filter","accountObj","acquireToken","accounts","account","logoutRedirect","acquireTokenSilent","response","acquireTokenRedirect","callApiWithAzureToken","callParam","startsWith","bearer","accessToken","authorization","Authorization","AzureOperation","redirectToLogin","reject","lng","loginRedirect","catch","error","MsaProviderContext","createContext","MsalProvider","useState","setAccounts","InteractionStatus","Startup","inProgress","setInProgress","loginError","setLoginError","children","useEffect","callbackId","addEventCallback","eventType","EventType","LOGIN_SUCCESS","SSO_SILENT_SUCCESS","HANDLE_REDIRECT_END","LOGIN_FAILURE","SSO_SILENT_FAILURE","LOGOUT_END","ACQUIRE_TOKEN_SUCCESS","ACQUIRE_TOKEN_FAILURE","currentAccounts","arrayA","arrayB","comparisonArray","every","elementA","elementB","shift","accountArraysAreEqual","removeEventCallback","status","EventMessageUtils","getInteractionStatusFromEvent","handleRedirectPromise","Provider","isAuthenticated","defaultProps","LoginContext","LoginContextValue","login","logout","changePwd","LoginContextProvider","msaProviderContext","React","useLocation","useCallback","urlSearch","contextValue","interpolateRegex","LanguageContext","LanguageContextProvider","history","useHistory","location","lang","setLang","setLangOverride","langId","newLang","urlParams","replace","pathname","toString","changeLanguage","lngId","toggleLang","translate","interpolationValues","objFrom","Array","isArray","property","translations","translated","map","section","endsWith","insert","substring","dangerouslySetInnerHTML","__html","getTranslationObj","useStyles","makeStyles","theme","root","backgroundColor","transparentBg","palette","background","default","display","position","top","bottom","left","right","margin","justifyContent","alignItems","StyledSpan","styled","padding","textAlign","marginRight","PageLoading","classes","className","CircularProgress","RouterManage","_routerConfig","routerConfig","useContext","router","path","exact","component","to","getRouterJSX","_path","LogoutPage","footer","Footer","minHeight","maxHeight","marginTop","logo","PageFooter","src","mbLogoWhite","alt","useStore","create","parentMenu","toggleMenu","menuToUpdate","state","activeMenu","setActiveMenu","newActiveMenu","SvgSuccess","stroke","strokeWidth","cx","cy","r","transform","_text","SvgConfirmation","fontSize","fontFamily","x","y","SvgError","fontWeight","confirmation","information","success","warning","closeButton","color","grey","marginLeft","spacing","font","opacity","whiteSpace","titleSmall","content","buttonConfirm","minWidth","primary","main","borderRadius","marginBottom","okConfirm","dlgPaper","boxShadow","maxWidth","actionRoot","contentPadding","paddingTop","paddingLeft","paddingRight","contentContainer","messageType","MESSAGE_TYPE","info","text","DialogAction","okText","okButton","handleOnOkay","cancelText","handleOnCancel","setFocus","mouseDown","setMouseDown","DialogActions","Button","tabIndex","onClick","variant","onFocus","event","blur","onBlur","onMouseUp","onMouseDown","classnames","MessageIcon","CustomDialog","open","titleSize","cancelButton","onCancel","onOkay","onClose","okAriaLabel","cancelAriaLabel","focus","document","getElementById","setAttribute","Dialog","PaperProps","paper","scroll","disableEscapeKeyDown","disableBackdropClick","DialogContent","Typography","join","IconButton","memo","isFormDirty","consentFormState","dirtyFields","mapKeys","includes","undefined","initialFormState","mbRegistrationNumber","phin","otherCompletedBy","conditionalField","disabled","validation","requiredMsg","questionFeverOrSymptoms","questionAllergy","questionVaccineReaction","questionMedicalConditions","questionBloodClottingMedication","otherRacialEthnicity","northAmericanIndigenousIdentity","useConsentFormStore","devtools","formState","focusEl","updateForm","updateWholeForm","clearForm","setFocusEl","schoolsApiHasError","setSchoolsHasError","loadingSchoolsApi","setLoadingSchoolsApi","groupSelected","listItem","subMenuLeftPadding","buttonLink","border","listItemText","listItemTextSelectedParent","itemMenuSelectedBorder","divider","NavigationBarItem","Icon","linkTo","endIcon","loginContext","isMenuItemActive","modal","setModal","listItemRef","useRef","listItemHeight","setListItemHeight","newListItemHeight","current","clientHeight","itemClick","e","redirectTo","preventDefault","linkWithLanguage","linkContent","ListItem","button","ListItemIcon","ListItemText","style","menuLink","type","center","imgLogo","cursor","clickable","NavBarLogo","isWhiteLogo","handleOnClick","Box","mbLogo","mbLogoGreen","wrapper","NavigationBarItemGroup","isParentMenuOpen","subMenuItems","item","Boolean","Collapse","in","wrapperInner","drawer","flexDirection","drawerHeader","Header","drawerItems","listContainer","infoTextContainer","infoText","drawerPaper","breakpoints","only","up","navBarBreakpoint","hideDrawerName","navContainer","headerContainer","languageLink","textDecortion","NavigationDrawer","isOpen","menuSections","useTheme","menuJsx","menuItems","menuSection","getMenuSection","List","Link","CssBaseline","Drawer","anchor","direction","ModalProps","keepMounted","appBar","zIndex","toolbar","menuButton","flexGrow","tooltip","shadows","arrow","linkText","textDecoration","alwaysShowLanguageToggle","logoContainer","NavigationBar","showIconButton","forceShow","isDrawerOpen","setDrawerOpen","closeDrawer","window","addEventListener","removeEventListener","handleDrawerToggle","NavBar","AppBar","Toolbar","edge","Hidden","hideDrawerButton","backButton","backIcon","detailHeaderTitle","DetailNavigationBar","detailHeader","backButtonClicked","goBack","container","overflow","drawerAndContentContainer","safariDrawerAndContentContainer","PageLayout","showNavigation","showDrawer","forceShowFooter","forceShowAppBar","showFooter","showAddButton","hideDrawer","showCloseButton","Container","disableGutters","withWidth","getPageTitle","_pageTitle","_lang","fixedTitle","wpgPhone","href","tollFreePhone","deafAccessPhone","seniorCarePhone","mbHealthCardLink","mbHealthCardLinkFr","mbHealthEmail","contactEmail","underline","wordWrap","healthndSeniorsCareWebsite","consentGuidelinesLink","covidVaccineResourcesLink","covidVaccineResourcesLinkFr","publicHealthOfficeWebsite","publicHealthOfficeWebsiteFr","shareHealthLink","healthndSeniorsCareWebsiteFr","shareHealthLinkFr","recordLinkEn","recordLinkFr","forResidentsEn","forResidentsFr","recordLinkUnderline","linkObject","links","immunizationManitobaLink","immunizationManitobaLinkFr","getStyles","spaceTopBottom","expandIcon","expandIconButton","order","expanded","expandIconBlue","expandIconBlack","accordionroot","sectionRootSummary","questionRootSummary","questionCatalogTitle","questionTitle","questionDetails","lineHeight","centered","list","analyzeAnswer","answerArray","languageContext","answer","index","li","liIndex","getQuestionsJsx","questionArray","qa","Accordion","AccordionSummary","AccordionDetails","getAccordingDetailJsx","faqArray","aq","questions","FAQSections","FAQProxyPage","customButton","CustomizedButton","buttonStyles","formLabel","selectedRadio","dark","radioGroup","radioGroupItemContainer","indentOptions","visuallyHidden","clip","RadioGroupCustom","label","ariaLabel","required","options","onChange","errorAria","fullWidth","radioOptions","option","inputs","FormControlLabel","control","Radio","inputProps","render","input","indent","inputName","inputValue","FormControl","FormLabel","FormHelperText","RadioGroup","select","SelectCustom","hasError","selectOptions","InputLabel","Select","labelId","inputRef","native","errorColor","selectedColor","formControlLabel","overflowWrap","wordBreak","checkbox","focusBorder","outlineStyle","errorContainer","paddingBottom","CheckboxControl","classNames","Checkbox","checked","CustomCheckbox","noBorderOnError","TextMaskCustom","mask","other","inputElement","guide","showMask","textfield","inputLabel","textOverflow","TextFieldCustom","maxLength","multiline","rows","InputProps","inputAriaLabel","getAriaLabel","handleOnChange","handleOnBlur","additionalProps","InputLabelProps","shrink","inputComponent","renderTextField","TextField","helperText","Tooltip","DatePickerCustom","loaded","setLoaded","selectedDate","handleSelectedDate","handleOnError","newError","newValue","utils","DateFnsUtils","locale","frLocale","enLocale","autoOk","disableFuture","onAccept","dateValue","onError","inputVariant","format","FormInput","isRequired","CheckboxCustom","validate","Component","FormSection","inputCollection","formatDate","date","moment","isIosSafari","test","userAgent","openPDF","base64PDF","pdfString","Base64","decode","byteNumbers","charCodeAt","byteArray","Uint8Array","file","Blob","URL","createObjectURL","safariWindow","Promise","setTimeout","backdrop","progress","CustomBackdrop","Backdrop","sx","flex","Loading","noOptions","clearButton","visibility","schoolListName","schoolListAddress","SchoolsDropdown","timer","setSchools","dataLoadFailed","setDataLoadFailed","schoolNameField","cityNameField","updateSchoolsApiHasError","updateLoadingSchoolsApi","time","setTime","clearInterval","setInterval","_time","then","statusCode","console","filterOptions","createFilterOptions","stringify","schoolAddressLine1","schoolAddressLine2","schoolCityName","schoolPostalCode","addressPart","limit","school","find","schoolId","Autocomplete","clearIndicator","forcePopupIcon","getOptionLabel","noOptionsText","val","reason","cityInputName","consentFormFields","sectionA","schoolCity","city","renderOption","renderInput","header","completedBy","conditionalTextField","surname","givenName","address","postalCode","phoneNumber","email","sex","dateOfBirth","customValidate","diff","mbRegNumber","schoolName","grade","sectionB","hasQuestionFeverOrSymptoms","hasQuestionAllergy","hasQuestionPEGAllergy","hasQuestionVaccineReaction","hasQuestionMedicalConditions","hasQuestionReceivedVaccineLast14Days","hasQuestionBloodClottingMedication","hasQuestionPregnant","hasQuestionImmuneSystemSuppressed","hasQuestionAutoimmune","hasQuestionVSTOrHIT","haveReceivedDoseCount","sectionC","racialEthnicity","sectionD","sectionD1Consent","sectionDCovidFactSheet","informedConsentLastName","informedConsentFirstName","informedConsentRelationship","requiredAriaMsg","informedConsentPhoneNumber","informedConsentEmail","sectionDClauses","hasUnderstandingAndQuestionsAnswered","legalConsent","isDeclarationCompleteAndTrue","sectionE","thirdPartyDisclosure","CONSENT_PROVIDER","FORM_MAKER","PROVINCE","MB","AB","BC","NB","NL","NT","NS","NU","ON","PE","QC","SK","YT","NA","checkAndConvertBooleanValues","finalValue","getFormMaker","maker","isNotNullAndUndefined","trim","mapConsentForm","consentFormRequest","consent","consentProvidedBy","toUpper","consentDecision","decisionMakerFirstName","decisionMakerLastName","decisionMakerRelationship","decisionMakerPhoneNumber","decisionMakerEmail","client","firstName","lastName","schoolGrade","toLower","mbHealthNumber","identity","identityCode","identityOther","indigenousIdentity","street","province","hasSymptoms","hasSymptomsComment","hasAllergies","hasAllergiesComment","hasPegAllergy","hadReactionFollowingVaccine","hadReactionFollowingVaccineComment","hasMedicalCondition","hasMedicalConditionComment","vaccineInLast14Days","takingBloodClottingMeds","takingBloodClottingMedsComment","pregnantOrBreastfeeding","immuneSystemSuppressed","autoimmuneCondition","historyOfBrainThrombosisOrThromboytopenia","toInteger","formCompletedBy","formLanguage","formCompletedByOther","mapNewObject","sectionTitle","formTitle","sectionContentContainer","sectionContentP","sectionChildContent","newLine","link","buttonWrapper","validationList","asteriskLegend","successMessageFooter","surveyDivider","surveyButton","common","white","surveyCaption","ConsentForm","focusElState","updateFocusEl","scrollTo","setScrollTo","submitting","setSubmitting","setSchoolId","submitSuccess","setSubmitSuccess","openBackdrop","setOpenBackdrop","pdfReqFailed","setPdfReqFailed","pdf","setPdf","submitModal","setSubmitModal","goToConsentList","goToHomePage","querySelector","scrollIntoView","behavior","block","handleCloseModal","getFieldsWithConditionalValidation","fields","fieldKey","fieldProp","fieldPropkey","getConsentFormStateValuesOnly","getInput","fieldWithConditionalValidation","findKey","o","validateInput","targetValue","RegExp","labelMsg","minLengthMsg","maxLengthMsg","isEmpty","minLength","min","max","errorToDisplay","Date","dob","err","found","validatePhinSet","dobKey","phinKey","getFieldWithErrors","fieldWithErrors","isObject","has","isFieldWithConditionalValidation","fieldValue","apiErrorModal","viewPdf","_econsentId","openSuccessMessage","Divider","openErrorModal","_firstFieldWithError","anchorId","upperFirst","handleSubmit","fieldsWithError","fieldNamesWithError","consentFormStateValuesOnly","econsentId","corrTextFieldName","radioButtonWithConditionalText","getRadioButtonConditionalText","isDisabled","isBoolean","toBoolean","corrTextFieldInput","corrTextFieldError","disableNorthAmericanIndigenousIdentity","mbRegError","phinName","phinInput","phinValue","phinError","mbRegName","mbRegInput","mbRegValue","when","nextLocation","onSubmit","autoComplete","sectionContent","startIcon","size","getColumnsConfiguredWidths","columns","columnWidths","col","hide","isResized","pageStyles","tableContainer","linearProgress","hideScroll","overflowX","overflowY","CustomGrid","forwardRef","columnHeaderWidths","setColumnHeaderWidths","cellRenderer","headerRenderer","showLoader","showLoadProgress","scrollToRow","formView","scrollToColumn","lastScrollTop","scrollTop","lastScrollLeft","scrollLeft","onScroll","customBody","deferredMeasurementCache","estimatedRowSize","overscanColumnCount","overscanRowCount","fixedColumnCount","noHeader","bodyHeight","onSectionRendered","gridWidth","setGridWidth","noData","scrollBarSize","setScrollBarSize","columnCount","gridBody","gridHeader","recomputeGridSize","forceUpdate","useLayoutEffect","loadInitialColumnWidths","initialColumnWidths","recomputeGridSizeAndExpand","getColumnWidth","newColumnHeaderWidths","isLastColumnIndex","newColumnWidth","colIndex","_columns","tableWidth","isLastIndex","defaultWidth","measuredWidth","deductWidth","hideOnReadOnly","_getColumnWidth","lastColumnWidthAdj","_columnHeaderWidths","lastColIndex","sumOfColumnWidths","sumBy","colWidth","otherColumns","sumOfOtherColumnWidths","getNewColumnWidthAfterAdjusment","finalNewColumnHeaderWidths","newWidth","newColWidth","updateColumnWidths","isEqual","handleOnScroll","onScrollPresenceChg","vertical","onResize","LinearProgress","borderBottom","mergeRefs","autoHeight","hideTopRightGridScrollbar","hideBottomLeftGridScrollbar","columnWidth","containerStyle","rowHeight","rowCount","onScrollbarPresenceChange","borderTop","CustomBody","SortDirection","ASC","DESC","knob","RVHeader","dataGrid","disableSort","defaultSort","setDataGridState","setHasSort","dbColumnName","onSort","columnIndex","hideColumnSortDirection","getNewHasSort","newSorts","getNewSorts","changedColumn","newSortDirection","sorts","sort","fieldName","removeColumnSort","currentHasSort","findSort","dgSorts","newSort","updateColumnSort","handleColumnSortChange","sortBy","currentSortDirection","columnSort","currentSort","getCurrentSortDirection","currSortDirection","getNewSortDirection","newHasSort","disableFilter","forSelectGrid","RVHeaderCell","_key","borderColor","borderRight","RVBodyCell","contextMenu","rowIndex","parent","active","customColor","isSelected","isHovered","column","rowData","onDoubleClick","onRightClick","rest","onMouseEnter","bodyCell","getBgColor","bgColor","action","hover","selected","getColor","dataType","bodyContainer","NoData","commonColProps","resizable","pageTitleRef","containerRef","hoveredRow","setHoveredRow","setData","setShowLoader","lastGridScrollTop","setLastGridScrollTop","lastGridScrollLeft","setLastGridScrollLeft","row","mainPageLayoutTopPadding","mainPageLayoutBottomPadding","gridBodyHeight","pageTitleHeight","innerHeight","errorModal","startTimer","loadData","mappedData","submissionDate","submittedBy","consentFor","schoolNameEn","schoolName_EN","schoolNameFr","schoolName_FR","mapData","econsentSummary","finally","renderHeaderCellContent","dataKey","dbColumnNm","filterType","filterOptionsUrl","filterOptionsData","filterDefaultValue","tempSortColumns","disableResize","hasFilter","pick","renderBodyCellContent","onViewPDF","schoolGradeData","onKeyUp","currentRowIndex","currentColumnIndex","pageSize","rowsPerPageOptions","columnName","findColumn","isHoveredRow","selectedRowProps","isClicked","_column","_rowData","newScrollToColumn","handleFocus","getRowHeight","listNoSpace","textTransform","borderBottomColor","PrivateSection","privacyPolicy","privacyPolicySections","sections","renderPrivacyPolicy","mainSection","mainSectionIndex","mainSectionObjName","sectionItem","sectionName","translatedContent","translatedContentIndex","renderSection","PrivacyNoticAndConsentPage","Homepage","Survey","showLoading","setShowLoading","PrivacyNoticeAndConsent","ConsentList","createMuiTheme","LuminaTheme","Banner","blue","borders","typography","subtitle1","mdDown","lgUp","overrides","MuiButton","MuiStepIcon","MuiDialog","MuiDialogContent","MuiDialogActions","MuiDialogTitle","MuiFormHelperText","MuiTooltip","App","routPublic","rt","ThemeProvider","ReactDOM","StrictMode"],"mappings":"202CAAIA,E,2HCKSC,EACP,KADOA,EAEP,KAYOC,EAAe,OAEfC,EAAc,SAACC,EAAKC,GAC/B,GAAmB,kBAARD,EAAkB,OAAOA,EACpC,IAAME,EAAQF,EAAIG,MAAM,KACpBC,EAAG,eAAQH,GAMf,OALAC,EAAMG,SAAQ,SAACC,GACTF,EAAIE,KACNF,EAAMA,EAAIE,OAGPF,GAIIG,EAAkB,SAACC,GAC9B,GAAKA,EACL,OAAQA,EAAGC,eACT,KAAKZ,EACH,OAAOA,EACT,KAAKA,EACH,OAAOA,EACT,QACE,SAkBOa,EAAc,SAACC,GAE1B,OAhBkC,SAACA,GACnC,GAAIA,EACF,OAAOJ,EAAgB,IAAIK,gBAAgBD,GAAQE,IAAIf,IAclDgB,CAAqBH,IATQ,WACpC,IAAMI,EAAcC,UAAUC,UAAYD,UAAUE,aAEpD,OAAOX,EAAgBQ,GAAeA,EAAYI,MAAM,EAAG,IAMpBC,IAA4BvB,GCjDxDwB,EAAc,CACzBC,MAAO,CACLC,aAAcC,uBACdC,YAAaD,uBACbE,eAAgB,IAElBC,YAAa,CACXJ,aAAc,CACZK,UAAWJ,uFAEbE,eAAgB,CACdE,UAAW,IAEbH,YAAa,CACXG,UAAWJ,wFAGfK,gBAAiBL,6BASNM,EAAe,CAC1BC,OAAQ,CAAC,GAAD,OAAIP,kGACZQ,qBAAsB,CAAEC,WAAYpC,IAOzBqC,EAAqB,CAChCC,QAAS,CACPC,UAAW,CACTC,WAAY,CACVC,OAAQ,MACRC,QAAS,WAEXC,WAAY,CACVF,OAAQ,OACRC,QAAS,WAEXE,gBAA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,aAAc,OACdvE,QAASlB,GAAM+E,QAAQ,KAG3B89B,iBAAkB,CAChB5iC,KAAM,CACJiB,QAASlB,GAAM+E,QAAQ,KAG3B+9B,iBAAkB,CAChB7iC,KAAM,CACJY,OAAQ,EACRK,QAASlB,GAAM+E,QAAQ,KAG3Bg+B,eAAgB,CACd9iC,KAAM,CACJiB,QAAS,MACTX,QAAS,OACTxJ,OAAQ,OACRgK,WAAY,WAGhBiiC,kBAAmB,CACjB/iC,KAAM,CACJgE,SAAU,aAGdg/B,WAAY,CACV1xB,QAAS,CACPtN,SAAU,YChEHi/B,OAlCf,WACE,IFgDwCvrC,EEhDlCwrC,GFgDkCxrC,EEhDK7C,GFiDhC6M,GAAa5I,QAAO,SAACqqC,GAChC,OAAOA,EAAGvrC,OAASF,MEjDrB,OACE,mCACE,cAAC,IAAD,UACE,cAAC0rC,EAAA,EAAD,CAAerjC,MAAOiiC,GAAtB,SACE,cAAC,GAAD,UACE,cAAC,GAAD,UACE,eAAC,IAAD,WACGkB,EAAW7jC,KAAI,SAAC8jC,GACf,OACE,cAAC,IAAD,CAEEthC,KAAMshC,EAAGthC,KACTC,MAAOqhC,EAAGrhC,MACVC,UAAWohC,EAAGphC,WAJhB,UACUohC,EAAGthC,KADb,eASJ,cAAC,IAAD,CAAOA,KAAK,IAAZ,SACE,cAAC,GAAD,UACE,cAAC,GAAD,CAAcH,aAAcA,uBC1BhD2hC,IAASlpB,OACP,cAAC,IAAMmpB,WAAP,UACE,cAAC,GAAD,MAEF96B,SAASC,eAAe,W","file":"static/js/main.a26e9d33.chunk.js","sourcesContent":["var _g;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgPrivacyTip(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n enableBackground: \"new 0 0 24 24\",\n height: \"24px\",\n viewBox: \"0 0 24 24\",\n width: \"24px\",\n fill: \"#000000\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", null, /*#__PURE__*/React.createElement(\"rect\", {\n fill: \"none\",\n height: 24,\n width: 24\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12,3.19l7,3.11V11c0,4.52-2.98,8.69-7,9.93C7.98,19.69,5,15.52,5,11V6.3L12,3.19 M12,1L3,5v6c0,5.55,3.84,10.74,9,12 c5.16-1.26,9-6.45,9-12V5L12,1L12,1z M11,7h2v2h-2V7z M11,11h2v6h-2V11z\"\n }))));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgPrivacyTip);\nexport default __webpack_public_path__ + \"static/media/privacy_tip.b75a223d.svg\";\nexport { ForwardRef as ReactComponent };","/*\n * @Description:\n * @Author: Shaomin Fei\n * @Date: 2021-04-27 16:26:22\n */\nexport const LANG = {\n EN: 'en',\n FR: 'fr',\n};\n\nexport const LANG_OPTIONS = {\n en: {\n locale: 'en-US',\n },\n fr: {\n locale: 'fr-CA',\n },\n};\n\nexport const langURLParam = 'lang';\n\nexport const getProperty = (key, object) => {\n if (typeof key !== 'string') return key;\n const parts = key.split('.');\n let obj = { ...object };\n parts.forEach((part) => {\n if (obj[part]) {\n obj = obj[part];\n }\n });\n return obj;\n};\n\n// Checking we have a valid language id\nexport const getLanguageById = (id) => {\n if (!id) return undefined;\n switch (id.toLowerCase()) {\n case LANG.FR:\n return LANG.FR;\n case LANG.EN:\n return LANG.EN;\n default:\n return undefined;\n }\n};\n\nexport const getLanguageFromParam = (search) => {\n if (search) {\n return getLanguageById(new URLSearchParams(search).get(langURLParam));\n }\n return undefined;\n};\n\nexport const getLanguageFromBrowser = () => {\n const browserLang = navigator.language || navigator.userLanguage;\n // Slicing off the first 2 letters en or fr\n return getLanguageById(browserLang && browserLang.slice(0, 2));\n};\n\n// Gets language, from url param, browser settings, or default to english\nexport const getLanguage = (search) => {\n // Assigns the first truthy value\n return getLanguageFromParam(search) || getLanguageFromBrowser() || LANG.EN;\n};\n","// @flow\n/*\n * @Description:\n * @Author: Shaomin Fei\n * @Date: 2021-03-27 22:24:09\n */\nimport { PublicClientApplication } from '@azure/msal-browser';\nimport { LANG } from 'utility/languageUtility';\n/**\n * Enter here the user flows and custom policies for your B2C application\n * To learn more about user flows, visit: https://docs.microsoft.com/en-us/azure/active-directory-b2c/user-flow-overview\n * To learn more about custom policies, visit: https://docs.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-overview\n */\nexport const b2cPolicies = {\n names: {\n signUpSignIn: process.env.REACT_APP_AZURE_SIGHIN,\n editProfile: process.env.REACT_APP_AZURE_EDIT_PROFILE,\n forgotPassword: '',\n },\n authorities: {\n signUpSignIn: {\n authority: process.env.REACT_APP_AZURE_AUTHORITY_SIGNIN_SIGNUP,\n },\n forgotPassword: {\n authority: '',\n },\n editProfile: {\n authority: process.env.REACT_APP_AZURE_AUTHORITY_EDIT_PROFILE,\n },\n },\n authorityDomain: process.env.REACT_APP_AZURE_AUTHORITY_DOMAIN,\n};\n/**\n * Scopes you add here will be prompted for user consent during sign-in.\n * By default, MSAL.js will add OIDC scopes (openid, profile, email) to\n * any login request.\n * For more information about OIDC scopes, visit:\n * https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent#openid-connect-scopes\n */\nexport const loginRequest = {\n scopes: [`${process.env.REACT_APP_AZURE_AUTHORITY_API_SCOPE}`],\n extraQueryParameters: { ui_locales: LANG.EN },\n};\n/**\n * Add here the endpoints and scopes when obtaining an access token\n * for protected web APIs. For more information, see:\n * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/resources-and-scopes.md\n */\nexport const protectedResources = {\n citizen: {\n endpoints: {\n getCitizen: {\n method: 'get',\n baseUrl: 'citizen',\n },\n addCitizen: {\n method: 'post',\n baseUrl: 'citizen',\n },\n registerCitizen: {\n method: 'post',\n baseUrl: 'citizen/client/register',\n },\n removeCitizenCertificate: {\n method: 'post',\n baseUrl: 'citizen/remove/',\n },\n getCitizenCertificates: {\n method: 'get',\n baseUrl: 'citizen',\n },\n },\n scopes: [`${process.env.REACT_APP_AZURE_AUTHORITY_API_SCOPE}`], // e.g. api://xxxxxx/access_as_user\n },\n consentForm: {\n endpoints: {\n submitConsentForm: {\n method: 'post',\n baseUrl: `consent/econsents`,\n },\n validateClient: {\n method: 'post',\n baseUrl: `consent/validateClient`,\n },\n },\n },\n verify: {\n endpoints: {\n getCertificate: {\n method: 'get',\n baseUrl: `${process.env.REACT_APP_API_BASE_URL}certificate/`,\n },\n },\n },\n schools: {\n endpoints: {\n getSchools: {\n method: 'get',\n baseUrl: 'consent/schools',\n },\n },\n },\n consentList: {\n endpoints: {\n getList: {\n method: 'get',\n baseUrl: `consent/econsents`,\n },\n },\n },\n PDF: {\n endpoints: {\n covid19: {\n method: 'get',\n baseUrl: 'consent/pdf',\n },\n },\n },\n survey: {\n endpoints: {\n covid19: {\n method: 'get',\n baseUrl: 'consent/survey',\n },\n },\n },\n};\n/**\n * Configuration object to be passed to MSAL instance on creation.\n * For a full list of MSAL.js configuration parameters, visit:\n * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/configuration.md\n */\nconst msalConfig = {\n auth: {\n clientId: process.env.REACT_APP_AZURE_CLIENT_ID, // This is the ONLY mandatory field that you need to supply.\n authority: b2cPolicies.authorities.signUpSignIn.authority, // Choose SUSI as your default authority.\n knownAuthorities: [b2cPolicies.authorityDomain], // Mark your B2C tenant's domain as trusted.\n redirectUri: process.env.REACT_APP_AZURE_REDIRECT_URI, // You must register this URI on Azure Portal/App Registration. Defaults to window.location.origin\n postLogoutRedirectUri: '/', // Indicates the page to navigate after logout.\n navigateToLoginRequestUrl: false, // If \"true\", will navigate back to the original request location before processing the auth code response.\n },\n cache: {\n cacheLocation: 'localStorage', // Configures cache location. \"sessionStorage\" is more secure, but \"localStorage\" gives you SSO between tabs.\n storeAuthStateInCookie: true, // Set this to \"true\" if you are having issues on IE11 or Edge\n secureCookies: true,\n },\n};\nexport const msalInstance = new PublicClientApplication(msalConfig);\n","// @flow\n/*\n * @Description:\n * @Author: Shaomin Fei\n * @Date: 2021-03-28 12:29:30\n */\nimport Axios from 'axios';\n\nexport class CallParams {\n constructor() {\n this.url = '';\n\n this.method = 'get';\n\n this.headers = null;\n\n // append to the url, like {ID:123}\n this.params = null;\n\n // `timeout` specifies the number of milliseconds before the request\n // times out.If the request takes longer than `timeout`, the request\n // will be aborted.0 means (no timeout)\n this.timeout = 30000;\n\n this.responseType = 'json';\n\n // body like post, put\n this.data = null;\n }\n}\n\nconst wrapperAxios = async (params) => {\n const result = await Axios(params);\n return result;\n};\n\n/**\n * @Author: Shaomin Fei\n * @Description:\n * @param {CallParams} params Basic params, url and method are mandotory.\n * @param {Object} extraParams Extra params, like configuration of axios.\n * see:https://github.com/axios/axios.\n * @return {Promise} return result of call\n */\nexport const callApi = async (params, extraParams) => {\n if (!params || !params.url || !params.method) {\n throw new Error(\n \"parameter is not completed, url, method shouldn't be null\",\n );\n }\n try {\n let config = params;\n if (!extraParams) {\n config = { ...config, ...extraParams };\n }\n const result = await wrapperAxios(config);\n return result;\n } catch (error) {\n if (!Axios.isCancel(error)) {\n throw new Error(error.message);\n }\n throw new Error('cancel');\n }\n};\n","const RouterRole = {\n PUBLIC: 'public',\n PROTECTED: 'protected',\n};\n\nexport default RouterRole;\n","import React from 'react';\nimport HelpOutlineIcon from '@material-ui/icons/HelpOutline';\nimport ListAltIcon from '@material-ui/icons/ListAlt';\nimport ExitToAppIcon from '@material-ui/icons/ExitToApp';\nimport PollOutlined from '@material-ui/icons/PollOutlined';\nimport RouterRole from 'constants/routerRole';\nimport { ReactComponent as PrivacyTip } from '../../img/privacy_tip.svg';\n\nconst pagesUrl = new Map();\n\nconst consentForm = {\n url: '/consent-form',\n showInNavBar: false,\n showName: 'layout.nav.newConsentForm',\n group: 1,\n name: 'covidConsentForm',\n icon: ,\n role: RouterRole.PROTECTED,\n};\n\nconst consentList = {\n url: '/consent-list',\n showInNavBar: false,\n showName: 'layout.nav.consentList',\n group: 1,\n name: 'covidConsentList',\n icon: ,\n role: RouterRole.PROTECTED,\n};\n\npagesUrl.set('covidConsentForm', consentForm);\npagesUrl.set('covidConsentList', consentList);\n\npagesUrl.set('ConsentFormMenu', {\n showInNavBar: true,\n showName: 'layout.nav.consentMenuTitle',\n group: 1,\n icon: ,\n subMenu: [consentForm, consentList],\n name: 'covid',\n role: RouterRole.PROTECTED,\n});\n\n// it's privat,only used to redirect to faq when the user clicks this button.\n// not included in the router\n\n// it's public and will be accessed by unlogin user,will redirect to faq\npagesUrl.set('covidFaq', {\n url: '/faq',\n showInNavBar: true,\n showName: 'layout.nav.help',\n group: 2,\n icon: ,\n newPage: true,\n name: 'covidFaq',\n role: RouterRole.PROTECTED,\n});\n\npagesUrl.set('covidFaqPublic', {\n url: '/faq-public',\n showInNavBar: true,\n showName: 'layout.nav.help',\n group: 2,\n icon: ,\n newPage: true,\n name: 'covidFaqPublic',\n role: RouterRole.PUBLIC,\n});\n\npagesUrl.set('PrivacyNotice', {\n url: '/privacy-notice',\n showInNavBar: true,\n newPage: true,\n showName: 'layout.nav.privacyNotice',\n group: 3,\n icon: ,\n role: RouterRole.PROTECTED,\n});\n\npagesUrl.set('survey', {\n url: '/survey',\n showInNavBar: true,\n newPage: true,\n showName: 'layout.nav.survey',\n group: 3,\n icon: ,\n role: RouterRole.PROTECTED,\n});\n\npagesUrl.set('logout', {\n url: '/logout',\n showInNavBar: true,\n showName: 'layout.nav.logout',\n group: 4,\n icon: ,\n name: 'logout',\n role: RouterRole.PROTECTED,\n});\n\nexport function getGroup(groupId) {\n const result = [];\n pagesUrl.forEach((value) => {\n if (value.group === groupId && value.showInNavBar) {\n result.push(value);\n }\n });\n\n return result;\n}\nexport default pagesUrl;\n","/*\n * @Description:\n * @Author: Shaomin Fei\n * @Date: 2021-03-30 09:41:21\n */\n\nimport { CallParams, callApi } from './net/CallApiHelper';\nimport pagesUrl, { getGroup } from './config/PagesUrl';\n\nconst Common = {\n CallParams,\n callApi,\n pagesUrl,\n getGroup,\n};\nexport default Common;\nexport const getCommon = () => Common;\n","// @flow\n/*\n * @Description:\n * @Author: Shaomin Fei\n * @Date: 2021-03-28 13:04:10\n */\nimport { getCommon } from '../../../commons/index';\n\nimport { msalInstance, loginRequest } from './AuthConfig';\nimport { getLanguage, LANG } from '../../../utility/languageUtility';\n\nconst baseApiUrl = process.env.REACT_APP_API_BASE_URL; // like http://192.168.0.3:3000/\n\nfunction getAccount(instance, accountIdentifiers) {\n const allAccounts = instance.getAllAccounts();\n if (\n allAccounts.length > 0 &&\n (accountIdentifiers.homeAccountId ||\n accountIdentifiers.localAccountId ||\n accountIdentifiers.username)\n ) {\n const matchedAccounts = allAccounts.filter((accountObj) => {\n if (\n accountIdentifiers.username &&\n accountIdentifiers.username.toLowerCase() !==\n accountObj.username.toLowerCase()\n ) {\n return false;\n }\n if (\n accountIdentifiers.homeAccountId &&\n accountIdentifiers.homeAccountId.toLowerCase() !==\n accountObj.homeAccountId.toLowerCase()\n ) {\n return false;\n }\n if (\n accountIdentifiers.localAccountId &&\n accountIdentifiers.localAccountId.toLowerCase() !==\n accountObj.localAccountId.toLowerCase()\n ) {\n return false;\n }\n\n return true;\n });\n\n return matchedAccounts[0] || null;\n }\n return null;\n}\nexport function redirectToLogin(reject, search) {\n let lng = getLanguage(search);\n if (lng !== LANG.EN && lng !== LANG.FR) {\n lng = LANG.EN;\n }\n loginRequest.extraQueryParameters.ui_locales = lng;\n msalInstance.loginRedirect(loginRequest).catch((error) => {\n if (reject) {\n reject(error);\n }\n });\n}\nexport const acquireToken = async () => {\n const accounts = msalInstance.getAllAccounts();\n const account = getAccount(msalInstance, accounts[0] || {});\n\n if (!account) {\n // throw new Error(\n // 'No active account! Verify a user has been\n // signed in and setActiveAccount has been called.',\n // );\n // user login, but can't find information in the cache, maybe it's deleted\n // then redirect to login\n msalInstance.logoutRedirect();\n return null;\n }\n try {\n const response = await msalInstance.acquireTokenSilent({\n ...loginRequest,\n account,\n });\n return response;\n } catch (error) {\n // according to the doc here: https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/acquire-token.md\n // if the session exists and acquirin token fails,\n // then throw InteractionRequiredAuthError\n // if the session doesn't exist and refresh token expires, then\n // need to login again.\n // bug 1021 happens when refresh token expires\n // but we try to access api when loading the page without logging in.\n // No matter what kind of error happens here, we should try to log in.\n // eslint-disable-next-line no-debugger\n await msalInstance.acquireTokenRedirect({\n ...loginRequest,\n account,\n });\n }\n return null;\n};\n\n// eslint-disable-next-line consistent-return\nconst callApiWithAzureToken = async (params) => {\n try {\n const response = await acquireToken();\n if (!response) {\n return null;\n }\n const callParam = params;\n if (!callParam.url.startsWith('http')) {\n callParam.url = baseApiUrl + callParam.url;\n }\n const bearer = `Bearer ${response.accessToken}`;\n const authorization = {\n Authorization: bearer,\n };\n callParam.headers = callParam.headers\n ? { ...callParam.headers, ...authorization }\n : authorization;\n\n const { callApi } = getCommon();\n const result = await callApi(callParam);\n if (result) {\n return result.data;\n }\n return null;\n } catch (error) {\n // Redirecting to login page when valid token is not present\n const err = new Error(error.message);\n throw err;\n }\n};\n\nexport default callApiWithAzureToken;\n","// @flow\n/*\n * @Description:\n * @Author: Shaomin Fei\n * @Date: 2021-03-28 13:19:42\n */\n\nimport {\n msalInstance,\n loginRequest,\n b2cPolicies,\n protectedResources,\n} from './azure/AuthConfig';\nimport callApiWithAzureToken, {\n redirectToLogin,\n} from './azure/AzureCallHelper';\n\nconst AzureOperation = {\n instance: msalInstance,\n callApiWithAzureToken,\n loginRequest,\n b2cPolicies,\n protectedResources,\n redirectToLogin,\n};\nexport default AzureOperation;\n","/*\n * @Description:\n * @Author: Shaomin Fei\n * @Date: 2021-03-29 16:21:03\n */\n\nimport * as React from 'react';\n\nimport { createContext, useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n EventType,\n EventMessageUtils,\n InteractionStatus,\n} from '@azure/msal-browser';\n\nimport AzureOperation from '../common/index';\n\n/**\n * Helper function to determine whether 2 arrays are equal\n * Used to avoid unnecessary state updates\n * @param arrayA\n * @param arrayB\n */\nexport function accountArraysAreEqual(arrayA, arrayB) {\n if (arrayA.length !== arrayB.length) {\n return false;\n }\n\n const comparisonArray = [...arrayB];\n\n return arrayA.every((elementA) => {\n const elementB = comparisonArray.shift();\n if (!elementA || !elementB) {\n return false;\n }\n\n return (\n elementA.homeAccountId === elementB.homeAccountId &&\n elementA.localAccountId === elementB.localAccountId &&\n elementA.username === elementB.username\n );\n });\n}\n\nexport const MsaProviderContext = createContext();\nexport const MsalProvider = (props) => {\n const { instance } = AzureOperation;\n const [accounts, setAccounts] = useState([]);\n const [inProgress, setInProgress] = useState(InteractionStatus.Startup);\n const [loginError, setLoginError] = useState(null);\n const { children } = props;\n const isAuthenticated = () => {\n if (accounts && accounts.length > 0) {\n return true;\n }\n return false;\n };\n useEffect(() => {\n const callbackId = instance.addEventCallback((message) => {\n switch (message.eventType) {\n case EventType.LOGIN_SUCCESS:\n case EventType.SSO_SILENT_SUCCESS:\n case EventType.HANDLE_REDIRECT_END:\n case EventType.LOGIN_FAILURE:\n case EventType.SSO_SILENT_FAILURE:\n case EventType.LOGOUT_END:\n case EventType.ACQUIRE_TOKEN_SUCCESS:\n case EventType.ACQUIRE_TOKEN_FAILURE:\n {\n const currentAccounts = instance.getAllAccounts();\n if (!accountArraysAreEqual(currentAccounts, accounts)) {\n setAccounts(currentAccounts);\n }\n if (message.eventType === EventType.LOGIN_FAILURE) {\n setLoginError(message.error);\n }\n }\n break;\n default:\n break;\n }\n });\n return () => {\n // Remove callback when component unmounts or accounts change\n if (callbackId) {\n instance.removeEventCallback(callbackId);\n }\n };\n }, [instance, accounts]);\n\n useEffect(() => {\n const callbackId = instance.addEventCallback((message) => {\n const status = EventMessageUtils.getInteractionStatusFromEvent(message);\n if (status !== null) {\n setInProgress(status);\n }\n });\n instance.handleRedirectPromise().catch(() => {\n // Errors should be handled by listening to the LOGIN_FAILURE event\n });\n return () => {\n if (callbackId) {\n instance.removeEventCallback(callbackId);\n }\n };\n }, [instance]);\n\n return (\n \n {children}\n \n );\n};\nMsalProvider.defaultProps = {\n children: null,\n};\nMsalProvider.propTypes = {\n children: PropTypes.element,\n};\n","/*\n * @Description:\n * @Author: Shaomin Fei\n * @Date: 2021-03-28 23:04:08\n */\nimport * as React from 'react';\n\nimport { createContext, useEffect, useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport { useLocation } from 'react-router-dom';\n\nimport { MsaProviderContext } from './MsalProvider';\n\nimport AzureOperation from '../common/index';\n\nexport const LoginContext = createContext();\nexport class LoginContextValue {\n constructor() {\n this.account = null;\n this.loginError = null;\n this.login = null;\n this.logout = null;\n this.editProfile = null;\n this.changePwd = null;\n }\n}\n\nexport const LoginContextProvider = (props) => {\n // when close page, and reopen it, the login will run automatically,\n // and inProgress === 'login',\n const { children } = props;\n const { instance } = AzureOperation;\n const msaProviderContext = React.useContext(MsaProviderContext);\n const { accounts, inProgress, isAuthenticated } = msaProviderContext;\n const { search } = useLocation();\n\n const login = useCallback((method = 'loginRedirect', urlSearch) => {\n if (method === 'loginRedirect') {\n AzureOperation.redirectToLogin(null, urlSearch);\n }\n }, []);\n\n const logout = useCallback(\n (reject) => {\n instance.logoutRedirect().catch((error) => {\n if (reject) {\n reject(error);\n }\n });\n },\n [instance],\n );\n const editProfile = () => {\n instance.loginRedirect(AzureOperation.b2cPolicies.authorities.editProfile);\n };\n\n useEffect(() => {\n // when login, azure will redirect, which means the whole app will reload,\n // but the progresss is \"startup\", if we don't check inProgress, we will\n // call login the second time, which cause the Azure report error\n\n if (accounts.length === 0 && inProgress === 'none') {\n login('loginRedirect', search);\n }\n }, [inProgress, login, accounts.length, search]);\n\n // don't call logout when this component is unmounted.\n // we have public page now, if we call logout here, when\n // visit public page, the logout will redirect to login url.\n // useEffect(() => {\n // return () => logout();\n // }, []);\n\n const contextValue = new LoginContextValue();\n contextValue.login = login;\n contextValue.logout = logout;\n contextValue.editProfile = editProfile;\n contextValue.account = accounts.length > 0 ? accounts[0] : null;\n contextValue.isAuthenticated = isAuthenticated;\n return (\n \n {children}\n \n );\n};\nLoginContextProvider.defaultProps = {\n children: null,\n};\nLoginContextProvider.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.element),\n PropTypes.element,\n ]),\n};\n","import React, { createContext, useState, useCallback } from 'react';\nimport { useHistory, useLocation } from 'react-router-dom';\nimport PropTypes from 'prop-types';\n// Adding comments here since you cant add them in JSON\n// The following entries need updated FRENCH translations\n// TODO: layout.nav.additionalServices\n// TODO: layout.nav.consentForm\nimport translations from './translations.json';\nimport {\n LANG,\n langURLParam,\n getLanguage,\n getLanguageById,\n getProperty,\n} from '../../utility/languageUtility';\n\n// Matches text wrapped in double curly brackets\n// {{Example match}}\n// {{match 1}} not matched {{match 2}}\nconst interpolateRegex = /({{(?:(?:[^}][^}]?|[^}]}?)*)}})/g;\n\nexport const LanguageContext = createContext();\n\nexport const LanguageContextProvider = ({ children }) => {\n const history = useHistory();\n const location = useLocation();\n const [lang, setLang] = useState(getLanguage(location.search));\n const setLangOverride = (langId) => {\n const newLang = getLanguageById(langId);\n if (newLang !== lang) {\n setLang(newLang);\n\n const urlParams = new URLSearchParams(location.search);\n urlParams.set(langURLParam, newLang);\n history.replace(`${location.pathname}?${urlParams.toString()}`);\n\n // If there is issues when switching languages, like needing to retry api\n // calls or with 3rd party libraries, enable window reload as a quick fix.\n // window.location.reload();\n }\n };\n\n const toggleLang = () => {\n if (lang === LANG.EN) {\n setLangOverride(LANG.FR);\n } else {\n setLangOverride(LANG.EN);\n }\n };\n\n const changeLanguage = useCallback((lngId) => {\n setLang(lngId);\n }, []);\n /**\n * @Author: Shaomin Fei\n * @Description: get specific sub object from translations object\n * @param {*} key\n * @return {*}\n */\n const getTranslationObj = (key) => {\n return getProperty(key, translations);\n };\n /**\n * @description Gets a language value given a key, in the current language.\n * Supports interpolating JSX and other React nodes.\n *\n * @param {string} key\n * Dot notation string corresponding to value in translations.json\n * @param {{ [nameMatchingValueInKey]: string || node }} interpolationValues\n * Object with keys matching values in language key.\n * EX:\n * key = \"Business Phone Number: {{phone}}\" (Value in translation file)\n * interpolation = { phone: 555-555-1234 }\n * return\n * [ \"Business Phone Number: \", 555-555-1234 ]\n *\n * @returns {string || array}\n */\n const translate = (key, interpolationValues, objFrom) => {\n // eslint-disable-next-line no-param-reassign\n if (Array.isArray(key)) [key, interpolationValues] = key;\n let property = null;\n if (objFrom) {\n property = getProperty(key, objFrom);\n } else {\n property = getProperty(key, translations);\n }\n // let property = getProperty(key, translations);\n if (!property) return property;\n let translated = property[lang] || property[LANG.EN] || key;\n const shouldTransformText =\n (typeof translated === 'string' && translated.indexOf('{{') > -1) ||\n interpolationValues;\n // Only running expensive regex if string contains curly braces\n if (shouldTransformText) {\n translated = translated.split(interpolateRegex).map((section) => {\n // Text was wrapped in curly braces, needs to be transformed\n if (section.startsWith('{{') && section.endsWith('}}')) {\n // Stripping curly braces from value\n const insert = section.substring(2, section.length - 2);\n let value = null;\n if (interpolationValues) {\n value = interpolationValues[insert];\n }\n\n // Is an interpolated value, such as adding a link\n if (value) {\n if (value.props && value.props.children) {\n value = {\n ...value,\n props: {\n ...value.props,\n children: translate(value.props.children),\n },\n };\n }\n return translate(value);\n }\n // HTML to be rendered\n if (\n typeof insert === 'string' &&\n insert.startsWith('<') &&\n insert.endsWith('>')\n ) {\n return (\n // User submitted text is not being entered here\n // It is safe from XSS attacks\n // eslint-disable-next-line react/no-danger\n \n );\n }\n }\n // regular text, return it\n return section;\n });\n }\n return translated;\n };\n\n return (\n \n {children}\n \n );\n};\n\nLanguageContextProvider.defaultProps = {\n children: null,\n};\n\nLanguageContextProvider.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.element),\n PropTypes.element,\n ]),\n};\n","/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { makeStyles, styled } from '@material-ui/core/styles';\nimport CircularProgress from '@material-ui/core/CircularProgress';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n backgroundColor: (props) => {\n return props.transparentBg\n ? 'transparent'\n : theme.palette.background.default;\n },\n display: 'flex',\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n margin: 'auto',\n justifyContent: 'center',\n alignItems: 'center',\n },\n}));\n\nconst StyledSpan = styled('span')({\n padding: '10px',\n alignItems: 'center',\n textAlign: 'center',\n marginRight: '20px',\n});\n\nconst PageLoading = ({ transparentBg = false }) => {\n const classes = useStyles({ transparentBg });\n return (\n
\n \n \n \n
\n );\n};\n\nexport default PageLoading;\n","import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { Switch, Route, Redirect } from 'react-router-dom';\nimport { LoginContext } from '../../services/login/LoginContext';\nimport PageLoading from '../page-loading/PageLoading';\n\nconst getRouterJSX = (routerConfig) => {\n return (\n \n {routerConfig.map((router) => {\n return (\n \n );\n })}\n } />\n \n );\n};\nconst RouterManage = ({ routerConfig: _routerConfig }) => {\n const loginContext = useContext(LoginContext);\n const isAuth = loginContext.isAuthenticated();\n if (!isAuth) {\n return ;\n }\n\n // Need to exclude feature flag that is turned off.\n const routerConfig = _routerConfig.filter((router) => {\n return router;\n });\n\n return getRouterJSX(routerConfig);\n};\n\nexport default RouterManage;\n\nRouterManage.propTypes = {\n routerConfig: PropTypes.instanceOf(Object),\n};\nRouterManage.defaultProps = {\n routerConfig: {},\n};\n","import React from 'react';\n\nconst LogoutPage = () => {\n return
I am LogoutPage
;\n};\n\nexport default LogoutPage;\n","var _g, _path;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgSuccess(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"done-24px\",\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 62.28,\n height: 62.28,\n viewBox: \"0 0 62.28 62.28\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n id: \"Ellipse_25\",\n \"data-name\": \"Ellipse 25\",\n fill: \"none\",\n stroke: \"#18981e\",\n strokeWidth: 2\n }, /*#__PURE__*/React.createElement(\"circle\", {\n cx: 31.14,\n cy: 31.14,\n r: 31.14,\n stroke: \"none\"\n }), /*#__PURE__*/React.createElement(\"circle\", {\n cx: 31.14,\n cy: 31.14,\n r: 30.14,\n fill: \"none\"\n }))), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n id: \"Path_494\",\n \"data-name\": \"Path 494\",\n d: \"M12.5,22.825,5.675,16,3.4,18.275l9.1,9.1L32,7.875,29.725,5.6Z\",\n transform: \"translate(13.95 13.839)\",\n fill: \"#18981e\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgSuccess);\nexport default __webpack_public_path__ + \"static/media/success.ea0eb806.svg\";\nexport { ForwardRef as ReactComponent };","export default __webpack_public_path__ + \"static/media/mb-logo-white.62b412ba.png\";","import React from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport mbLogoWhite from 'img/mb-logo-white.png';\n\nconst useStyles = makeStyles((theme) => ({\n footer: {\n backgroundColor: theme.Footer.backgroundColor,\n height: theme.Footer.height,\n minHeight: theme.Footer.height,\n maxHeight: theme.Footer.height,\n width: '100%',\n marginTop: 'auto',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n },\n logo: {\n height: '50%',\n },\n}));\n\nconst PageFooter = () => {\n const classes = useStyles();\n return (\n
\n \n
\n );\n};\n\nexport default PageFooter;\n","import create from 'zustand';\n\nconst useStore = create((set) => ({\n parentMenu: {},\n toggleMenu: (menuToUpdate) =>\n set((state) => ({\n parentMenu: {\n ...state.parentMenu,\n [menuToUpdate]: !state.parentMenu[menuToUpdate],\n },\n })),\n activeMenu: null,\n setActiveMenu: (newActiveMenu) =>\n set(() => ({\n activeMenu: newActiveMenu,\n })),\n}));\n\nexport default useStore;\n","var _g, _text;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgConfirmation(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"done-24px\",\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 62.28,\n height: 62.28,\n viewBox: \"0 0 62.28 62.28\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n id: \"Ellipse_25\",\n \"data-name\": \"Ellipse 25\",\n fill: \"none\",\n stroke: \"#f7ed00\",\n strokeWidth: 2\n }, /*#__PURE__*/React.createElement(\"circle\", {\n cx: 31.14,\n cy: 31.14,\n r: 31.14,\n stroke: \"none\"\n }), /*#__PURE__*/React.createElement(\"circle\", {\n cx: 31.14,\n cy: 31.14,\n r: 30.14,\n fill: \"none\"\n }))), _text || (_text = /*#__PURE__*/React.createElement(\"text\", {\n id: \"_\",\n \"data-name\": \"?\",\n transform: \"translate(31.074 41.133)\",\n fill: \"#f7ed09\",\n fontSize: 29,\n fontFamily: \"NunitoSans-Regular, Nunito Sans\"\n }, /*#__PURE__*/React.createElement(\"tspan\", {\n x: -6.424,\n y: 0\n }, \"?\"))));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgConfirmation);\nexport default __webpack_public_path__ + \"static/media/confirmation.dd2a0376.svg\";\nexport { ForwardRef as ReactComponent };","var _g;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgError(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 62.28,\n height: 62.28,\n viewBox: \"0 0 62.28 62.28\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n id: \"done-24px\",\n transform: \"translate(0 -0.439)\"\n }, /*#__PURE__*/React.createElement(\"g\", {\n id: \"Ellipse_25\",\n \"data-name\": \"Ellipse 25\",\n transform: \"translate(0 0.439)\",\n fill: \"none\",\n stroke: \"#d12a2a\",\n strokeWidth: 2\n }, /*#__PURE__*/React.createElement(\"circle\", {\n cx: 31.14,\n cy: 31.14,\n r: 31.14,\n stroke: \"none\"\n }), /*#__PURE__*/React.createElement(\"circle\", {\n cx: 31.14,\n cy: 31.14,\n r: 30.14,\n fill: \"none\"\n })), /*#__PURE__*/React.createElement(\"text\", {\n id: \"_\",\n \"data-name\": \"!\",\n transform: \"translate(31 39.439)\",\n fill: \"#d12a2a\",\n fontSize: 25,\n fontFamily: \"Avenir-Black, Avenir\",\n fontWeight: 800\n }, /*#__PURE__*/React.createElement(\"tspan\", {\n x: -5.55,\n y: 0\n }, \"!\")))));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgError);\nexport default __webpack_public_path__ + \"static/media/error.2bd79629.svg\";\nexport { ForwardRef as ReactComponent };","export default {\n confirmation: 'CONFIRMATION',\n error: 'ERROR',\n information: 'INFORMATION',\n success: 'SUCCESS',\n warning: 'WARNING',\n};\n","/* eslint-disable react/prop-types */\nimport React, { useEffect, useState } from 'react';\nimport {\n Button,\n Typography,\n IconButton,\n Dialog,\n DialogContent,\n DialogActions,\n makeStyles,\n} from '@material-ui/core';\nimport HighlightOffIcon from '@material-ui/icons/HighlightOff';\nimport PropTypes from 'prop-types';\nimport { ReactComponent as SuccessIcon } from 'img/success.svg';\nimport { ReactComponent as ConfirmationIcon } from 'img/confirmation.svg';\nimport { ReactComponent as ErrorIcon } from 'img/error.svg';\nimport WarningOutlined from '@material-ui/icons/WarningOutlined';\nimport InfoIcon from '@material-ui/icons/Info';\nimport classnames from 'classnames';\nimport MESSAGE_TYPE from './constants';\n\nexport const useStyles = makeStyles((theme) => {\n return {\n closeButton: {\n color: theme.palette.grey[500],\n marginLeft: 'auto',\n marginRight: '8px',\n marginTop: '8px',\n padding: '0px',\n position: 'absolute',\n top: '0',\n right: '0',\n },\n title: {\n textAlign: 'center',\n marginTop: theme.spacing(2),\n font: ' normal normal bold 18px/21px Nunito Sans',\n color: '#222222',\n opacity: 1,\n // retain \\r\\n in the string, but merge multi white-space\n whiteSpace: 'pre-line',\n fontWeight: 'normal',\n },\n titleSmall: {\n font: ' normal normal bold 14px/20px Nunito Sans',\n },\n content: {\n textAlign: 'center',\n '@media (max-width:380px)': {\n font: 'normal normal normal 12px/20px Nunito Sans',\n },\n '@media (max-width:330px)': {\n font: 'normal normal normal 11px/20px Nunito Sans',\n },\n font: 'normal normal normal 14px/20px Nunito Sans',\n color: '#222222',\n opacity: 1,\n },\n buttonConfirm: {\n minWidth: '136px',\n minHeight: '30px',\n font: 'normal normal 600 15px/21px Nunito Sans',\n background: `${theme.palette.primary.main} 0% 0% no-repeat padding-box`,\n borderRadius: '3px',\n opacity: 1,\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n fontWeight: 'normal',\n },\n okConfirm: {\n background: 'transparent',\n },\n dlgPaper: {\n background: ' #FFFFFF 0% 0% no-repeat padding-box',\n boxShadow: '0px 4px 14px #00000029',\n borderRadius: '6px',\n opacity: 1,\n padding: '0px',\n maxWidth: '440px',\n },\n actionRoot: {\n justifyContent: 'center',\n },\n contentPadding: {\n paddingTop: theme.spacing(3),\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n contentContainer: {\n '&:first-child': {\n textAlign: 'center',\n },\n paddingTop: '0px!important',\n },\n icon: {\n fontSize: '4em',\n color: (props) => {\n switch (props.messageType) {\n case MESSAGE_TYPE.error:\n return theme.palette.error.main;\n case MESSAGE_TYPE.info:\n return theme.palette.info.main;\n case MESSAGE_TYPE.confirmation: {\n return theme.palette.confirmation.main;\n }\n case MESSAGE_TYPE.warning:\n return theme.palette.warning.main;\n case MESSAGE_TYPE.success:\n return theme.palette.success.main;\n default:\n return theme.palette.text.primary;\n }\n },\n },\n };\n});\n\nconst DialogAction = ({\n okText,\n okButton,\n handleOnOkay,\n cancelText,\n handleOnCancel,\n messageType,\n setFocus,\n mouseDown,\n setMouseDown,\n}) => {\n const classes = useStyles();\n return (\n \n {messageType === MESSAGE_TYPE.confirmation && (\n {\n if (mouseDown) event.target.blur();\n else setFocus(true);\n }}\n onBlur={() => {}}\n // Outline focus is for keyboard-only users\n onMouseUp={() => setMouseDown(false)}\n onMouseDown={() => setMouseDown(true)}\n >\n {cancelText}\n \n )}\n {okButton && (\n {\n if (mouseDown) event.target.blur();\n else setFocus(true);\n }}\n onBlur={() => {}}\n // Outline focus is for keyboard-only users\n onMouseUp={() => setMouseDown(false)}\n onMouseDown={() => setMouseDown(true)}\n >\n {okText}\n \n )}\n \n );\n};\n\nconst MessageIcon = ({ messageType }) => {\n const classes = useStyles({ messageType });\n switch (messageType) {\n case MESSAGE_TYPE.confirmation: {\n return ;\n }\n case MESSAGE_TYPE.error: {\n return ;\n }\n case MESSAGE_TYPE.success: {\n return ;\n }\n case MESSAGE_TYPE.information: {\n return ;\n }\n case MESSAGE_TYPE.warning: {\n return ;\n }\n default: {\n return ;\n }\n }\n};\n\nconst CustomDialog = ({\n title,\n content,\n open,\n titleSize,\n cancelButton,\n cancelText,\n onCancel,\n okButton,\n okText,\n onOkay,\n onClose,\n messageType,\n okAriaLabel,\n cancelAriaLabel,\n footer,\n}) => {\n const classes = useStyles();\n const [mouseDown, setMouseDown] = useState(false);\n const [focus, setFocus] = useState(false);\n\n useEffect(() => {\n if (open) {\n document.getElementById('root').setAttribute('aria-hidden', 'false');\n }\n }, [open]);\n\n useEffect(() => {\n if (!open) setFocus(false);\n }, [open]);\n\n const handleOnOkay = () => {\n if (onOkay) {\n onOkay();\n }\n };\n\n const handleOnCancel = () => {\n if (onCancel) {\n onCancel();\n }\n };\n\n const handleOnClose = () => {\n if (onClose) {\n onClose();\n }\n };\n\n if (\n (title === null || title === '') &&\n (content === null || content === '')\n ) {\n return null;\n }\n\n return (\n <>\n \n
\n \n \n {title && (\n \n {title}\n \n )}\n {content && title &&
}\n {content && (\n \n {content}\n \n )}\n
\n \n {footer}\n {onClose ? (\n \n \n \n ) : null}\n
\n \n \n );\n};\n\nexport default React.memo(CustomDialog);\n\nCustomDialog.propTypes = {\n title: PropTypes.node,\n content: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n open: PropTypes.bool.isRequired,\n onClose: PropTypes.func.isRequired,\n titleSize: PropTypes.string,\n cancelButton: PropTypes.bool,\n cancelText: PropTypes.string,\n onOkay: PropTypes.func,\n okButton: PropTypes.bool,\n okText: PropTypes.string,\n onCancel: PropTypes.func,\n messageType: PropTypes.string,\n footer: PropTypes.element,\n};\n\nCustomDialog.defaultProps = {\n title: null,\n content: null,\n titleSize: 'normal',\n cancelButton: true,\n cancelText: 'No',\n onOkay: null,\n okButton: true,\n okText: 'Yes',\n onCancel: null,\n messageType: null,\n footer: null,\n};\n","import { mapKeys, includes } from 'lodash';\n\nconst isFormDirty = (consentFormState) => {\n const dirtyFields = [];\n mapKeys(consentFormState, (value, key) => {\n if (\n !includes(\n [\n 'date',\n 'informedConsentDateD1',\n 'informedConsentDateD2',\n 'contactInformationConsentDate',\n ],\n key,\n )\n ) {\n if (value.value !== '' && value.value !== undefined)\n dirtyFields.push(key);\n }\n });\n\n if (dirtyFields.length > 0) return true;\n\n return false;\n};\n\nexport default isFormDirty;\n","/* eslint-disable no-console */\nimport create from 'zustand';\nimport { devtools } from 'zustand/middleware';\n\nconst initialFormState = {\n mbRegistrationNumber: {\n value: '',\n },\n phin: {\n value: '',\n },\n otherCompletedBy: {\n conditionalField: true,\n disabled: true,\n validation: {},\n requiredMsg: 'pages.consentForm.completedBy.otherCompletedByEmpty',\n },\n questionFeverOrSymptoms: {\n conditionalField: true,\n disabled: true,\n validation: {},\n requiredMsg:\n 'pages.consentForm.sectionB.questionFeverOrSymptomsCommentEmptySelection',\n },\n questionAllergy: {\n conditionalField: true,\n disabled: true,\n validation: {},\n requiredMsg:\n 'pages.consentForm.sectionB.questionAllergyCommentEmptySelection',\n },\n questionVaccineReaction: {\n conditionalField: true,\n disabled: true,\n validation: {},\n requiredMsg:\n 'pages.consentForm.sectionB.questionVaccineReactionCommentEmptySelection',\n },\n questionMedicalConditions: {\n conditionalField: true,\n disabled: true,\n validation: {},\n requiredMsg:\n 'pages.consentForm.sectionB.questionMedicalConditionsCommentEmptySelection',\n },\n questionBloodClottingMedication: {\n conditionalField: true,\n disabled: true,\n validation: {},\n requiredMsg:\n 'pages.consentForm.sectionB.questionBloodClottingMedicationCommentEmptySelection',\n },\n otherRacialEthnicity: {\n conditionalField: true,\n disabled: true,\n validation: {},\n requiredMsg: 'pages.request.information.errors.emptyWithoutLabel',\n },\n northAmericanIndigenousIdentity: {\n conditionalField: true,\n disabled: true,\n validation: {},\n requiredMsg: 'pages.request.information.errors.emptySelection',\n },\n};\n\nconst useConsentFormStore = create(\n devtools((set) => ({\n formState: initialFormState,\n focusEl: '',\n updateForm: (name, data) =>\n set((state) => ({\n formState: {\n ...state.formState,\n [name]: { ...state.formState[name], ...data },\n },\n })),\n updateWholeForm: (data) =>\n set((state) => ({\n formState: {\n ...state.formState,\n ...data,\n },\n })),\n clearForm: () => set(() => ({ formState: initialFormState })),\n setFocusEl: (value) => {\n set(() => ({\n focusEl: value,\n }));\n },\n schoolsApiHasError: false,\n setSchoolsHasError: (value) =>\n set(() => ({\n schoolsApiHasError: value,\n })),\n loadingSchoolsApi: undefined,\n setLoadingSchoolsApi: (value) =>\n set(() => ({\n loadingSchoolsApi: value,\n })),\n })),\n);\n\nexport default useConsentFormStore;\n","/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable no-lonely-if */\n/* eslint-disable max-len */\nimport React, { useState, useEffect, useContext, useRef } from 'react';\nimport { Link, useLocation } from 'react-router-dom';\nimport PropTypes from 'prop-types';\nimport useStore from 'services/store';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport { LoginContext } from 'services/login/LoginContext';\nimport CustomDialog from 'components/dialog/CustomDialog';\nimport MESSAGE_TYPE from 'components/dialog/constants';\nimport isFormDirty from 'pages/consent-form/helper';\nimport useConsentFormStore from 'services/store/form-stores/eConsentFormStore';\nimport RouterRole from 'constants/routerRole';\n\nconst useStyles = makeStyles((theme) => ({\n groupSelected: {\n backgroundColor: '#1B2355',\n },\n listItem: {\n color: 'white',\n position: 'relative',\n paddingLeft: (props) =>\n props.subMenu ? `${props.subMenuLeftPadding}px` : theme.spacing(2),\n paddingTop: theme.spacing(1),\n paddingRight: theme.spacing(1),\n alignItems: 'flex-start',\n width: (props) => (props.subMenu ? `calc(100% - 24px)` : '100%'),\n },\n icon: {\n color: '#cccccc',\n minWidth: '0px',\n marginTop: '4px',\n marginRight: theme.spacing(2),\n },\n buttonLink: {\n border: 'none',\n width: '100%',\n backgroundColor: 'transparent',\n padding: 0,\n },\n listItemText: {\n whiteSpace: 'pre-wrap',\n },\n listItemTextSelectedParent: {\n whiteSpace: 'pre-wrap',\n '&::after': {\n content: '\"\"',\n display: 'block',\n width: '100%',\n height: '1px',\n backgroundColor: '#9B9B9B',\n marginTop: theme.spacing(2),\n },\n },\n itemMenuSelectedBorder: {\n border: '1px solid #9B9B9B',\n width: (props) =>\n `calc(100% - ${props.subMenu ? props.subMenuLeftPadding : 16}px)`,\n height: `calc(100% - ${theme.spacing(2)}px)`,\n position: 'absolute',\n marginLeft: `-${theme.spacing(1)}px`,\n marginBottom: `-${theme.spacing(2)}px`,\n },\n divider: {\n backgroundColor: '#9B9B9B',\n },\n}));\n\nconst NavigationBarItem = (props) => {\n const {\n text,\n name,\n Icon,\n linkTo,\n onClick,\n newPage,\n endIcon,\n subMenu,\n groupSelected,\n role,\n } = props;\n const location = useLocation();\n const loginContext = useContext(LoginContext);\n const activeMenu = useStore((state) => state.activeMenu);\n const setActiveMenu = useStore((state) => state.setActiveMenu);\n const pathname = location ? location.pathname : '';\n const isMenuItemActive = name === activeMenu;\n const { translate, lang } = useContext(LanguageContext);\n const [modal, setModal] = useState({\n open: false,\n content: '',\n });\n const consentFormState = useConsentFormStore((state) => state.formState);\n const listItemRef = useRef();\n const [listItemHeight, setListItemHeight] = useState('unset');\n const subMenuLeftPadding = 50;\n const classes = useStyles({ subMenu, subMenuLeftPadding, groupSelected });\n\n useEffect(() => {\n const newListItemHeight =\n listItemRef && listItemRef.current\n ? listItemRef.current.clientHeight + 8\n : 'unset';\n\n setListItemHeight(newListItemHeight);\n }, [lang]);\n\n useEffect(() => {\n if (linkTo && linkTo === pathname) {\n setActiveMenu(name);\n }\n }, [activeMenu, name, pathname, linkTo, setActiveMenu]);\n\n useEffect(() => {\n if (linkTo && linkTo !== pathname && activeMenu !== null) {\n setActiveMenu(null);\n }\n }, [pathname]);\n\n const logout = () => {\n loginContext.logout(() => {\n // logout will report error when following steps:\n // 1. login 2. open another tab and get into the same page\n // 3. go back to the first page, logout\n // 4. go to the second page, logout\n // 5. error occure.\n // the reason is we use localstorage, when logout first time,\n // the b2c enters redirect-login state\n // if you logout at this time, because the first redirect-login request\n // is still in progress, then the error occurs\n setModal({\n open: true,\n content: translate('pages.consentForm.error'),\n });\n });\n };\n\n const itemClick = (e, redirectTo) => {\n if (translate(text) === translate('layout.nav.logout')) {\n e.preventDefault();\n if (!isFormDirty(consentFormState)) {\n logout();\n } else {\n setModal({\n open: true,\n content: translate('pages.consentForm.logoutWhenFormIsDirty'),\n onClose: () => setModal({ open: false }),\n onClick: () => {\n setModal({ open: false });\n logout();\n },\n okText: translate('pages.request.yes'),\n cancelText: translate('pages.request.no'),\n });\n }\n }\n\n if (pathname === redirectTo) {\n e.preventDefault();\n }\n if (onClick && translate(text) !== translate('layout.nav.logout')) {\n onClick(name);\n }\n };\n\n const target = newPage ? '_blank' : '_self';\n const linkWithLanguage = newPage ? `${linkTo}?lang=${lang}` : linkTo;\n\n let linkContent = null;\n if (\n (role === RouterRole.PUBLIC && !loginContext) ||\n (role === RouterRole.PROTECTED && loginContext)\n ) {\n linkContent = (\n
\n \n \n {Icon}\n \n \n {endIcon}\n
\n \n \n );\n }\n\n if (linkContent === null) {\n return null;\n }\n const menuLink = linkTo ? (\n itemClick(e, linkTo)}\n target={target}\n aria-current={isMenuItemActive}\n >\n {linkContent}\n \n ) : (\n itemClick(e, linkTo)}\n aria-current={isMenuItemActive}\n >\n {linkContent}\n \n );\n\n return (\n <>\n setModal({ open: false })}\n onCancel={() => setModal({ open: false })}\n onOkay={modal.onClick}\n okText={modal.okText}\n cancelText={modal.cancelText}\n />\n {menuLink}\n \n );\n};\n\nNavigationBarItem.propTypes = {\n name: PropTypes.string.isRequired,\n text: PropTypes.string.isRequired,\n Icon: PropTypes.element,\n linkTo: PropTypes.string,\n onClick: PropTypes.func,\n newPage: PropTypes.bool,\n endIcon: PropTypes.element,\n subMenu: PropTypes.bool,\n groupSelected: PropTypes.bool,\n role: PropTypes.string,\n};\n\nNavigationBarItem.defaultProps = {\n Icon: null,\n linkTo: null,\n onClick: null,\n newPage: false,\n endIcon: null,\n subMenu: false,\n groupSelected: false,\n role: '',\n};\n\nexport default NavigationBarItem;\n","export default __webpack_public_path__ + \"static/media/mb-logo.dcd7fe29.png\";","import React, { useContext } from 'react';\nimport { Box, Typography, makeStyles } from '@material-ui/core';\nimport PropTypes from 'prop-types';\nimport mbLogo from 'img/mb-logo-white.png';\nimport mbLogoGreen from 'img/mb-logo.png';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport { useHistory } from 'react-router-dom';\n\nconst useStyles = makeStyles(() => ({\n paper: {\n textAlign: (props) => (props.center ? 'center' : 'left'),\n },\n title: {\n paddingTop: 2,\n fontSize: 14,\n color: 'white',\n },\n imgLogo: {\n cursor: (props) => (props.clickable ? 'pointer' : 'default'),\n },\n}));\n\nconst NavBarLogo = ({ isWhiteLogo, center, clickable }) => {\n const classes = useStyles({ center, clickable });\n const history = useHistory();\n const { translate } = useContext(LanguageContext);\n\n const handleOnClick = () => history.push('/');\n\n return (\n \n {isWhiteLogo ? (\n \n ) : (\n \n )}\n\n \n {translate('layout.logoText')}\n \n \n );\n};\n\nexport default NavBarLogo;\nNavBarLogo.propTypes = {\n isWhiteLogo: PropTypes.bool,\n center: PropTypes.bool,\n clickable: PropTypes.bool,\n};\nNavBarLogo.defaultProps = {\n isWhiteLogo: false,\n center: false,\n clickable: true,\n};\n","import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { Collapse } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';\nimport ArrowDropUpIcon from '@material-ui/icons/ArrowDropUp';\nimport { LoginContext } from 'services/login/LoginContext';\nimport useStore from 'services/store';\nimport RouterRole from 'constants/routerRole';\nimport NavigationBarItem from './NavigationBarItem';\n\nconst useStyles = makeStyles((theme) => ({\n wrapper: {\n backgroundColor: theme.palette.primary.main,\n },\n}));\n\nconst NavigationBarItemGroup = ({\n Icon,\n name,\n subMenu,\n text,\n onClick,\n role,\n}) => {\n /* Since the parent layout component is unmounted and remounted on every route\n change, internal state is lost. Using a global store to help manage this.\n If other sub menus are added the state management will need to be updated\n to allow for this. */\n const classes = useStyles();\n const loginContext = useContext(LoginContext);\n const parentMenu = useStore((state) => state.parentMenu);\n const toggleMenu = useStore((state) => state.toggleMenu);\n const isParentMenuOpen = parentMenu[name];\n const subMenuItems = subMenu.map((item) => (\n \n ));\n\n if (\n (role === RouterRole.PUBLIC && loginContext) ||\n (role === RouterRole.PROTECTED && !loginContext)\n ) {\n return null;\n }\n\n return (\n <>\n : }\n groupSelected={isParentMenuOpen}\n role={role}\n />\n \n {subMenuItems}\n \n \n );\n};\n\nexport default NavigationBarItemGroup;\n\nNavigationBarItemGroup.propTypes = {\n text: PropTypes.string.isRequired,\n Icon: PropTypes.element,\n name: PropTypes.string.isRequired,\n subMenu: PropTypes.arrayOf(\n PropTypes.shape({\n url: PropTypes.string,\n showInNavBar: PropTypes.bool,\n showName: PropTypes.string,\n icon: PropTypes.element,\n newPage: PropTypes.bool,\n }),\n ).isRequired,\n onClick: PropTypes.func,\n role: PropTypes.string.isRequired,\n};\n\nNavigationBarItemGroup.defaultProps = {\n onClick: null,\n Icon: null,\n};\n","import React, { Fragment, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles, CssBaseline, List, Drawer, Link } from '@material-ui/core';\nimport { useTheme } from '@material-ui/core/styles';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport { LoginContext } from 'services/login/LoginContext';\nimport RouterRole from 'constants/routerRole';\nimport useStore from 'services/store';\nimport NavigationBarItem from './NavigationBarItem';\nimport { getCommon } from '../../commons/index';\nimport NavBarLogo from './NavBarLogo';\nimport FooterContainer from '../footer/PageFooter';\nimport NavigationBarItemGroup from './NavigationBarItemGroup';\n\nconst useStyles = makeStyles((theme) => {\n return {\n drawer: {\n width: '100%',\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n },\n drawerHeader: {\n minHeight: theme.Header.height,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n drawerItems: {\n display: 'flex',\n flexDirection: 'column',\n margin: '0px 3px',\n },\n listContainer: {\n paddingTop: 0,\n display: 'flex',\n flexDirection: 'column',\n },\n infoTextContainer: {\n marginTop: 'auto',\n padding: '16px',\n },\n infoText: {\n fontSize: '0.85em',\n },\n drawerPaper: {\n backgroundColor: theme.palette.primary.main,\n width: '100%',\n [theme.breakpoints.only('xs')]: {\n width: '90%',\n },\n [theme.breakpoints.up(theme.navBarBreakpoint.hideDrawerName)]: {\n position: 'relative',\n },\n },\n navContainer: {\n [theme.breakpoints.only('xs')]: {\n width: '90%',\n },\n [theme.breakpoints.only('sm')]: {\n width: '50%',\n },\n [theme.breakpoints.up('md')]: {\n width: '30%',\n },\n [theme.breakpoints.up('lg')]: {\n width: '25%',\n },\n position: 'sticky',\n top: '0',\n left: '0',\n },\n headerContainer: {\n width: '100%',\n maxHeight: theme.Header.height,\n minHeight: theme.Header.height,\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n margin: 0,\n padding: 0,\n },\n languageLink: {\n display: 'block',\n textDecortion: 'underline',\n marginTop: theme.spacing(1),\n color: 'white',\n },\n };\n});\n\nconst NavigationDrawer = ({ isOpen, onClose, variant }) => {\n const { getGroup } = getCommon();\n const menuSections = [getGroup(1), getGroup(2), getGroup(3), getGroup(4)];\n const loginContext = useContext(LoginContext);\n const { translate, toggleLang } = useContext(LanguageContext);\n const parentMenu = useStore((state) => state.parentMenu);\n const classes = useStyles();\n const theme = useTheme();\n\n const getMenuSection = (menuItems) =>\n menuItems\n .map((item) => {\n if (item.subMenu) {\n if (\n (item.role === RouterRole.PUBLIC && loginContext) ||\n (item.role === RouterRole.PROTECTED && !loginContext)\n ) {\n return null;\n }\n // if (item.name === 'covidPublic') return null;\n return (\n \n );\n }\n return (\n \n );\n })\n // Removing nulls\n .filter((item) => item);\n\n const menuJsx = menuSections.map((menuItems) => {\n const menuSection = getMenuSection(menuItems);\n if (!menuSection || menuSection.length === 0) {\n return null;\n }\n return (\n \n {menuSection !== null && (\n \n {menuSection}\n \n )}\n \n );\n });\n\n const drawer = (\n
\n
\n
\n \n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n \n {translate('layout.otherLanguage')}\n \n
\n
\n
\n
{menuJsx}
\n
\n\n \n
\n );\n\n return (\n <>\n \n \n {drawer}\n \n \n );\n};\n\nexport default NavigationDrawer;\nNavigationDrawer.propTypes = {\n isOpen: PropTypes.bool.isRequired,\n onClose: PropTypes.func,\n\n variant: PropTypes.string,\n};\nNavigationDrawer.defaultProps = {\n variant: 'temporary',\n onClose: null,\n};\n","var _path, _path2, _path3;\n\nvar _excluded = [\"title\", \"titleId\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from \"react\";\n\nfunction SvgEditCard(_ref, svgRef) {\n var title = _ref.title,\n titleId = _ref.titleId,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n id: \"edit_card\",\n \"data-name\": \"edit card\",\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 22.999,\n height: 19.995,\n viewBox: \"0 0 22.999 19.995\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n id: \"Path_464\",\n \"data-name\": \"Path 464\",\n d: \"M319.935,596.711h17.007v-.02h2.126v-5.986a2.059,2.059,0,0,0-2.111-2H319.935a2.053,2.053,0,0,0-2.116,1.982v.021l-.011,12.013a2.06,2.06,0,0,0,2.112,2h9.041v-2h-9.026Zm0-6.006h17.007v2H319.935Z\",\n transform: \"translate(-317.808 -588.702)\",\n fill: \"#fff\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n id: \"Path_465\",\n \"data-name\": \"Path 465\",\n d: \"M339.271,599.275l-.729-.728a1.022,1.022,0,0,0-1.448,0l-.729.728,2.177,2.177.729-.729A1.024,1.024,0,0,0,339.271,599.275Z\",\n transform: \"translate(-316.572 -588.049)\",\n fill: \"#fff\"\n })), _path3 || (_path3 = /*#__PURE__*/React.createElement(\"path\", {\n id: \"Path_466\",\n \"data-name\": \"Path 466\",\n d: \"M330.2,605.445v2.176h2.176l5.441-5.441L335.637,600Z\",\n transform: \"translate(-316.572 -587.627)\",\n fill: \"#fff\"\n })));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(SvgEditCard);\nexport default __webpack_public_path__ + \"static/media/edit-card.5d25bb51.svg\";\nexport { ForwardRef as ReactComponent };","/* eslint-disable no-unused-vars */\nimport React, { useState, useContext, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport AppBar from '@material-ui/core/AppBar';\nimport IconButton from '@material-ui/core/IconButton';\nimport Hidden from '@material-ui/core/Hidden';\nimport MenuIcon from '@material-ui/icons/Menu';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport Link from '@material-ui/core/Link';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport { Link as RouterLink, useLocation } from 'react-router-dom';\nimport pagesUrl from 'commons/config/PagesUrl';\nimport FooterContainer from '../footer/PageFooter';\nimport NavigationDrawer from './NavigationDrawer';\nimport NavBarLogo from './NavBarLogo';\nimport { ReactComponent as EditCard } from '../../img/edit-card.svg';\n\nconst useStyles = makeStyles((theme) => {\n return {\n root: {\n display: 'flex',\n },\n appBar: {\n height: theme.Header.height,\n backgroundColor: theme.palette.primary.main,\n boxShadow: 'none',\n // use this property to cover the top of permanent drawer\n zIndex: theme.zIndex.drawer + 1,\n },\n toolbar: {\n height: '100%',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n menuButton: {\n marginRight: '0px',\n marginLeft: `-${theme.spacing(1)}px`,\n zIndex: '999',\n },\n content: {\n flexGrow: 1,\n },\n // Bringing tooltip closer to the button\n tooltip: {\n marginTop: theme.spacing(1),\n fontSize: '1em',\n padding: '10px',\n textAlign: 'center',\n color: 'rgba(0, 0, 0, 0.87)',\n backgroundColor: 'white',\n boxShadow: theme.shadows[1],\n },\n arrow: {\n color: 'white',\n },\n linkText: {\n fontSize: '0.85em',\n },\n languageLink: {\n textDecoration: 'underline',\n color: 'white',\n display: (props) =>\n props.alwaysShowLanguageToggle ? 'inline-block' : 'none',\n\n [theme.breakpoints.up(theme.navBarBreakpoint.hideDrawerName)]: {\n display: () => 'inline-block',\n marginLeft: 'auto',\n },\n },\n logoContainer: {\n width: '100%',\n position: 'absolute',\n left: 0,\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n },\n };\n});\n\nconst NavigationBar = (props) => {\n const { children, showIconButton, alwaysShowLanguageToggle, forceShow } =\n props;\n const classes = useStyles({ alwaysShowLanguageToggle });\n const [isDrawerOpen, setDrawerOpen] = useState(false);\n const { translate, toggleLang } = useContext(LanguageContext);\n const theme = useTheme();\n const location = useLocation();\n useEffect(() => {\n const closeDrawer = () => setDrawerOpen(false);\n window.addEventListener('resize', closeDrawer);\n return () => window.removeEventListener('resize', closeDrawer);\n }, []);\n\n const handleDrawerToggle = (isOpen) => {\n setDrawerOpen(isOpen);\n };\n\n const NavBar = () => {\n return (\n <>\n \n \n {showIconButton ? (\n handleDrawerToggle(!isDrawerOpen)}\n className={classes.menuButton}\n >\n \n \n ) : (\n
\n )}\n
\n \n
\n {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}\n \n {translate('layout.otherLanguage')}\n \n \n \n {isDrawerOpen && (\n handleDrawerToggle(false)}\n />\n )}\n\n
\n
\n
\n {children}\n
\n
\n \n );\n };\n\n if (forceShow) return <>{NavBar()};\n\n return (\n {NavBar()}\n );\n};\n\nNavigationBar.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.arrayOf(PropTypes.element),\n ]),\n showIconButton: PropTypes.bool,\n alwaysShowLanguageToggle: PropTypes.bool,\n forceShow: PropTypes.bool,\n};\n\nNavigationBar.defaultProps = {\n children: null,\n showIconButton: true,\n alwaysShowLanguageToggle: true,\n forceShow: false,\n};\n\nexport default NavigationBar;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles, Typography, IconButton } from '@material-ui/core';\nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport { useHistory } from 'react-router-dom';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\n\nconst useStyles = makeStyles((theme) => {\n return {\n root: {\n display: 'flex',\n },\n appBar: {\n height: theme.Header.height,\n backgroundColor: theme.palette.primary.main,\n boxShadow: 'none',\n zIndex: theme.zIndex.drawer + 1,\n },\n toolbar: {\n height: '100%',\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n paddingLeft: theme.spacing(1),\n paddingRight: theme.spacing(1),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n },\n content: {\n flexGrow: 1,\n },\n backButton: {\n marginRight: 0,\n marginLeft: 0,\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n },\n },\n backIcon: {\n fontSize: '32px',\n fontWeight: 'bold',\n },\n detailHeaderTitle: {\n position: 'absolute',\n left: '0',\n width: '100%',\n textAlign: 'center',\n zIndex: '-1',\n },\n };\n});\n\nconst DetailNavigationBar = (props) => {\n const {\n children,\n detailHeader,\n alwaysShowLanguageToggle,\n backButtonClicked,\n } = props;\n const classes = useStyles({ alwaysShowLanguageToggle });\n const history = useHistory();\n\n const handleBackButtonOnClick = () => {\n history.goBack();\n };\n\n return (\n <>\n \n \n \n \n \n\n \n {detailHeader}\n \n \n \n
\n
\n
\n {children}\n
\n
\n \n );\n};\n\nDetailNavigationBar.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.arrayOf(PropTypes.element),\n ]),\n detailHeader: PropTypes.string,\n alwaysShowLanguageToggle: PropTypes.bool,\n backButtonClicked: PropTypes.func,\n};\n\nDetailNavigationBar.defaultProps = {\n children: null,\n detailHeader: '',\n alwaysShowLanguageToggle: false,\n backButtonClicked: null,\n};\n\nexport default DetailNavigationBar;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Container from '@material-ui/core/Container';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport withWidth from '@material-ui/core/withWidth';\nimport Hidden from '@material-ui/core/Hidden';\nimport { includes } from 'lodash';\nimport NavigationBar from '../navigation-bar/NavigationBar';\nimport DetailNavigationBar from '../navigation-bar/DetailNavigationBar';\nimport FooterContainer from '../footer/PageFooter';\nimport NavigationDrawer from '../navigation-bar/NavigationDrawer';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: theme.palette.background.default,\n },\n container: {\n display: 'flex',\n flexDirection: 'column',\n marginLeft: 'auto',\n marginRight: 'auto',\n minHeight: '100%',\n width: '100%',\n maxWidth: (props) => props.maxWidth,\n padding: '0px',\n [theme.breakpoints.up('sm')]: {\n padding: theme.spacing(2),\n },\n // change some styles when nav bar is shown\n // [theme.breakpoints.down(theme.navBarBreakpoint.hideDrawerName)]: {\n // maxWidth: '100%',\n // paddingBottom: theme.spacing(2),\n // },\n },\n\n // Moves scrollbar to edge of screen, for aesthetics and so tablets\n // users can use the background/margin to scroll content\n scroll: {\n flexGrow: 1,\n overflow: 'auto',\n },\n drawerAndContentContainer: {\n display: 'flex',\n overflow: 'hidden',\n justifyContent: 'center',\n height: '100%',\n },\n // Safari won't always take 100% and we can't have dupe keys in the same class\n safariDrawerAndContentContainer: {\n height: 'fill-available',\n },\n}));\n\nconst PageLayout = (props) => {\n const {\n children,\n showNavigation,\n // eslint-disable-next-line no-unused-vars\n showDrawer,\n alwaysShowLanguageToggle,\n detailHeader,\n backButtonClicked,\n width,\n forceShowFooter,\n forceShowAppBar,\n maxWidth,\n } = props;\n const classes = useStyles({ maxWidth });\n const theme = useTheme();\n const showFooter = !forceShowFooter\n ? includes(['xs', 'sm', 'md'], width)\n : true;\n return (\n
\n {showNavigation && (\n \n )}\n {!showNavigation && (\n \n )}\n \n \n {showDrawer && (\n \n )}\n \n
\n \n {children}\n \n
\n
\n\n {showFooter && }\n
\n );\n};\n\nPageLayout.defaultProps = {\n children: null,\n showNavigation: true,\n showDrawer: true,\n alwaysShowLanguageToggle: false,\n detailHeader: '',\n backButtonClicked: null,\n width: null,\n forceShowFooter: false,\n forceShowAppBar: false,\n maxWidth: '100%',\n};\n\nPageLayout.propTypes = {\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.element),\n PropTypes.element,\n ]),\n showNavigation: PropTypes.bool,\n showDrawer: PropTypes.bool,\n alwaysShowLanguageToggle: PropTypes.bool,\n detailHeader: PropTypes.string,\n backButtonClicked: PropTypes.func,\n width: PropTypes.string,\n forceShowFooter: PropTypes.bool,\n forceShowAppBar: PropTypes.bool,\n maxWidth: PropTypes.string,\n};\n\nexport default withWidth()(PageLayout);\n","import { LANG } from 'utility/languageUtility';\n\nexport default function getPageTitle(_pageTitle, _lang) {\n let fixedTitle = `Province of Manitoba`;\n if (_lang === LANG.FR) fixedTitle = 'Province du Manitoba';\n\n return `${fixedTitle} | ${_pageTitle}`;\n}\n","import React from 'react';\nimport { Link } from '@material-ui/core';\n\nexport default {\n wpgPhone: (\n \n 204-786-7101\n \n ),\n tollFreePhone: (\n \n 1-800-392-1207\n \n ),\n deafAccessPhone: (\n \n 204-774-8618\n \n ),\n seniorCarePhone: (\n \n 1-431-334-9445\n \n ),\n mbHealthCardLink: (\n \n https://www.gov.mb.ca/health/mhsip/mbcard.html\n \n ),\n mbHealthCardLinkFr: (\n \n https://www.gov.mb.ca/health/mhsip/mbcard.fr.html\n \n ),\n mbHealthEmail: (\n \n Insuredben@gov.mb.ca\n \n ),\n contactEmail: (\n \n immunizationcardsupport@gov.mb.ca\n \n ),\n healthndSeniorsCareWebsite: (\n \n https://forms.gov.mb.ca/notice-of-change/index.html\n \n ),\n consentGuidelinesLink: (\n \n www.manitoba.ca/health/publichealth/cdc/protocol/consentguidelines.pdf.\n \n ),\n covidVaccineResourcesLink: (\n \n www.gov.mb.ca/covid19/vaccine/resources.html\n \n ),\n covidVaccineResourcesLinkFr: (\n \n www.gov.mb.ca/covid19/vaccine/resources.fr.html\n \n ),\n publicHealthOfficeWebsite: (\n \n www.manitoba.ca/health/publichealth/offices.html\n \n ),\n publicHealthOfficeWebsiteFr: (\n \n www.manitoba.ca/health/publichealth/offices.fr.html\n \n ),\n shareHealthLink: (\n \n sharedhealthmb.ca/covid19/test-results/\n \n ),\n healthndSeniorsCareWebsiteFr: (\n \n https://forms.gov.mb.ca/notice-of-change/index.fr.html\n \n ),\n shareHealthLinkFr: (\n \n covid19.soinscommunsmb.ca/covid19/resultats-test/\n \n ),\n recordLinkEn: (\n \n https://manitoba.ca/covid19/vaccine/immunization-record.html\n \n ),\n recordLinkFr: (\n \n manitoba.ca/covid19/vaccine/immunization-record.fr.html\n \n ),\n forResidentsEn: (\n \n Province of Manitoba | For Residents\n \n ),\n forResidentsFr: (\n \n Province du Manitoba | Résidents\n \n ),\n recordLinkUnderline: (\n \n https://manitoba.ca/covid19/vaccine/immunization-record.html\n \n ),\n};\n","import React, { useContext, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Accordion from '@material-ui/core/Accordion';\nimport AccordionSummary from '@material-ui/core/AccordionSummary';\nimport AccordionDetails from '@material-ui/core/AccordionDetails';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowRightIcon from '@material-ui/icons/ArrowRight';\nimport { Box } from '@material-ui/core';\nimport links from 'constants/links';\nimport { useLocation } from 'react-router-dom';\nimport { LanguageContext } from '../../services/localization/LanguageContext';\nimport { getLanguage } from '../../utility/languageUtility';\n\nconst linkObject = {\n healthndSeniorsCareWebsite: links.healthndSeniorsCareWebsite,\n seniorCarePhone: links.seniorCarePhone,\n shareHealthLink: links.shareHealthLink,\n immunizationManitobaLink: links.immunizationManitobaLink,\n healthndSeniorsCareWebsiteFr: links.healthndSeniorsCareWebsiteFr,\n shareHealthLinkFr: links.shareHealthLinkFr,\n immunizationManitobaLinkFr: links.immunizationManitobaLinkFr,\n publicHealthOfficeWebsite: links.publicHealthOfficeWebsite,\n publicHealthOfficeWebsiteFr: links.publicHealthOfficeWebsiteFr,\n};\n\nconst getStyles = makeStyles((theme) => ({\n root: {\n width: '100%',\n },\n spaceTopBottom: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n title: {\n marginBottom: theme.spacing(3),\n fontWeight: 'bold',\n },\n expandIcon: {\n fontSize: 40,\n },\n expandIconButton: {\n order: -1,\n '&.Mui-expanded': {\n transform: 'rotate(90deg)!important',\n },\n },\n expanded: {\n transform: 'rotate(90deg)',\n },\n expandIconBlue: {\n color: '#004F9A',\n },\n expandIconBlack: {\n color: 'black',\n fontSize: 32,\n },\n accordionroot: {\n '&:before': {\n backgroundColor: 'transparent!important',\n },\n boxShadow: 'none',\n },\n sectionRootSummary: {\n boxShadow: '0px 3px 10px #00000012',\n border: '1px solid #C7D0D8',\n borderRadius: '9px',\n marginBottom: theme.spacing(2),\n },\n questionRootSummary: {\n background: '#F2F8F8C4 0% 0% no-repeat padding-box;',\n },\n questionCatalogTitle: {\n fontSize: 16,\n fontWeight: 'bold',\n marginBottom: theme.spacing(2),\n },\n questionTitle: {\n fontWeight: 'bold',\n },\n questionDetails: {\n flexDirection: 'column',\n },\n content: {\n fontSize: '16px',\n lineHeight: '1.3em',\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word',\n },\n footer: {\n padding: '8px 16px 16px',\n textAlign: 'center',\n },\n centered: {\n textAlign: 'center',\n },\n list: {\n padding: '0px',\n margin: '0px',\n fontSize: 16,\n },\n container: {\n backgroundColor: theme.palette.background.paper,\n padding: theme.spacing(3),\n },\n}));\nconst analyzeAnswer = (answerArray, languageContext, classes) => {\n const { translate, lang } = languageContext;\n if (!answerArray || !(answerArray instanceof Array)) {\n return null;\n }\n const jsx = (\n <>\n {answerArray.map((answer, index) => {\n if (typeof answer === 'string') {\n return (\n \n {translate('answer', linkObject, { answer: { [lang]: answer } })}\n \n );\n }\n if (typeof answer === 'object') {\n if (answer.list) {\n return (\n
    \n {answer.list.map((li, liIndex) => {\n return (\n
  • \n {li}\n
  • \n );\n })}\n
\n );\n }\n return null;\n }\n return null;\n })}\n
\n
\n \n );\n\n return jsx;\n};\nconst getQuestionsJsx = (questionArray, title, languageContext, classes) => {\n const { translate } = languageContext;\n const jsx = questionArray.map((qa, index) => {\n return translate('question', null, qa) === 'placeholder' ? null : (\n
\n \n \n }\n aria-controls=\"panel1a-content\"\n >\n \n {translate('question', null, qa)}\n \n \n \n {analyzeAnswer(\n translate('answer', null, qa),\n languageContext,\n classes,\n )}\n \n \n
\n );\n });\n return jsx;\n};\nconst getAccordingDetailJsx = (faqArray, languageContext, classes) => {\n const { translate } = languageContext;\n const jsx = faqArray.map((aq, index) => {\n const title = translate('title', null, aq);\n return title === 'placeholder' ? null : (\n
\n {getQuestionsJsx(aq.questions, title, languageContext, classes)}\n
\n );\n });\n return jsx;\n};\n\nconst FAQSections = ({ faqArray, title }) => {\n const classes = getStyles();\n const languageContext = useContext(LanguageContext);\n const { changeLanguage, translate } = languageContext;\n const { search } = useLocation();\n useEffect(() => {\n // only execute when load\n const lng = getLanguage(search);\n changeLanguage(lng);\n }, [changeLanguage, search]);\n\n return (\n
\n \n \n {title}\n \n {getAccordingDetailJsx(faqArray, languageContext, classes)}\n \n {translate('FAQ.footer', linkObject)}\n \n \n
\n );\n};\n\nexport default FAQSections;\n\nFAQSections.propTypes = {\n // eslint-disable-next-line react/forbid-prop-types\n faqArray: PropTypes.array,\n title: PropTypes.string.isRequired,\n};\nFAQSections.defaultProps = {\n faqArray: [],\n};\n","import React, { useEffect, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport withWidth from '@material-ui/core/withWidth';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport PageLayout from 'components/page-layout/PageLayout';\nimport { includes } from 'lodash';\nimport getPageTitle from 'utility/pageTitle';\nimport FAQSections from '../../components/faq/FAQSections';\n\nconst FAQProxyPage = ({ width }) => {\n const { getTranslationObj, translate, lang } = useContext(LanguageContext);\n\n useEffect(() => {\n document.title = getPageTitle(translate('FAQ.title'), lang);\n }, [translate, lang]);\n\n const questionArray = getTranslationObj('FAQ.faqArray');\n const maxWidth = includes(['xs', 'sm', 'md'], width) ? '100%' : '60%';\n return (\n <>\n \n \n \n \n );\n};\n\nFAQProxyPage.defaultProps = {\n width: null,\n};\n\nFAQProxyPage.propTypes = {\n width: PropTypes.string,\n};\n\nexport default withWidth()(FAQProxyPage);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme) => ({\n customButton: {\n padding: theme.spacing(1),\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(4),\n },\n}));\n\nconst CustomizedButton = (props) => {\n const { children, className } = props;\n const classes = useStyles();\n const buttonStyles = className\n ? [classes.customButton, className].join(' ')\n : classes.customButton;\n return (\n \n );\n};\n\nCustomizedButton.propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n};\n\nCustomizedButton.defaultProps = {\n className: '',\n children: '',\n};\n\nexport default CustomizedButton;\n","/* eslint-disable react/forbid-prop-types */\nimport React, { useContext, useEffect, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n FormControl,\n FormControlLabel,\n Radio,\n RadioGroup,\n FormLabel,\n makeStyles,\n FormHelperText,\n} from '@material-ui/core';\nimport { LanguageContext } from 'services/localization/LanguageContext';\n// eslint-disable-next-line import/no-cycle\nimport FormInput from '../FormInput';\n\nconst useStyles = makeStyles((theme) => ({\n formLabel: {\n color: 'unset',\n lineHeight: 1.5,\n },\n selectedRadio: {\n color: `${theme.palette.primary.dark}!important`,\n },\n radioGroup: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n width: '100%',\n },\n radioGroupItemContainer: {\n marginLeft: (props) =>\n props.indentOptions ? `${theme.spacing(2)}px` : '0px',\n },\n visuallyHidden: {\n position: 'absolute',\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n width: '1px',\n margin: '-1px',\n padding: 0,\n border: 0,\n },\n}));\n\nconst RadioGroupCustom = ({\n label,\n ariaLabel,\n name,\n value,\n required,\n options,\n onChange,\n onBlur,\n error,\n errorAria,\n formState,\n fullWidth,\n disabled,\n indentOptions,\n focusEl,\n}) => {\n const classes = useStyles({ indentOptions });\n const { translate } = useContext(LanguageContext);\n const ref = useRef(null);\n\n useEffect(() => {\n if (ref && ref.current && name === focusEl) {\n ref.current.focus();\n }\n }, [name, focusEl]);\n\n const radioOptions = options.map((option) => {\n const inputs = [\n \n }\n label={translate(option.label)}\n required={required}\n error={Boolean(error)}\n />,\n ];\n if (option.render) {\n inputs.push(\n {\n onChange(inputName, inputValue);\n }}\n onBlur={(inputName, inputValue) => {\n onBlur(inputName, inputValue);\n }}\n />,\n );\n }\n\n return inputs;\n });\n\n const handleOnChange = (e) => {\n if (onChange) onChange(name, e.target.value);\n };\n\n return (\n \n \n {`${required ? '* ' : ''}${translate(label)}\n `}\n \n {`${\n required ? translate('pages.consentForm.requiredFieldAria') : ''\n }${translate(ariaLabel || label)}${\n Boolean(error) === true\n ? `. (${translate(errorAria || error)})`\n : ''\n }\n }`}\n \n \n {error !== null && error !== '' ? (\n \n {translate(error)}\n \n ) : null}\n \n {radioOptions}\n \n \n );\n};\n\nRadioGroupCustom.defaultProps = {\n required: false,\n error: null,\n errorAria: null,\n ariaLabel: undefined,\n formState: {},\n fullWidth: false,\n disabled: false,\n onBlur: () => {},\n indentOptions: false,\n focusEl: undefined,\n};\n\nRadioGroupCustom.propTypes = {\n label: PropTypes.string.isRequired,\n ariaLabel: PropTypes.string,\n name: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n value: PropTypes.string,\n label: PropTypes.string,\n }),\n ).isRequired,\n onChange: PropTypes.func.isRequired,\n onBlur: PropTypes.func,\n required: PropTypes.bool,\n error: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(\n PropTypes.string,\n PropTypes.shape({ label: PropTypes.string }),\n ),\n ]),\n errorAria: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(\n PropTypes.string,\n PropTypes.shape({ label: PropTypes.string }),\n ),\n ]),\n formState: PropTypes.object,\n fullWidth: PropTypes.bool,\n disabled: PropTypes.bool,\n indentOptions: PropTypes.bool,\n focusEl: PropTypes.string,\n};\n\nexport default RadioGroupCustom;\n","/* eslint-disable no-unused-vars */\nimport React, { useContext, useEffect, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n FormControl,\n makeStyles,\n Select,\n MenuItem,\n InputLabel,\n FormHelperText,\n} from '@material-ui/core';\nimport { LanguageContext } from 'services/localization/LanguageContext';\n\nconst useStyles = makeStyles((theme) => ({\n select: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n width: '100%',\n },\n visuallyHidden: {\n position: 'absolute',\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n width: '1px',\n margin: '-1px',\n padding: 0,\n border: 0,\n },\n}));\n\nconst SelectCustom = ({\n label,\n name,\n value,\n options,\n onChange,\n onBlur,\n error,\n errorAria,\n required,\n ariaLabel,\n focusEl,\n}) => {\n const classes = useStyles();\n const { translate } = useContext(LanguageContext);\n const ref = useRef(null);\n const hasError = Boolean(error) && value === '';\n\n useEffect(() => {\n if (name === focusEl && ref && ref.current) {\n ref.current.focus();\n }\n }, [name, focusEl]);\n\n const selectOptions = options.map((option, i) => (\n \n {translate(option.label)}\n \n ));\n\n const handleOnChange = (e) => {\n if (onChange) onChange(name, e.target.value);\n };\n\n const handleOnBlur = (e) => {\n if (onBlur) onBlur(name, e.target.value);\n };\n\n return (\n \n \n {`${required ? '* ' : ''}${translate(label)}\n `}\n \n {`${\n required ? translate('pages.consentForm.requiredFieldAria') : ''\n }${translate(ariaLabel || label)}${\n hasError ? `. ${translate(errorAria || error)}` : ''\n }\n }`}\n \n \n \n {selectOptions}\n \n {hasError ? (\n \n {translate(error)}\n \n ) : null}\n \n );\n};\n\nSelectCustom.defaultProps = {\n error: null,\n errorAria: null,\n required: false,\n onBlur: () => {},\n ariaLabel: undefined,\n focusEl: undefined,\n};\n\nSelectCustom.propTypes = {\n label: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n value: PropTypes.string,\n label: PropTypes.string,\n }),\n ).isRequired,\n onChange: PropTypes.func.isRequired,\n onBlur: PropTypes.func,\n required: PropTypes.bool,\n error: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(\n PropTypes.string,\n PropTypes.shape({ label: PropTypes.string }),\n ),\n ]),\n errorAria: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(\n PropTypes.string,\n PropTypes.shape({ label: PropTypes.string }),\n ),\n ]),\n ariaLabel: PropTypes.string,\n focusEl: PropTypes.string,\n};\n\nexport default SelectCustom;\n","import React, { useContext, useState, useRef, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n FormControlLabel,\n Checkbox,\n makeStyles,\n Typography,\n} from '@material-ui/core';\nimport links from 'constants/links';\nimport { useTheme } from '@material-ui/core/styles';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport classNames from 'classnames';\n\nconst useStyles = makeStyles((theme) => ({\n errorColor: {\n color: theme.palette.error.main,\n },\n selectedColor: {\n color: `${theme.palette.primary.dark}!important`,\n },\n formControlLabel: {\n alignItems: 'flex-start',\n marginBottom: theme.spacing(2),\n overflowWrap: 'anywhere',\n whiteSpace: 'pre-line',\n wordBreak: 'break-word',\n },\n checkbox: {\n marginTop: '-6px',\n },\n focusBorder: {\n outlineStyle: 'auto',\n },\n errorContainer: {\n margin: '-16px',\n padding: '16px',\n paddingBottom: '0',\n marginBottom: '32px',\n border: `1px dashed ${theme.palette.error.main}`,\n display: 'flex',\n flexDirection: 'column',\n },\n visuallyHidden: {\n position: 'absolute',\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n width: '1px',\n margin: '-1px',\n padding: 0,\n border: 0,\n },\n}));\n\nconst CheckboxControl = ({\n label,\n name,\n value,\n error,\n onChange,\n errorAria,\n focusEl,\n}) => {\n const [mouseDown, setMouseDown] = useState(false);\n const [focus, setFocus] = useState(false);\n const classes = useStyles();\n const { translate } = useContext(LanguageContext);\n const ref = useRef(null);\n\n useEffect(() => {\n if (name === focusEl && ref && ref.current) {\n ref.current.focus();\n }\n }, [name, focusEl]);\n\n const handleOnChange = (e) => {\n onChange(name, e.target.checked);\n };\n\n return (\n {\n if (mouseDown) event.target.blur();\n else setFocus(true);\n }}\n onBlur={() => setFocus(false)}\n // Outline focus is for keyboard-only users\n onMouseUp={() => setMouseDown(false)}\n onMouseDown={() => setMouseDown(true)}\n onClick={() => setFocus(false)}\n control={\n \n }\n />\n );\n};\n\nconst CustomCheckbox = ({\n label,\n name,\n value,\n error,\n errorAria,\n onChange,\n noBorderOnError,\n focusEl,\n}) => {\n // eslint-disable-next-line no-unused-vars\n const [focus, setFocus] = useState(false);\n const classes = useStyles();\n const theme = useTheme();\n const { translate } = useContext(LanguageContext);\n if (error && !noBorderOnError) {\n return (\n
\n {error && (\n \n {translate(error)}\n \n {translate(errorAria || error)}\n \n \n )}\n\n setFocus(true)}\n onBlur={() => setFocus(false)}\n focusEl={focusEl}\n />\n
\n );\n }\n\n return (\n setFocus(true)}\n onBlur={() => setFocus(false)}\n noBorderOnError={noBorderOnError}\n focusEl={focusEl}\n />\n );\n};\n\nconst propsTypes = {\n label: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n value: PropTypes.bool.isRequired,\n onChange: PropTypes.func.isRequired,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n error: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(\n PropTypes.string,\n PropTypes.shape({ label: PropTypes.string }),\n ),\n ]),\n errorAria: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(\n PropTypes.string,\n PropTypes.shape({ label: PropTypes.string }),\n ),\n ]),\n noBorderOnError: PropTypes.bool,\n};\n\nCheckboxControl.defaultProps = {\n error: '',\n errorAria: '',\n focusEl: '',\n onBlur: () => {},\n onFocus: () => {},\n};\n\nCheckboxControl.propTypes = {\n ...propsTypes,\n};\n\nCustomCheckbox.defaultProps = {\n error: '',\n errorAria: '',\n focusEl: '',\n noBorderOnError: false,\n};\n\nCustomCheckbox.propTypes = {\n ...propsTypes,\n};\n\nexport default CustomCheckbox;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport MaskedInput from 'react-text-mask';\n\nconst TextMaskCustom = (props) => {\n const { inputRef, mask, ...other } = props;\n return (\n {\n inputRef(ref ? ref.inputElement : null);\n }}\n mask={mask}\n guide={false}\n showMask\n />\n );\n};\n\nTextMaskCustom.propTypes = {\n inputRef: PropTypes.func.isRequired,\n mask: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(RegExp)]),\n ).isRequired,\n};\n\nexport default TextMaskCustom;\n","import React, { useContext, useEffect, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { Tooltip, TextField, makeStyles } from '@material-ui/core';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport TextMaskCustom from '../../inputs/TextMaskCustom';\n\nconst useStyles = makeStyles((theme) => ({\n textfield: {\n width: (props) => (props.indent ? 'calc(100%) - 30px' : '100%'),\n marginBottom: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginLeft: (props) => (props.indent ? '30px' : '0px'),\n },\n inputLabel: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '90%',\n '&.shrink': {\n maxWidth: '100%',\n overflow: 'unset',\n },\n },\n}));\n\nconst TextFieldCustom = ({\n disabled,\n label,\n name,\n type,\n value,\n onChange,\n onBlur,\n mask,\n error,\n required,\n maxLength,\n multiline,\n rows,\n indent,\n tooltip,\n ariaLabel,\n focusEl,\n}) => {\n const classes = useStyles({ indent });\n const { translate } = useContext(LanguageContext);\n const InputProps = {};\n const ref = useRef(null);\n\n useEffect(() => {\n if (name === focusEl && ref && ref.current) {\n ref.current.focus();\n }\n }, [name, focusEl]);\n\n const getAriaLabel = () => {\n let inputAriaLabel = '';\n if (required)\n inputAriaLabel = `${translate('pages.consentForm.requiredFieldAria')}`;\n\n inputAriaLabel += (ariaLabel && translate(ariaLabel)) || translate(label);\n return inputAriaLabel;\n };\n\n const inputProps = {\n 'aria-label': getAriaLabel(),\n };\n\n const handleOnChange = (e) => {\n if (onChange) onChange(name, e.target.value);\n };\n\n const handleOnBlur = (e) => {\n if (onBlur) onBlur(name, e.target.value);\n };\n\n const additionalProps = {};\n if (type === 'date') {\n additionalProps.InputLabelProps = { shrink: true };\n }\n\n if (mask) {\n InputProps.inputComponent = TextMaskCustom;\n inputProps.mask = mask;\n }\n\n if (maxLength) {\n inputProps.maxLength = maxLength;\n }\n\n const renderTextField = () => (\n \n );\n\n if (tooltip && !disabled)\n return {renderTextField()};\n\n return renderTextField();\n};\n\nTextFieldCustom.defaultProps = {\n disabled: false,\n mask: null,\n error: '',\n required: false,\n maxLength: null,\n onBlur: () => {},\n multiline: false,\n rows: undefined,\n indent: false,\n tooltip: undefined,\n ariaLabel: undefined,\n focusEl: undefined,\n};\n\nTextFieldCustom.propTypes = {\n disabled: PropTypes.bool,\n label: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n value: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n onBlur: PropTypes.func,\n mask: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(RegExp)]),\n ),\n error: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(\n PropTypes.string,\n PropTypes.shape({ label: PropTypes.string }),\n ),\n ]),\n required: PropTypes.bool,\n maxLength: PropTypes.number,\n multiline: PropTypes.bool,\n rows: PropTypes.number,\n indent: PropTypes.bool,\n tooltip: PropTypes.string,\n ariaLabel: PropTypes.string,\n focusEl: PropTypes.string,\n};\n\nexport default TextFieldCustom;\n","/* eslint-disable no-unused-vars */\n/* eslint-disable react-hooks/exhaustive-deps */\nimport React, {\n useState,\n useContext,\n useEffect,\n useCallback,\n useRef,\n} from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core';\nimport {\n KeyboardDatePicker,\n MuiPickersUtilsProvider,\n} from '@material-ui/pickers';\nimport DateFnsUtils from '@date-io/date-fns';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport { LANG } from 'utility/languageUtility';\nimport enLocale from 'date-fns/locale/en-CA';\nimport frLocale from 'date-fns/locale/fr';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n width: '100%',\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n}));\n\nconst DatePickerCustom = ({\n label,\n name,\n value,\n disabled,\n onChange,\n onBlur,\n error,\n required,\n ariaLabel,\n focusEl,\n}) => {\n const classes = useStyles();\n const { translate, lang } = useContext(LanguageContext);\n const [loaded, setLoaded] = useState(false);\n const [selectedDate, handleSelectedDate] = useState(value || null);\n\n useEffect(() => {\n if (name === focusEl && document.getElementById(name)) {\n document.getElementById(name).focus();\n }\n }, [name, focusEl]);\n\n useEffect(() => {\n if (onChange && typeof onChange === 'function' && loaded)\n onChange(name, selectedDate);\n }, [selectedDate, loaded]);\n\n const handleOnBlur = () => {\n setLoaded(true);\n };\n\n const handleOnAccept = (dateValue) => {\n if (onChange && typeof onChange === 'function')\n onChange(name, selectedDate);\n };\n\n const handleOnError = useCallback(\n (newError, newValue) => {\n handleSelectedDate(newValue);\n if (onChange && typeof onChange === 'function' && selectedDate !== null)\n onChange(name, newValue);\n },\n [selectedDate],\n );\n\n const getAriaLabel = () => {\n let inputAriaLabel = '';\n if (required)\n inputAriaLabel = `${translate('pages.consentForm.requiredFieldAria')}`;\n\n inputAriaLabel += (ariaLabel && translate(ariaLabel)) || translate(label);\n return inputAriaLabel;\n };\n\n return (\n \n \n \n );\n};\n\nDatePickerCustom.defaultProps = {\n onBlur: () => {},\n error: '',\n required: false,\n ariaLabel: undefined,\n focusEl: undefined,\n};\n\nDatePickerCustom.propTypes = {\n label: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n // eslint-disable-next-line react/require-default-props\n value: PropTypes.instanceOf(Date),\n disabled: PropTypes.bool.isRequired,\n onChange: PropTypes.func.isRequired,\n onBlur: PropTypes.func,\n error: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(\n PropTypes.string,\n PropTypes.shape({ label: PropTypes.string }),\n ),\n ]),\n required: PropTypes.bool,\n ariaLabel: PropTypes.string,\n focusEl: PropTypes.string,\n};\n\nexport default DatePickerCustom;\n","/* eslint-disable react/forbid-prop-types */\n/* eslint-disable react/require-default-props */\nimport React from 'react';\nimport PropTypes from 'prop-types';\n// eslint-disable-next-line import/no-cycle\nimport RadioGroupCustom from './inputs/RadioGroupCustom';\nimport SelectCustom from './inputs/SelectCustom';\nimport CheckboxCustom from './inputs/CheckboxCustom';\nimport TextFieldCustom from './inputs/TextFieldCustom';\nimport DatePickerCustom from './inputs/DatePickerCustom';\n\nconst FormInput = ({ formState = {}, focusEl, input, onChange, onBlur }) => {\n switch (input.type) {\n case 'radio':\n return (\n \n );\n case 'select':\n return (\n \n );\n case 'checkbox':\n return (\n \n );\n case 'text':\n case 'number':\n return (\n \n );\n case 'date':\n return (\n \n );\n case 'custom': {\n const Component = input.component;\n return (\n \n );\n }\n default:\n return null;\n }\n};\n\nFormInput.propTypes = {\n // eslint-disable-next-line react/forbid-prop-types\n input: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n onBlur: PropTypes.func,\n formState: PropTypes.object,\n focusEl: PropTypes.string,\n};\n\nexport default FormInput;\n","/* eslint-disable react/forbid-prop-types */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport FormInput from './FormInput';\n\nconst FormSection = ({\n formState = {},\n focusEl,\n inputs,\n marginTop,\n onChange,\n onBlur,\n}) => {\n const inputCollection = Object.keys(inputs).map((inputName) => {\n const input = inputs[inputName];\n return (\n \n );\n });\n\n return
{inputCollection}
;\n};\n\nFormSection.defaultProps = {\n onChange: () => {},\n onBlur: () => {},\n formState: null,\n marginTop: undefined,\n focusEl: undefined,\n};\n\nFormSection.propTypes = {\n inputs: PropTypes.object.isRequired,\n formState: PropTypes.object,\n onChange: PropTypes.func,\n onBlur: PropTypes.func,\n marginTop: PropTypes.string,\n focusEl: PropTypes.string,\n};\n\nexport default FormSection;\n","/* eslint-disable import/no-unresolved */\nimport moment from 'moment';\n/* eslint-disable import/prefer-default-export */\nconst toBoolean = (value) => {\n let finalValue = value;\n if (value === 'true') {\n finalValue = true;\n } else if (value === 'false') {\n finalValue = false;\n }\n return finalValue;\n};\n\nconst getAge = (date) => moment().diff(date, 'years');\n\nconst formatDate = (date, format) => moment(date).format(format);\n\nexport { toBoolean, getAge, formatDate };\n","/*\n * @Description:\n * @Author: Shaomin Fei\n * @Date: 2021-06-01 20:43:05\n */\n\nexport function isAndroid() {\n const u = navigator.userAgent;\n const android = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;\n return android;\n}\nexport function isChrome() {\n return navigator.userAgent.indexOf('Chrome') > -1;\n}\nexport function isIos() {\n return (\n /iPad/i.test(navigator.userAgent) || /iPhone/i.test(navigator.userAgent)\n );\n}\nexport function isIosSafari() {\n return isIos() && /WebKit/i.test(navigator.userAgent);\n}\n\nexport function isEllipsisActive(element) {\n return element.offsetWidth < element.scrollWidth;\n}\n\nexport function getTextWidth(\n str,\n fontSize = '18px',\n fontWeight = 'bold',\n elementName = 'h4',\n) {\n const tolerance = 2;\n let result = 0;\n const ele = document.createElement(elementName);\n ele.style.position = 'absolute';\n ele.style.whiteSpace = 'nowrap';\n ele.style.fontSize = fontSize;\n ele.style.fontWeight = fontWeight;\n ele.style.opacity = 0;\n ele.innerText = str;\n document.body.append(ele);\n result = ele.getBoundingClientRect().width;\n document.body.removeChild(ele);\n return result + tolerance;\n}\n","import Base64 from 'base-64';\nimport { isIosSafari } from './osUtility';\n\nconst openPDF = async (base64PDF) => {\n const pdfString = Base64.decode(base64PDF);\n const byteNumbers = new Array(pdfString.length);\n for (let i = 0; i < pdfString.length; i += 1) {\n byteNumbers[i] = pdfString.charCodeAt(i);\n }\n const byteArray = new Uint8Array(byteNumbers);\n const file = new Blob([byteArray], { type: 'application/pdf' });\n if (!isIosSafari()) {\n window.open(URL.createObjectURL(file), '_blank');\n } else {\n // workaround for Safari on iOS to fix issue\n // where PDF is aligned to the bottom of the screen\n const safariWindow = window.open();\n await new Promise((r) => setTimeout(r, 1000));\n safariWindow.location.href = URL.createObjectURL(file);\n }\n};\n\nexport default openPDF;\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n makeStyles,\n Typography,\n Backdrop,\n CircularProgress,\n} from '@material-ui/core';\nimport { useTheme } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles((theme) => ({\n backdrop: {\n zIndex: 1,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n color: 'white',\n },\n progress: {\n color: theme.palette.primary.main,\n },\n visuallyHidden: {\n position: 'absolute',\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n width: '1px',\n margin: '-1px',\n padding: 0,\n border: 0,\n },\n}));\n\nconst CustomBackdrop = ({ onClick, open, text }) => {\n const theme = useTheme();\n const classes = useStyles();\n const handleClose = () => {\n if (onClick) onClick();\n };\n\n if (!open) return null;\n\n return (\n <>\n \n
\n \n
\n {text && {text}}\n \n
\n \n {text}\n \n
\n \n );\n};\n\nCustomBackdrop.propTypes = {\n onClick: PropTypes.func,\n open: PropTypes.bool.isRequired,\n text: PropTypes.string,\n};\n\nCustomBackdrop.defaultProps = {\n text: undefined,\n onClick: () => {},\n};\n\nexport default CustomBackdrop;\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles, Typography, CircularProgress } from '@material-ui/core';\nimport { useTheme } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n flex: 1,\n alignItems: 'center',\n },\n progress: {\n color: theme.palette.primary.main,\n },\n}));\n\nconst Loading = ({ text }) => {\n const theme = useTheme();\n const classes = useStyles();\n return (\n
\n
\n \n
\n {text && (\n \n {text}\n \n )}\n
\n );\n};\n\nLoading.propTypes = {\n text: PropTypes.string,\n};\n\nLoading.defaultProps = {\n text: undefined,\n};\n\nexport default Loading;\n","/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable react/forbid-prop-types */\n/* eslint-disable no-console */\n/* eslint-disable no-unused-vars */\nimport React, { useEffect, useState, useContext, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles, TextField, Typography } from '@material-ui/core';\nimport { Autocomplete, createFilterOptions } from '@material-ui/lab';\nimport AzureOperation from 'services/common';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport useConsentFormStore from 'services/store/form-stores/eConsentFormStore';\nimport { LANG } from 'utility/languageUtility';\n// eslint-disable-next-line import/no-cycle\nimport consentFormFields from './consentFormFields';\n\nconst useStyles = makeStyles((theme) => ({\n textfield: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n width: '100%',\n },\n noOptions: {\n display: 'none',\n },\n clearButton: {\n visibility: 'visible',\n },\n schoolListName: {\n fontSize: 15,\n marginBottom: 4,\n },\n schoolListAddress: {\n fontSize: 12,\n },\n}));\n\nconst formatSchoolAddress = ({\n schoolAddressLine1,\n schoolAddressLine2,\n schoolCityName,\n schoolPostalCode,\n}) =>\n [schoolAddressLine1, schoolAddressLine2, schoolCityName, schoolPostalCode]\n .filter((addressPart) => addressPart)\n .join(', ');\n\nconst SchoolsDropdown = ({\n input: { name, label, ariaLabel },\n onChange,\n onBlur,\n required,\n error,\n formState,\n focusEl,\n}) => {\n const timer = useRef();\n const classes = useStyles();\n const [schools, setSchools] = useState([]);\n const [dataLoadFailed, setDataLoadFailed] = useState(null);\n const { translate, lang } = useContext(LanguageContext);\n const schoolNameField = lang === LANG.FR ? 'nameFr' : 'name';\n const cityNameField = lang === LANG.FR ? 'cityFr' : 'city';\n const updateSchoolsApiHasError = useConsentFormStore(\n (state) => state.setSchoolsHasError,\n );\n const updateLoadingSchoolsApi = useConsentFormStore(\n (state) => state.setLoadingSchoolsApi,\n );\n const ref = useRef(null);\n\n const WAIT_TIME = 2;\n const [time, setTime] = useState(0);\n\n const startTimer = () => {\n timer.current = setInterval(() => {\n setTime((_time) => _time + 1);\n }, 1000);\n };\n\n useEffect(() => {\n return () => {\n clearInterval(timer.current);\n timer.current = 0;\n setTime(0);\n updateLoadingSchoolsApi(undefined);\n };\n }, []);\n\n useEffect(() => {\n if (dataLoadFailed !== null) {\n if (time >= WAIT_TIME) {\n // Loading progress must show atleast 2 seconds before it closes.\n clearInterval(timer.current);\n setTime(0);\n setDataLoadFailed(null);\n updateLoadingSchoolsApi(false);\n }\n }\n }, [time, dataLoadFailed]);\n\n useEffect(() => {\n if (name === focusEl && ref && ref.current) {\n ref.current.focus();\n }\n }, [name, focusEl]);\n\n useEffect(() => {\n const { protectedResources, callApiWithAzureToken } = AzureOperation;\n startTimer();\n updateLoadingSchoolsApi(true);\n const params = {\n url: protectedResources.schools.endpoints.getSchools.baseUrl,\n method: protectedResources.schools.endpoints.getSchools.method,\n };\n callApiWithAzureToken(params)\n .then((result) => {\n if (result) {\n if (result && result.statusCode !== 0 && result.statusCode !== 200) {\n updateSchoolsApiHasError(true);\n setDataLoadFailed(true);\n }\n\n if (\n result &&\n (result.statusCode === 0 || result.statusCode === 200)\n ) {\n if (\n result.schools === undefined ||\n result.schools === null ||\n result.schools.length === 0\n ) {\n updateSchoolsApiHasError(true);\n setDataLoadFailed(true);\n } else {\n updateSchoolsApiHasError(false);\n setSchools(result.schools);\n setDataLoadFailed(false);\n }\n }\n }\n })\n .catch((e) => {\n // eslint-disable-next-line no-console\n console.error('Error Fetching Schools', e);\n setDataLoadFailed(true);\n });\n }, [updateSchoolsApiHasError, updateLoadingSchoolsApi]);\n\n const filterOptions = createFilterOptions({\n stringify: (option) =>\n `${option[schoolNameField]} ${formatSchoolAddress(option)}`,\n limit: 10,\n });\n\n const handleOnChange = (e, val, reason) => {\n const cityInputName = consentFormFields.sectionA.schoolCity.name;\n if (reason === 'select-option') {\n onChange(name, val.name);\n onChange(cityInputName, val.city);\n } else if (reason === 'clear') {\n onChange(name, '');\n onChange(cityInputName, '');\n }\n };\n\n const handleOnBlur = (e) => {\n const data = {};\n const school = schools.find((a) => a[schoolNameField] === e.target.value);\n data.schoolId = school ? school.schoolId : null;\n onBlur(name, e.target.value, data);\n };\n\n const getAriaLabel = () => {\n let inputAriaLabel = '';\n if (required)\n inputAriaLabel = `${translate('pages.consentForm.requiredFieldAria')}`;\n\n inputAriaLabel += (ariaLabel && translate(ariaLabel)) || translate(label);\n return inputAriaLabel;\n };\n\n return (\n {\n if (!state.inputValue) return [];\n return filterOptions(options, state);\n }}\n getOptionLabel={(option) => option[schoolNameField] || ''}\n noOptionsText={null}\n onChange={handleOnChange}\n options={schools}\n renderOption={(option) => (\n
\n \n {option[schoolNameField]}\n \n \n {option[cityNameField]}\n \n
\n )}\n renderInput={(params) => (\n \n )}\n />\n );\n};\n\nSchoolsDropdown.defaultProps = {\n required: false,\n error: null,\n onBlur: () => {},\n formState: {},\n focusEl: undefined,\n};\n\nSchoolsDropdown.propTypes = {\n input: PropTypes.shape({\n label: PropTypes.string.isRequired,\n name: PropTypes.string.isRequired,\n ariaLabel: PropTypes.string,\n }).isRequired,\n value: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n onBlur: PropTypes.func,\n required: PropTypes.bool,\n error: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(\n PropTypes.string,\n PropTypes.shape({ label: PropTypes.string }),\n ),\n ]),\n formState: PropTypes.object,\n focusEl: PropTypes.string,\n};\n\nexport default SchoolsDropdown;\n","/* eslint-disable max-len */\n/* eslint-disable import/no-cycle */\nimport SchoolsDropdown from './SchoolsDropdown';\nimport { getAge } from '../../utility/common';\n\n// const today = new Date();\n\nexport default {\n header: {\n completedBy: {\n type: 'radio',\n name: 'completedBy',\n label: 'pages.consentForm.completedBy.consentFormCompletedBy',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n conditionalTextField: 'otherCompletedBy',\n options: [\n {\n name: 'client',\n label: 'Client',\n value: 'client',\n ariaLabel: 'pages.consentForm.completedBy.clientAriaLabel',\n },\n {\n name: 'parent',\n label: 'Parent',\n value: 'parent',\n ariaLabel: 'pages.consentForm.completedBy.parentAriaLabel',\n },\n {\n name: 'legalDecisionMaker',\n label: 'pages.consentForm.completedBy.legalDecisionMaker',\n value: 'legalDecisionMaker',\n ariaLabel:\n 'pages.consentForm.completedBy.legalDecisionMakerAriaLabel',\n },\n {\n name: 'other',\n label: 'pages.consentForm.completedBy.other',\n value: 'other',\n ariaLabel: 'pages.consentForm.completedBy.otherAriaLabel',\n render: {\n type: 'text',\n name: 'otherCompletedBy',\n label: 'pages.consentForm.completedBy.otherCompletedBy',\n ariaLabel: 'pages.consentForm.completedBy.otherCompletedBy',\n indent: true,\n },\n },\n ],\n },\n },\n sectionA: {\n surname: {\n type: 'text',\n name: 'surname',\n label: 'pages.consentForm.sectionA.surname',\n ariaLabel: 'pages.consentForm.sectionA.surnameAriaLabel',\n validation: {\n isRequired: true,\n },\n maxLength: 50,\n },\n givenName: {\n type: 'text',\n name: 'givenName',\n label: 'pages.consentForm.sectionA.givenName',\n ariaLabel: 'pages.consentForm.sectionA.givenNameAriaLabel',\n validation: {\n isRequired: true,\n },\n maxLength: 50,\n },\n address: {\n type: 'text',\n name: 'address',\n label: 'pages.consentForm.sectionA.address',\n ariaLabel: 'pages.consentForm.sectionA.addressAriaLabel',\n maxLength: 200,\n validation: {\n isRequired: true,\n },\n },\n city: {\n type: 'text',\n name: 'city',\n label: 'pages.consentForm.sectionA.city',\n ariaLabel: 'pages.consentForm.sectionA.cityAriaLabel',\n maxLength: 50,\n validation: {\n isRequired: true,\n },\n },\n postalCode: {\n type: 'text',\n name: 'postalCode',\n label: 'pages.consentForm.sectionA.postalCode',\n ariaLabel: 'pages.consentForm.sectionA.postalCodeAriaLabel',\n maxLength: 10,\n validation: {\n isRequired: true,\n },\n },\n phoneNumber: {\n type: 'text',\n name: 'phoneNumber',\n label: 'pages.consentForm.sectionA.phoneNumber',\n ariaLabel: 'pages.consentForm.sectionA.phoneNumberAriaLabel',\n mask: [\n '(',\n /[0-9]/,\n /\\d/,\n /\\d/,\n ')',\n ' ',\n /\\d/,\n /\\d/,\n /\\d/,\n '-',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n ],\n validation: {\n isRequired: true,\n length: 10,\n },\n },\n email: {\n type: 'text',\n name: 'email',\n label: 'pages.consentForm.sectionA.email',\n ariaLabel: 'pages.consentForm.sectionA.emailAriaLabel',\n maxLength: 50,\n validation: {\n email: true,\n isRequired: true,\n },\n },\n sex: {\n type: 'radio',\n name: 'sex',\n label: 'pages.consentForm.sectionA.sex',\n ariaLabel: 'pages.consentForm.sectionA.sexAriaLabel',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n options: [\n {\n name: 'male',\n label: 'pages.consentForm.sectionA.male',\n value: 'male',\n ariaLabel: 'pages.consentForm.sectionA.maleAriaLabel',\n },\n {\n name: 'female',\n label: 'pages.consentForm.sectionA.female',\n value: 'female',\n ariaLabel: 'pages.consentForm.sectionA.femaleAriaLabel',\n },\n {\n name: 'x',\n label: 'X',\n value: 'x',\n ariaLabel: 'pages.consentForm.sectionA.xGenderLabel',\n },\n ],\n },\n dateOfBirth: {\n type: 'date',\n name: 'dateOfBirth',\n label: 'pages.consentForm.sectionA.dateOfBirth',\n ariaLabel: 'pages.consentForm.sectionA.dateOfBirthAriaLabel',\n disabled: false,\n value: null,\n validation: {\n isRequired: true,\n },\n customValidate: (dateOfBirth) => {\n let error = {};\n if (getAge(dateOfBirth) < 4) {\n error = { error: 'pages.request.information.errors.minAge' };\n }\n\n return error;\n },\n },\n mbRegistrationNumber: {\n type: 'text',\n name: 'mbRegistrationNumber',\n label: 'pages.consentForm.sectionA.mbRegistrationNumber',\n ariaLabel: 'pages.consentForm.sectionA.mbRegistrationNumberAriaLabel',\n mask: [/[0-9]/, /\\d/, /\\d/, /\\d/, /\\d/, /\\d/],\n requiredMsg:\n 'pages.consentForm.validationFields.mbRegistrationNumberReqMsg',\n validation: {\n length: 6,\n },\n tooltip: 'This field is optional',\n customValidate: (mbRegNumber, consentFormState) => {\n let error = {};\n if (\n (!mbRegNumber || mbRegNumber === '') &&\n consentFormState.phin &&\n consentFormState.phin.value !== undefined &&\n consentFormState.phin.value !== '' &&\n consentFormState.phin.value !== null\n ) {\n error = {\n error:\n 'pages.consentForm.validationFields.mbRegistrationNumberReqMsg',\n };\n }\n\n return error;\n },\n },\n phin: {\n type: 'text',\n name: 'phin',\n label: 'pages.consentForm.sectionA.phin',\n ariaLabel: 'pages.consentForm.sectionA.phinAriaLabel',\n mask: [/[0-9]/, /\\d/, /\\d/, /\\d/, /\\d/, /\\d/, /\\d/, /\\d/, /\\d/],\n requiredMsg: 'pages.consentForm.validationFields.phinReqMsg',\n validation: {\n isRequired: false,\n length: 9,\n },\n tooltip: 'This field is optional',\n customValidate: (phin, consentFormState) => {\n let error = {};\n if (\n (!phin || phin === '') &&\n consentFormState.mbRegistrationNumber &&\n consentFormState.mbRegistrationNumber.value !== undefined &&\n consentFormState.mbRegistrationNumber.value !== '' &&\n consentFormState.mbRegistrationNumber.value !== null\n ) {\n error = { error: 'pages.consentForm.validationFields.phinReqMsg' };\n }\n\n return error;\n },\n },\n schoolName: {\n type: 'custom',\n component: SchoolsDropdown,\n name: 'schoolName',\n label: 'pages.consentForm.sectionA.schoolName',\n ariaLabel: 'pages.consentForm.sectionA.schoolNameAriaLabel',\n validation: {\n isRequired: true,\n },\n },\n schoolCity: {\n type: 'text',\n name: 'schoolCity',\n label: 'pages.consentForm.sectionA.schoolCity',\n disabled: true,\n },\n grade: {\n type: 'select',\n name: 'grade',\n label: 'pages.consentForm.sectionA.grade',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabel',\n validation: {\n isRequired: true,\n },\n options: [\n { name: '', label: '', value: '' },\n { name: 'kindergarten', label: 'Kindergarten', value: 'K' },\n {\n name: '1',\n label: '1',\n value: '1',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabelRadio.1',\n },\n {\n name: '2',\n label: '2',\n value: '2',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabelRadio.2',\n },\n {\n name: '3',\n label: '3',\n value: '3',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabelRadio.3',\n },\n {\n name: '4',\n label: '4',\n value: '4',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabelRadio.4',\n },\n {\n name: '5',\n label: '5',\n value: '5',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabelRadio.5',\n },\n {\n name: '6',\n label: '6',\n value: '6',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabelRadio.6',\n },\n {\n name: '7',\n label: '7',\n value: '7',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabelRadio.7',\n },\n {\n name: '8',\n label: '8',\n value: '8',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabelRadio.8',\n },\n {\n name: '9',\n label: '9',\n value: '9',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabelRadio.9',\n },\n {\n name: '10',\n label: '10',\n value: '10',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabelRadio.10',\n },\n {\n name: '11',\n label: '11',\n value: '11',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabelRadio.11',\n },\n {\n name: '12',\n label: '12',\n value: '12',\n ariaLabel: 'pages.consentForm.sectionA.gradeAriaLabelRadio.12',\n },\n ],\n },\n },\n sectionB: {\n hasQuestionFeverOrSymptoms: {\n type: 'radio',\n name: 'hasQuestionFeverOrSymptoms',\n label: 'pages.consentForm.sectionB.hasQuestionFeverOrSymptoms',\n ariaLabel:\n 'pages.consentForm.sectionB.hasQuestionFeverOrSymptomsAriaLabel',\n requiredMsg: 'pages.request.information.errors.emptySelection',\n validation: {\n isRequired: true,\n },\n conditionalTextField: 'questionFeverOrSymptoms',\n options: [\n {\n name: 'no',\n label: 'pages.consentForm.sectionB.no',\n value: 'false',\n ariaLabel: 'pages.consentForm.sectionB.no',\n },\n {\n name: 'yes',\n label: 'pages.consentForm.sectionB.yes',\n value: 'true',\n ariaLabel: 'pages.consentForm.sectionB.yes',\n render: {\n type: 'text',\n name: 'questionFeverOrSymptoms',\n label: 'pages.consentForm.sectionB.ifYesDescribe',\n maxLength: 100,\n multiline: true,\n rows: 4,\n },\n },\n ],\n indentOptions: true,\n },\n hasQuestionAllergy: {\n type: 'radio',\n name: 'hasQuestionAllergy',\n label: 'pages.consentForm.sectionB.hasQuestionAllergy',\n ariaLabel: 'pages.consentForm.sectionB.hasQuestionAllergyAriaLabel',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n conditionalTextField: 'questionAllergy',\n options: [\n {\n name: 'no',\n label: 'pages.consentForm.sectionB.no',\n value: 'false',\n ariaLabel: 'pages.consentForm.sectionB.no',\n },\n {\n name: 'yes',\n label: 'pages.consentForm.sectionB.yes',\n value: 'true',\n ariaLabel: 'pages.consentForm.sectionB.yes',\n\n render: {\n type: 'text',\n name: 'questionAllergy',\n label: 'pages.consentForm.sectionB.ifYesDescribe',\n maxLength: 100,\n multiline: true,\n rows: 4,\n },\n },\n ],\n indentOptions: true,\n },\n hasQuestionPEGAllergy: {\n type: 'radio',\n name: 'hasQuestionPEGAllergy',\n label: 'pages.consentForm.sectionB.hasQuestionPEGAllergy',\n ariaLabel: 'pages.consentForm.sectionB.hasQuestionPEGAllergyAriaLabel',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n options: [\n {\n name: 'no',\n label: 'pages.consentForm.sectionB.no',\n value: 'false',\n ariaLabel: 'pages.consentForm.sectionB.no',\n },\n {\n name: 'yes',\n label: 'pages.consentForm.sectionB.yes',\n value: 'true',\n ariaLabel: 'pages.consentForm.sectionB.yes',\n },\n ],\n indentOptions: true,\n },\n hasQuestionVaccineReaction: {\n type: 'radio',\n name: 'hasQuestionVaccineReaction',\n label: 'pages.consentForm.sectionB.hasQuestionVaccineReaction',\n ariaLabel:\n 'pages.consentForm.sectionB.hasQuestionVaccineReactionAriaLabel',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n conditionalTextField: 'questionVaccineReaction',\n options: [\n {\n name: 'no',\n label: 'pages.consentForm.sectionB.no',\n value: 'false',\n ariaLabel: 'pages.consentForm.sectionB.no',\n },\n {\n name: 'yes',\n label: 'pages.consentForm.sectionB.yes',\n value: 'true',\n ariaLabel: 'pages.consentForm.sectionB.yes',\n render: {\n type: 'text',\n name: 'questionVaccineReaction',\n label: 'pages.consentForm.sectionB.ifYesDescribe',\n maxLength: 100,\n multiline: true,\n rows: 4,\n },\n },\n ],\n indentOptions: true,\n },\n hasQuestionMedicalConditions: {\n type: 'radio',\n name: 'hasQuestionMedicalConditions',\n label: 'pages.consentForm.sectionB.hasQuestionMedicalConditions',\n ariaLabel:\n 'pages.consentForm.sectionB.hasQuestionMedicalConditionsAriaLabel',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n conditionalTextField: 'questionMedicalConditions',\n options: [\n {\n name: 'no',\n label: 'pages.consentForm.sectionB.no',\n value: 'false',\n ariaLabel: 'pages.consentForm.sectionB.no',\n },\n {\n name: 'yes',\n label: 'pages.consentForm.sectionB.yes',\n value: 'true',\n ariaLabel: 'pages.consentForm.sectionB.yes',\n render: {\n type: 'text',\n name: 'questionMedicalConditions',\n label: 'pages.consentForm.sectionB.questionMedicalConditions',\n maxLength: 100,\n multiline: true,\n rows: 4,\n },\n },\n ],\n indentOptions: true,\n },\n hasQuestionReceivedVaccineLast14Days: {\n type: 'radio',\n name: 'hasQuestionReceivedVaccineLast14Days',\n label: 'pages.consentForm.sectionB.hasQuestionReceivedVaccineLast14Days',\n ariaLabel:\n 'pages.consentForm.sectionB.hasQuestionReceivedVaccineLast14DaysAriaLabel',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n options: [\n {\n name: 'no',\n label: 'pages.consentForm.sectionB.no',\n value: 'false',\n ariaLabel: 'pages.consentForm.sectionB.no',\n },\n {\n name: 'yes',\n label: 'pages.consentForm.sectionB.yes',\n value: 'true',\n ariaLabel: 'pages.consentForm.sectionB.yes',\n },\n ],\n indentOptions: true,\n },\n hasQuestionBloodClottingMedication: {\n type: 'radio',\n name: 'hasQuestionBloodClottingMedication',\n label: 'pages.consentForm.sectionB.hasQuestionBloodClottingMedication',\n ariaLabel:\n 'pages.consentForm.sectionB.hasQuestionBloodClottingMedicationAriaLabel',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n conditionalTextField: 'questionBloodClottingMedication',\n options: [\n {\n name: 'no',\n label: 'pages.consentForm.sectionB.no',\n value: 'false',\n ariaLabel: 'pages.consentForm.sectionB.no',\n },\n {\n name: 'yes',\n label: 'pages.consentForm.sectionB.yes',\n value: 'true',\n ariaLabel: 'pages.consentForm.sectionB.yes',\n render: {\n type: 'text',\n name: 'questionBloodClottingMedication',\n label: 'pages.consentForm.sectionB.questionBloodClottingMedication',\n maxLength: 100,\n multiline: true,\n rows: 4,\n },\n },\n ],\n indentOptions: true,\n },\n hasQuestionPregnant: {\n type: 'radio',\n name: 'hasQuestionPregnant',\n label: 'pages.consentForm.sectionB.hasQuestionPregnant',\n ariaLabel: 'pages.consentForm.sectionB.hasQuestionPregnantAriaLabel',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n options: [\n {\n name: 'no',\n label: 'pages.consentForm.sectionB.no',\n value: 'false',\n ariaLabel: 'pages.consentForm.sectionB.no',\n },\n {\n name: 'yes',\n label: 'pages.consentForm.sectionB.yes',\n value: 'true',\n ariaLabel: 'pages.consentForm.sectionB.yes',\n },\n ],\n indentOptions: true,\n },\n hasQuestionImmuneSystemSuppressed: {\n type: 'radio',\n name: 'hasQuestionImmuneSystemSuppressed',\n label: 'pages.consentForm.sectionB.hasQuestionImmuneSystemSuppressed',\n ariaLabel:\n 'pages.consentForm.sectionB.hasQuestionImmuneSystemSuppressedAriaLabel',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n options: [\n {\n name: 'no',\n label: 'pages.consentForm.sectionB.no',\n value: 'false',\n ariaLabel: 'pages.consentForm.sectionB.no',\n },\n {\n name: 'yes',\n label: 'pages.consentForm.sectionB.yes',\n value: 'true',\n ariaLabel: 'pages.consentForm.sectionB.yes',\n },\n ],\n indentOptions: true,\n },\n hasQuestionAutoimmune: {\n type: 'radio',\n name: 'hasQuestionAutoimmune',\n label: 'pages.consentForm.sectionB.hasQuestionAutoimmune',\n ariaLabel: 'pages.consentForm.sectionB.hasQuestionAutoimmuneAriaLabel',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n options: [\n {\n name: 'no',\n label: 'pages.consentForm.sectionB.no',\n value: 'false',\n ariaLabel: 'pages.consentForm.sectionB.no',\n },\n {\n name: 'yes',\n label: 'pages.consentForm.sectionB.yes',\n value: 'true',\n ariaLabel: 'pages.consentForm.sectionB.yes',\n },\n ],\n indentOptions: true,\n },\n hasQuestionVSTOrHIT: {\n type: 'radio',\n name: 'hasQuestionVSTOrHIT',\n label: 'pages.consentForm.sectionB.hasQuestionVSTOrHIT',\n ariaLabel: 'pages.consentForm.sectionB.hasQuestionVSTOrHITAriaLabel',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n options: [\n {\n name: 'no',\n label: 'pages.consentForm.sectionB.no',\n value: 'false',\n ariaLabel: 'pages.consentForm.sectionB.no',\n },\n {\n name: 'yes',\n label: 'pages.consentForm.sectionB.yes',\n value: 'true',\n ariaLabel: 'pages.consentForm.sectionB.yes',\n },\n ],\n indentOptions: true,\n },\n haveReceivedDoseCount: {\n type: 'radio',\n name: 'haveReceivedDoseCount',\n label: 'pages.consentForm.sectionB.haveReceivedDoseCount',\n ariaLabel: 'pages.consentForm.sectionB.haveReceivedDoseCountAriaLabel',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n options: [\n { name: 'zero', label: '0 Doses', value: '0', ariaLabel: '0 Doses' },\n { name: 'one', label: 'Dose 1', value: '1', ariaLabel: 'Dose 1' },\n { name: 'two', label: 'Dose 2', value: '2', ariaLabel: 'Dose 2' },\n ],\n indentOptions: true,\n },\n },\n sectionC: {\n racialEthnicity: {\n type: 'radio',\n name: 'racialEthnicity',\n label: 'pages.consentForm.sectionC.racialEthnicity',\n validation: {\n isRequired: true,\n },\n requiredMsg: 'pages.request.information.errors.emptySelection',\n conditionalTextField: 'otherRacialEthnicity',\n options: [\n {\n name: 'african',\n label: 'pages.consentForm.sectionC.african',\n value: 'african',\n ariaLabel: 'pages.consentForm.sectionC.african',\n },\n {\n name: 'black',\n label: 'pages.consentForm.sectionC.black',\n value: 'black',\n ariaLabel: 'pages.consentForm.sectionC.black',\n },\n {\n name: 'chinese',\n label: 'pages.consentForm.sectionC.chinese',\n value: 'chinese',\n ariaLabel: 'pages.consentForm.sectionC.chinese',\n },\n {\n name: 'filipino',\n label: 'pages.consentForm.sectionC.filipino',\n value: 'filipino',\n ariaLabel: 'pages.consentForm.sectionC.filipino',\n },\n {\n name: 'latinAmerican',\n label: 'pages.consentForm.sectionC.latinAmerican',\n value: 'latin_american',\n ariaLabel: 'pages.consentForm.sectionC.latinAmerican',\n },\n {\n name: 'northAmericanIndigenous',\n label: 'pages.consentForm.sectionC.northAmericanIndigenous',\n value: 'north_american_indigenous',\n ariaLabel: 'pages.consentForm.sectionC.northAmericanIndigenous',\n },\n {\n name: 'southAsian',\n label: 'pages.consentForm.sectionC.southAsian',\n value: 'south_asian',\n ariaLabel: 'pages.consentForm.sectionC.southAsian',\n },\n {\n name: 'southeastAsian',\n label: 'pages.consentForm.sectionC.southeastAsian',\n value: 'southeast_asian',\n ariaLabel: 'pages.consentForm.sectionC.southeastAsian',\n },\n {\n name: 'white',\n label: 'pages.consentForm.sectionC.white',\n value: 'white',\n ariaLabel: 'pages.consentForm.sectionC.white',\n },\n {\n name: 'other',\n label: 'pages.consentForm.sectionC.other',\n value: 'other',\n ariaLabel: 'pages.consentForm.sectionC.other',\n render: {\n type: 'text',\n name: 'otherRacialEthnicity',\n label: '',\n indent: true,\n },\n maxLength: 50,\n },\n {\n name: 'preferNotToAnswer',\n label: 'pages.consentForm.sectionC.preferNotToAnswer',\n value: 'prefer_not_to_answer',\n ariaLabel: 'pages.consentForm.sectionC.preferNotToAnswer',\n },\n ],\n },\n northAmericanIndigenousIdentity: {\n type: 'radio',\n name: 'northAmericanIndigenousIdentity',\n label: 'pages.consentForm.sectionC.naIndigenousIdentity',\n validation: {\n isRequired: 'false',\n },\n options: [\n {\n name: 'firstNations',\n label: 'pages.consentForm.sectionC.firstNations',\n value: 'first_nations',\n ariaLabel: 'pages.consentForm.sectionC.firstNations',\n },\n {\n name: 'metis',\n label: 'pages.consentForm.sectionC.metis',\n value: 'metis',\n ariaLabel: 'pages.consentForm.sectionC.metis',\n },\n {\n name: 'inuit',\n label: 'pages.consentForm.sectionC.inuit',\n value: 'inuit',\n ariaLabel: 'pages.consentForm.sectionC.inuit',\n },\n {\n name: 'notApplicable',\n label: 'pages.consentForm.sectionC.notApplicable',\n value: 'not_applicable',\n ariaLabel: 'pages.consentForm.sectionC.notApplicable',\n },\n ],\n },\n },\n sectionD: 'pages.consentForm.sectionD.info',\n sectionD1Consent: 'pages.consentForm.sectionD.sectionD1.consent',\n sectionDCovidFactSheet: {\n informedConsentLastName: {\n type: 'text',\n name: 'informedConsentLastName',\n label: 'pages.consentForm.sectionD.sectionD1.informedConsentLastName',\n ariaLabel:\n 'pages.consentForm.sectionD.sectionD1.informedConsentLastNameAriaLabel',\n maxLength: 100,\n validation: {\n isRequired: true,\n },\n },\n informedConsentFirstName: {\n type: 'text',\n name: 'informedConsentFirstName',\n label: 'pages.consentForm.sectionD.sectionD1.informedConsentFirstName',\n ariaLabel:\n 'pages.consentForm.sectionD.sectionD1.informedConsentFirstNameAriaLabel',\n maxLength: 100,\n validation: {\n isRequired: true,\n },\n },\n informedConsentRelationship: {\n type: 'select',\n name: 'informedConsentRelationship',\n label: 'pages.consentForm.sectionD.sectionD1.informedConsentRelationship',\n ariaLabel:\n 'pages.consentForm.sectionD.sectionD1.informedConsentRelationshipAriaLabel',\n requiredAriaMsg: 'pages.request.information.errors.emptyWithoutLabel',\n validation: {\n isRequired: true,\n },\n options: [\n { name: 'client', label: 'Client', value: 'CLIENT' },\n {\n name: 'father',\n label: 'pages.consentForm.sectionD.sectionD1.father',\n value: 'FATHER',\n },\n {\n name: 'mother',\n label: 'pages.consentForm.sectionD.sectionD1.mother',\n value: 'MOTHER',\n },\n {\n name: 'legalDecisionMaker',\n label: 'pages.consentForm.sectionD.sectionD1.legalDecisionMaker',\n value: 'LEGAL_DECISION_MAKER',\n },\n ],\n },\n informedConsentPhoneNumber: {\n type: 'text',\n name: 'informedConsentPhoneNumber',\n label: 'pages.consentForm.sectionD.sectionD1.informedConsentPhoneNumber',\n ariaLabel:\n 'pages.consentForm.sectionD.sectionD1.informedConsentPhoneNumberAriaLabel',\n mask: [\n '(',\n /[0-9]/,\n /\\d/,\n /\\d/,\n ')',\n ' ',\n /\\d/,\n /\\d/,\n /\\d/,\n '-',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n ],\n validation: {\n isRequired: true,\n length: 10,\n },\n },\n informedConsentEmail: {\n type: 'text',\n name: 'informedConsentEmail',\n label: 'pages.consentForm.sectionD.sectionD1.informedConsentEmail',\n ariaLabel:\n 'pages.consentForm.sectionD.sectionD1.informedConsentEmailAriaLabel',\n validation: {\n email: true,\n isRequired: true,\n },\n },\n },\n sectionDClauses: {\n hasUnderstandingAndQuestionsAnswered: {\n type: 'checkbox',\n name: 'hasUnderstandingAndQuestionsAnswered',\n value: false,\n label:\n 'pages.consentForm.sectionD.clauses.hasUnderstandingAndQuestionsAnswered',\n requiredMsg: 'pages.request.information.errors.mustAgree',\n requiredAriaMsg: 'pages.request.information.errors.mustAgreeAria',\n validation: {\n isRequired: true,\n },\n },\n legalConsent: {\n type: 'checkbox',\n name: 'legalConsent',\n value: false,\n label: 'pages.consentForm.sectionD.clauses.legalConsent',\n requiredMsg: 'pages.request.information.errors.mustAgree',\n requiredAriaMsg: 'pages.request.information.errors.mustAgreeAria',\n validation: {\n isRequired: true,\n },\n },\n isDeclarationCompleteAndTrue: {\n type: 'checkbox',\n name: 'isDeclarationCompleteAndTrue',\n value: false,\n label: 'pages.consentForm.sectionD.clauses.isDeclarationCompleteAndTrue',\n requiredMsg: 'pages.request.information.errors.mustAgree',\n requiredAriaMsg: 'pages.request.information.errors.mustAgreeAria',\n validation: {\n isRequired: true,\n },\n },\n },\n sectionE: {\n thirdPartyDisclosure: {\n type: 'checkbox',\n name: 'thirdPartyDisclosure',\n value: false,\n label: 'pages.consentForm.sectionE.thirdPartyDisclosure',\n requiredMsg: 'pages.request.information.errors.mustAgree',\n requiredAriaMsg: 'pages.request.information.errors.mustAgreeAria',\n validation: {\n isRequired: true,\n },\n },\n },\n};\n","const PROVINCE = {\n MB: 'MB',\n AB: 'AB',\n BC: 'BC',\n NB: 'NB',\n NL: 'NL',\n NT: 'NT',\n NS: 'NS',\n NU: 'NU',\n ON: 'ON',\n PE: 'PE',\n QC: 'QC',\n SK: 'SK',\n YT: 'YT',\n NA: `N/A`,\n};\n\nexport const CONSENT_PROVIDER = {\n LEGAL_DECISION_MAKER: 'LEGAL_DECISION_MAKER',\n CLIENT: 'CLIENT',\n};\n\nexport const FORM_MAKER = {\n LEGAL_DECISION_MAKER: 'LEGAL_DECISION_MAKER',\n CLIENT: 'CLIENT',\n PARENT: 'PARENT',\n OTHER: 'OTHER',\n};\n\nexport default PROVINCE;\n","import { formatDate } from 'utility/common';\nimport { trim, toLower, toUpper, toInteger } from 'lodash';\nimport PROVINCE, { CONSENT_PROVIDER, FORM_MAKER } from './constant';\n\nconst checkAndConvertBooleanValues = (value) => {\n let finalValue = value;\n if (value === 'true') {\n finalValue = true;\n } else if (value === 'false') {\n finalValue = false;\n }\n return finalValue;\n};\n\nconst getFormMaker = (maker) => {\n switch (maker) {\n case 'client':\n return FORM_MAKER.CLIENT;\n\n case 'parent':\n return FORM_MAKER.PARENT;\n\n case 'legalDecisionMaker':\n return FORM_MAKER.LEGAL_DECISION_MAKER;\n\n case 'other':\n return FORM_MAKER.OTHER;\n default:\n break;\n }\n return '';\n};\n\nconst isNotNullAndUndefined = (value) => {\n let result = true;\n\n if (value === null || !value) {\n result = false;\n }\n\n if (value && trim(value) === '') {\n result = false;\n }\n\n return result;\n};\n\nconst mapNewObject = (consentForm) => {\n const result = {\n consent: {\n consentProvidedBy:\n toUpper(consentForm.completedBy) === 'CLIENT'\n ? CONSENT_PROVIDER.CLIENT\n : CONSENT_PROVIDER.LEGAL_DECISION_MAKER,\n consentDecision: 'GIVEN',\n decisionMakerFirstName: consentForm.informedConsentFirstName,\n decisionMakerLastName: consentForm.informedConsentLastName,\n decisionMakerRelationship: toUpper(\n consentForm.informedConsentRelationship,\n ),\n decisionMakerPhoneNumber: consentForm.informedConsentPhoneNumber,\n decisionMakerEmail: consentForm.informedConsentEmail,\n hasUnderstandingAndQuestionsAnswered:\n consentForm.hasUnderstandingAndQuestionsAnswered,\n legalConsent: consentForm.legalConsent,\n isDeclarationCompleteAndTrue: consentForm.isDeclarationCompleteAndTrue,\n thirdPartyDisclosure: consentForm.thirdPartyDisclosure,\n },\n client: {\n firstName: consentForm.givenName,\n lastName: consentForm.surname,\n phoneNumber: consentForm.phoneNumber,\n schoolGrade: consentForm.grade,\n schoolId: consentForm.schoolId,\n email: toLower(consentForm.email),\n sex: toUpper(consentForm.sex),\n dateOfBirth: formatDate(consentForm.dateOfBirth, 'YYYY-MM-DD'),\n ...(isNotNullAndUndefined(consentForm.mbRegistrationNumber)\n ? { mbHealthNumber: consentForm.mbRegistrationNumber }\n : null),\n ...(isNotNullAndUndefined(consentForm.phin)\n ? { phin: consentForm.phin }\n : null),\n identity: {\n identityCode: toUpper(consentForm.racialEthnicity),\n ...(isNotNullAndUndefined(consentForm.otherRacialEthnicity)\n ? { identityOther: consentForm.otherRacialEthnicity }\n : null),\n ...(isNotNullAndUndefined(consentForm.northAmericanIndigenousIdentity)\n ? {\n indigenousIdentity: toUpper(\n consentForm.northAmericanIndigenousIdentity,\n ),\n }\n : null),\n },\n address: {\n street: consentForm.address,\n city: consentForm.city,\n province: PROVINCE.MB,\n postalCode: consentForm.postalCode,\n },\n },\n questions: {\n hasSymptoms: checkAndConvertBooleanValues(\n consentForm.hasQuestionFeverOrSymptoms,\n ),\n ...(isNotNullAndUndefined(consentForm.questionFeverOrSymptoms)\n ? { hasSymptomsComment: consentForm.questionFeverOrSymptoms }\n : null),\n hasAllergies: checkAndConvertBooleanValues(\n consentForm.hasQuestionAllergy,\n ),\n ...(isNotNullAndUndefined(consentForm.questionAllergy)\n ? { hasAllergiesComment: consentForm.questionAllergy }\n : null),\n hasPegAllergy: checkAndConvertBooleanValues(\n consentForm.hasQuestionPEGAllergy,\n ),\n hadReactionFollowingVaccine: checkAndConvertBooleanValues(\n consentForm.hasQuestionVaccineReaction,\n ),\n ...(isNotNullAndUndefined(consentForm.questionVaccineReaction)\n ? {\n hadReactionFollowingVaccineComment:\n consentForm.questionVaccineReaction,\n }\n : null),\n hasMedicalCondition: checkAndConvertBooleanValues(\n consentForm.hasQuestionMedicalConditions,\n ),\n ...(isNotNullAndUndefined(consentForm.questionMedicalConditions)\n ? { hasMedicalConditionComment: consentForm.questionMedicalConditions }\n : null),\n vaccineInLast14Days: checkAndConvertBooleanValues(\n consentForm.hasQuestionReceivedVaccineLast14Days,\n ),\n takingBloodClottingMeds: checkAndConvertBooleanValues(\n consentForm.hasQuestionBloodClottingMedication,\n ),\n ...(isNotNullAndUndefined(consentForm.questionBloodClottingMedication)\n ? {\n takingBloodClottingMedsComment:\n consentForm.questionBloodClottingMedication,\n }\n : null),\n pregnantOrBreastfeeding: checkAndConvertBooleanValues(\n consentForm.hasQuestionPregnant,\n ),\n immuneSystemSuppressed: checkAndConvertBooleanValues(\n consentForm.hasQuestionImmuneSystemSuppressed,\n ),\n autoimmuneCondition: checkAndConvertBooleanValues(\n consentForm.hasQuestionAutoimmune,\n ),\n historyOfBrainThrombosisOrThromboytopenia: checkAndConvertBooleanValues(\n consentForm.hasQuestionVSTOrHIT,\n ),\n haveReceivedDoseCount: toInteger(consentForm.haveReceivedDoseCount),\n },\n formCompletedBy: getFormMaker(consentForm.completedBy),\n formLanguage: consentForm.formLanguage,\n ...(isNotNullAndUndefined(consentForm.otherCompletedBy)\n ? {\n formCompletedByOther: consentForm.otherCompletedBy,\n }\n : null),\n };\n return result;\n};\n\nconst mapConsentForm = (consentForm) => {\n // don't change the value of the orginal object.\n // In section B, radioGroup uses string as its value to determine which\n // radio button should be selected. If we convert the hasQuestionXXX to bool,\n // then after submit, those fields whose value is false will become empty.\n const consentFormRequest = mapNewObject({ ...consentForm });\n // Object.keys(consentForm).forEach((propName) => {\n // consentFormRequest[propName] = checkAndConvertBooleanValues(\n // consentForm[propName],\n // );\n // });\n return consentFormRequest;\n};\n\nexport { mapConsentForm, getFormMaker };\n","/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable no-useless-escape */\n/* eslint-disable max-len */\nimport React, {\n useContext,\n useState,\n useEffect,\n useRef,\n useCallback,\n} from 'react';\nimport { useHistory, Prompt } from 'react-router-dom';\nimport {\n CircularProgress,\n makeStyles,\n Typography,\n Button,\n Divider,\n} from '@material-ui/core';\nimport { ArrowForwardRounded as ArrowForwardIcon } from '@material-ui/icons';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport CustomizedButton from 'components/button/CustomizedButton';\nimport PageLayout from 'components/page-layout/PageLayout';\nimport FormSection from 'components/form/FormSection';\nimport CustomDialog from 'components/dialog/CustomDialog';\nimport useConsentFormStore from 'services/store/form-stores/eConsentFormStore';\nimport { LANG } from 'utility/languageUtility';\nimport links from 'constants/links';\nimport classnames from 'classnames';\nimport { useTheme } from '@material-ui/core/styles';\nimport { toBoolean, formatDate } from 'utility/common';\nimport openPDF from 'utility/fileUtility';\nimport {\n mapKeys,\n startsWith,\n upperFirst,\n findKey,\n keys,\n trim,\n isEmpty,\n isObject,\n has,\n isBoolean,\n toLower,\n} from 'lodash';\nimport MESSAGE_TYPE from 'components/dialog/constants';\nimport CustomBackdrop from 'components/backdrop';\nimport getPageTitle from 'utility/pageTitle';\nimport Loading from './Loading';\nimport isFormDirty from './helper';\nimport AzureOperation from '../../services/common';\nimport { getCommon } from '../../commons/index';\nimport consentFormFields from './consentFormFields';\nimport { mapConsentForm } from '../../utility/consentFormMapper';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper,\n padding: theme.spacing(3),\n [theme.breakpoints.up('lg')]: {\n padding: '4% 20%',\n },\n },\n sectionTitle: {\n fontSize: '17px',\n fontWeight: 'bold',\n marginTop: theme.spacing(3),\n marginBottom: theme.spacing(2),\n },\n formTitle: {\n marginTop: '0px',\n marginBottom: theme.spacing(2),\n },\n sectionContentContainer: {\n paddingLeft: '0px',\n display: 'flex',\n flexDirection: 'column',\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(2),\n },\n },\n sectionContentP: {\n marginTop: theme.spacing(1),\n overflowWrap: 'anywhere',\n whiteSpace: 'pre-line',\n wordBreak: 'break-word',\n '&:first-child': {\n marginTop: theme.spacing(2),\n marginBottom: '0px',\n },\n },\n sectionChildContent: {\n marginLeft: '10px',\n },\n newLine: {\n height: '30px',\n },\n link: {\n textDecoration: 'underline',\n wordWrap: 'break-word',\n },\n buttonWrapper: {\n width: '100%',\n margin: '24px 0',\n textAlign: 'center',\n },\n validationList: {\n textAlign: 'left',\n },\n asteriskLegend: {\n marginBottom: theme.spacing(2),\n },\n visuallyHidden: {\n position: 'absolute',\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n width: '1px',\n margin: '-1px',\n padding: 0,\n border: 0,\n },\n successMessageFooter: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n marginBottom: theme.spacing(2),\n position: 'relative',\n paddingTop: theme.spacing(4),\n },\n surveyDivider: {\n width: `calc(100% + ${theme.spacing(4)}px + 1px)`,\n position: 'absolute',\n top: `-${theme.spacing(1)}px`,\n left: `-${theme.spacing(2) + 1}px`,\n marginTop: theme.spacing(2),\n },\n surveyButton: {\n backgroundColor: '#00bf6f',\n color: theme.palette.common.white,\n '&:hover': {\n backgroundColor: '#00a660',\n },\n },\n surveyCaption: {\n textAlign: 'center',\n fontSize: '0.875rem',\n marginTop: theme.spacing(2),\n },\n}));\n\nconst ConsentForm = () => {\n const WAIT_TIME = 2;\n const timer = useRef();\n const classes = useStyles();\n const theme = useTheme();\n const { translate, lang } = useContext(LanguageContext);\n const focusElState = useConsentFormStore((state) => state.focusEl);\n const schoolsApiHasError = useConsentFormStore(\n (state) => state.schoolsApiHasError,\n );\n const loadingSchoolsApi = useConsentFormStore(\n (state) => state.loadingSchoolsApi,\n );\n const consentFormState = useConsentFormStore((state) => state.formState);\n const updateForm = useConsentFormStore((state) => state.updateForm);\n const updateWholeForm = useConsentFormStore((state) => state.updateWholeForm);\n const updateFocusEl = useConsentFormStore((state) => state.setFocusEl);\n const clearForm = useConsentFormStore((state) => state.clearForm);\n const [scrollTo, setScrollTo] = useState(null);\n const [submitting, setSubmitting] = useState(false);\n const [schoolId, setSchoolId] = useState('');\n const [submitSuccess, setSubmitSuccess] = useState(false);\n const [openBackdrop, setOpenBackdrop] = useState(false);\n const [time, setTime] = useState(0);\n const [pdfReqFailed, setPdfReqFailed] = useState(null);\n const [pdf, setPdf] = useState(null);\n const history = useHistory();\n const { pagesUrl } = getCommon();\n const [submitModal, setSubmitModal] = useState({\n open: false,\n message: '',\n });\n\n const goToConsentList = useCallback(() => {\n history.push('/consent-list');\n }, [history]);\n\n const goToHomePage = useCallback(() => {\n history.push('/');\n }, [history]);\n\n useEffect(() => {\n if (\n loadingSchoolsApi !== null &&\n loadingSchoolsApi === false &&\n schoolsApiHasError\n ) {\n setSubmitModal({\n open: true,\n messageType: MESSAGE_TYPE.error,\n okText: translate('pages.request.ok'),\n onClose: () => goToHomePage(),\n onOkay: () => goToHomePage(),\n message: translate('pages.consentForm.error'),\n });\n }\n }, [loadingSchoolsApi, schoolsApiHasError, setSubmitModal]);\n\n useEffect(() => {\n return () => {\n clearInterval(timer.current);\n timer.current = 0;\n setTime(0);\n };\n }, []);\n\n useEffect(() => {\n document.title = getPageTitle(\n translate('pages.consentForm.formTitle'),\n lang,\n );\n }, [translate, lang]);\n\n useEffect(() => {\n return () => {\n clearInterval(timer.current);\n timer.current = 0;\n setTime(0);\n };\n }, []);\n\n useEffect(() => {\n const anchor = document.querySelector(`#${scrollTo}`);\n if (anchor && scrollTo !== null) {\n anchor.scrollIntoView({ behavior: 'smooth', block: 'start' });\n setScrollTo(null);\n }\n }, [scrollTo, setScrollTo]);\n\n useEffect(() => {\n if (pdf !== null || pdfReqFailed === true) {\n if (time >= WAIT_TIME) {\n // Close the backdrop if the submission was successful\n // Backdrop must show atleast 3 seconds before it closes.\n clearInterval(timer.current);\n setTime(0);\n setOpenBackdrop(false);\n setPdfReqFailed(null);\n if (pdf !== null) {\n openPDF(pdf);\n setPdf(null);\n setSubmitModal({ open: false });\n goToConsentList();\n } else {\n setSubmitModal({\n open: true,\n messageType: MESSAGE_TYPE.error,\n okText: translate('pages.request.ok'),\n onOkay: () => goToConsentList(),\n message: translate('pages.request.PDF.error'),\n });\n }\n }\n }\n }, [translate, time, pdf, pdfReqFailed, goToConsentList]);\n\n const startTimer = () => {\n timer.current = setInterval(() => {\n setTime((_time) => _time + 1);\n }, 1000);\n };\n\n useEffect(() => {\n return () => clearForm();\n }, [clearForm]);\n\n const handleCloseModal = () => {\n setSubmitModal({ open: false });\n if (submitSuccess) {\n clearForm();\n }\n };\n\n const openSubmitModal = (message, messageType) => {\n setSubmitModal({\n open: true,\n message,\n messageType,\n okText:\n messageType === MESSAGE_TYPE.confirmation\n ? translate('pages.request.yes')\n : translate('pages.request.ok'),\n cancelText:\n messageType === MESSAGE_TYPE.confirmation\n ? translate('pages.request.no')\n : '',\n onOkay:\n messageType === MESSAGE_TYPE.error\n ? () => handleCloseModal()\n : () => {},\n });\n };\n\n const getRadioButtonConditionalText = (name) => {\n // eslint-disable-next-line consistent-return\n let result = null;\n let radioButtonWithConditionalText = {};\n findKey(consentFormFields, (o) => {\n mapKeys(o, (value, key) => {\n if (value.conditionalTextField !== undefined) {\n radioButtonWithConditionalText = {\n ...radioButtonWithConditionalText,\n [key]: o,\n };\n }\n });\n });\n\n if (radioButtonWithConditionalText[name] !== undefined) {\n const corrTextFieldName = radioButtonWithConditionalText[name][name];\n result = corrTextFieldName.conditionalTextField;\n }\n\n return result;\n };\n\n const getFieldsWithConditionalValidation = () => {\n // eslint-disable-next-line consistent-return\n let result = {};\n mapKeys(consentFormState, (fields, fieldKey) => {\n mapKeys(fields, (fieldProp, fieldPropkey) => {\n if (fieldPropkey === 'conditionalField')\n result = {\n ...result,\n [fieldKey]: {\n ...fields,\n ...(fields.name === undefined && { name: fieldKey }),\n },\n };\n });\n });\n\n return result;\n };\n\n const isFieldWithConditionalValidation = (name) => {\n // eslint-disable-next-line consistent-return\n // Check whether a TextField is a corresponding TextField of Radio Button\n let result = false;\n const fieldWithConditionalValidation = getFieldsWithConditionalValidation();\n\n if (\n fieldWithConditionalValidation[name] !== null &&\n fieldWithConditionalValidation[name] !== undefined\n ) {\n result = true;\n }\n\n return result;\n };\n\n const getConsentFormStateValuesOnly = () => {\n let result = {};\n mapKeys(consentFormState, (value, key) => {\n result = { ...result, [key]: value.value };\n });\n\n return result;\n };\n\n const getInput = (name) => {\n // eslint-disable-next-line consistent-return\n let input = null;\n const fieldWithConditionalValidation = getFieldsWithConditionalValidation();\n\n findKey(consentFormFields, (o) => {\n mapKeys(o, (value, key) => {\n if (key === name) {\n // eslint-disable-next-line prefer-destructuring\n input = o[name];\n }\n });\n });\n\n if (\n // input === null &&\n fieldWithConditionalValidation[name] !== null &&\n fieldWithConditionalValidation[name] !== undefined\n ) {\n input = {\n ...(input !== null && input.type !== undefined && { type: input.type }),\n ...fieldWithConditionalValidation[name],\n };\n }\n\n return input;\n };\n\n const validateInput = (input, targetValue) => {\n if (!input) return {};\n\n let error = {};\n let value;\n if (targetValue) {\n value = targetValue;\n } else if (typeof input.value === 'string') {\n value = input.value ? input.value.trim() : input.value;\n } else {\n value = input.value;\n }\n if (toLower(input.name).search('phonenumber') >= 0) {\n // unmask: get numbers only\n value = value && value.replace(new RegExp(/[^\\d]/, 'g'), '');\n }\n\n const {\n validation,\n customValidate,\n labelMsg,\n requiredMsg,\n requiredAriaMsg,\n minLengthMsg,\n maxLengthMsg,\n type,\n } = input;\n\n if (!validation || isEmpty(validation)) return {};\n\n // Validation properties/criteria\n const { isRequired, maxLength, minLength, length, min, max, email } =\n validation;\n\n const label = !labelMsg ? input.label : labelMsg;\n if (isRequired) {\n const emptyErrorText = 'pages.request.information.errors.empty';\n\n if (!value || (value && trim(value).length === 0)) {\n const errorToDisplay = [\n !requiredMsg ? emptyErrorText : requiredMsg,\n { label },\n ];\n error = {\n error: errorToDisplay,\n errorAria: !requiredAriaMsg\n ? errorToDisplay\n : [requiredAriaMsg, { label }],\n };\n } else if (input.name === 'schoolName') {\n // If schoolCityName is invalid, it means the schoolName value is invalid as well\n // AutoComplete will automatically clear the value to null, thus it falls under cannot be empty error\n const cityInputName = consentFormFields.sectionA.schoolCity.name;\n if (\n !consentFormState[cityInputName] ||\n consentFormState[cityInputName].value === '' ||\n consentFormState[cityInputName].value === null\n ) {\n // error = [!requiredMsg ? emptyErrorText : requiredMsg, { label }];\n error = {\n error: ['pages.request.information.errors.itemNotFound', { label }],\n };\n }\n }\n\n if (isEmpty(error) && customValidate) {\n error = customValidate(value, consentFormState, consentFormFields);\n }\n }\n\n if (!isEmpty(error)) return error;\n\n if (type === 'date' && toLower(value) === 'invalid date') {\n return {\n error: ['pages.request.information.errors.invalid', { label }],\n };\n }\n\n if (minLength && value.length < minLength) {\n error = {\n error: [\n !minLengthMsg\n ? 'pages.request.information.errors.minLength'\n : minLengthMsg,\n { label, length: minLength },\n ],\n };\n } else if (maxLength && value.length > maxLength) {\n error = {\n error: [\n !maxLengthMsg\n ? 'pages.request.information.errors.maxLength'\n : validation.maxLengthMsg,\n { label, length: maxLength },\n ],\n };\n } else if (length && value && value.toString().length !== length) {\n error = {\n error: [\n 'pages.request.information.errors.exactLength',\n { label, length },\n ],\n };\n } else if (min && new Date(value) < new Date(min)) {\n // Min date check\n error = {\n error: ['pages.request.information.errors.minDate', { date: min }],\n };\n } else if (max && new Date(value) > new Date(max)) {\n // Max date check\n error = {\n error: ['pages.request.information.errors.maxDate', { date: max }],\n };\n } else if (email && value !== '' && value !== undefined) {\n // Email Address Check\n const isValid = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(\n value,\n );\n if (!isValid)\n error = {\n error: ['pages.request.information.errors.invalid', { label }],\n };\n } else if (customValidate) {\n error = customValidate(value, consentFormState, consentFormFields);\n }\n\n return error;\n };\n\n const validateClient = async (phin, dob) => {\n let err = null;\n if (phin && dob) {\n const { protectedResources } = AzureOperation;\n const dateOfBirth = formatDate(dob, 'YYYY-MM-DD');\n const params = {\n url: protectedResources.consentForm.endpoints.validateClient.baseUrl,\n method: protectedResources.consentForm.endpoints.validateClient.method,\n data: { phin, dateOfBirth },\n };\n\n try {\n const result = await AzureOperation.callApiWithAzureToken(params);\n if (!result || !result.found) {\n err = [\n 'pages.request.information.errors.itemNotFound',\n { label: consentFormFields.sectionA.phin.label },\n ];\n }\n } catch (error) {\n err = [\n consentFormFields.sectionA.phin.name,\n { label: translate('pages.consentForm.error') },\n ];\n }\n }\n\n return err;\n };\n\n const validatePhinSet = async (phin) => {\n const dobKey = consentFormFields.sectionA.dateOfBirth.name;\n const phinKey = consentFormFields.sectionA.phin.name;\n let err = null;\n if (\n !phin &&\n consentFormState[phinKey] &&\n consentFormState[phinKey].value &&\n consentFormState[phinKey].value !== '' &&\n consentFormState[dobKey] &&\n consentFormState[dobKey].value &&\n consentFormState[dobKey].value !== ''\n ) {\n err = await validateClient(\n consentFormState[phinKey].value,\n consentFormState[dobKey].value,\n );\n }\n return err;\n };\n\n const getFieldWithErrors = () => {\n let fieldWithErrors = {};\n findKey(consentFormFields, (o) => {\n mapKeys(o, (value, key) => {\n if (\n isObject(o[key]) &&\n has(o[key], 'type') &&\n !isFieldWithConditionalValidation(key)\n ) {\n const fieldValue =\n (consentFormState &&\n consentFormState[key] &&\n consentFormState[key].value) ||\n '';\n\n const fieldError =\n (consentFormState &&\n consentFormState[key] &&\n consentFormState[key].error) ||\n '';\n\n const error =\n fieldError !== 'Invalid Date'\n ? validateInput(o[key], fieldValue)\n : null;\n\n if (!isEmpty(error)) {\n fieldWithErrors = {\n ...fieldWithErrors,\n [key]: { value: fieldValue, ...error },\n };\n }\n }\n });\n });\n\n const fieldWithConditionalValidation = getFieldsWithConditionalValidation();\n mapKeys(fieldWithConditionalValidation, (value, key) => {\n const fieldValue =\n (consentFormState &&\n consentFormState[key] &&\n consentFormState[key].value) ||\n '';\n const error = validateInput(value, fieldValue);\n\n if (!isEmpty(error)) {\n fieldWithErrors = {\n ...fieldWithErrors,\n [key]: {\n ...consentFormState[key],\n value: fieldValue,\n error: error.error,\n },\n };\n }\n });\n\n return fieldWithErrors;\n };\n\n const errorModal = () => {\n return {\n open: true,\n messageType: MESSAGE_TYPE.error,\n okText: translate('pages.request.ok'),\n onOkay: () => handleCloseModal(),\n message: translate('pages.consentForm.validationError'),\n // content: (\n //
    \n //
  • {translate('pages.consentForm.sectionA.surname')}
  • \n //
  • {translate('pages.consentForm.sectionA.givenName')}
  • \n //
  • {translate('pages.consentForm.validationFields.dateOfBirth')}
  • \n //
  • \n // {translate(\n // 'pages.consentForm.validationFields.mbRegistrationNumber',\n // )}\n //
  • \n //
  • {translate('pages.consentForm.validationFields.phin')}
  • \n //
  • {translate('pages.consentForm.sectionA.schoolName')}
  • \n //
  • {translate('pages.consentForm.sectionA.schoolCity')}
  • \n //
  • {translate('pages.consentForm.sectionA.grade')}
  • \n //
\n // ),\n };\n };\n\n const apiErrorModal = () => {\n return {\n open: true,\n messageType: MESSAGE_TYPE.error,\n okText: translate('pages.request.ok'),\n onOkay: () => handleCloseModal(),\n message: translate('pages.consentForm.error'),\n };\n };\n\n const viewPdf = (_econsentId) => {\n if (_econsentId === null) return;\n\n setSubmitModal({ open: false });\n\n setOpenBackdrop(true);\n const { protectedResources, callApiWithAzureToken } = AzureOperation;\n const { baseUrl, method } = protectedResources.PDF.endpoints.covid19;\n const params = {\n url: `${baseUrl}/${lang}/${_econsentId}`,\n method,\n };\n\n startTimer();\n callApiWithAzureToken(params)\n .then((result) => {\n if (result.pdf !== null) setPdf(result.pdf);\n else setPdfReqFailed(true);\n })\n .catch(() => {\n // eslint-disable-next-line no-console\n setPdfReqFailed(true);\n });\n };\n\n const submitSuccessModal = () => {\n return {\n open: true,\n messageType: MESSAGE_TYPE.confirmation,\n cancelButton: true,\n okText: translate('pages.request.yes'),\n cancelText: translate('pages.request.no'),\n onClose: () => goToConsentList(),\n onCancel: () => goToConsentList(),\n footer: (\n
\n \n {\n history.push(`survey?lang=${lang}`);\n }}\n >\n {translate('pages.consentForm.takeSurvey')}\n \n \n {translate('pages.consentForm.surveyMessage')}\n \n
\n ),\n };\n };\n\n const openSuccessMessage = (_econsentId) => {\n setSubmitModal({\n ...submitSuccessModal(),\n onOkay: () => viewPdf(_econsentId),\n message: translate('pages.consentForm.success'),\n });\n };\n\n const openErrorModal = (_firstFieldWithError) => {\n let anchorId = _firstFieldWithError;\n if (startsWith(_firstFieldWithError, 'question')) {\n anchorId = `has${upperFirst(_firstFieldWithError)}`;\n } else if (_firstFieldWithError === 'otherCompletedBy') {\n anchorId = `completedBy`;\n }\n\n updateFocusEl(null);\n setSubmitModal({\n ...errorModal(),\n onOkay: () => {\n setScrollTo(anchorId);\n updateFocusEl(_firstFieldWithError);\n handleCloseModal();\n },\n });\n };\n\n const handleSubmit = async (e) => {\n e.preventDefault();\n\n let fieldsWithError = getFieldWithErrors();\n const phinKey = consentFormFields.sectionA.phin.name;\n const error = await validatePhinSet(fieldsWithError.phin);\n if (error) {\n fieldsWithError = {\n ...fieldsWithError,\n phin: { value: consentFormState[phinKey].value, error },\n };\n }\n\n updateWholeForm(fieldsWithError);\n const totalFieldsWithError = keys(fieldsWithError).length;\n if (totalFieldsWithError > 0) {\n const fieldNamesWithError = keys(fieldsWithError);\n openErrorModal(fieldNamesWithError[0]);\n return false;\n }\n\n setSubmitting(true);\n setSubmitModal({ open: false });\n let consentFormStateValuesOnly = getConsentFormStateValuesOnly();\n consentFormStateValuesOnly = {\n ...consentFormStateValuesOnly,\n schoolId,\n formLanguage: lang === LANG.FR ? 'FRENCH' : 'ENGLISH',\n };\n\n const { protectedResources } = AzureOperation;\n const params = {\n url: protectedResources.consentForm.endpoints.submitConsentForm.baseUrl,\n method: protectedResources.consentForm.endpoints.submitConsentForm.method,\n data: mapConsentForm(consentFormStateValuesOnly),\n };\n\n try {\n const result = await AzureOperation.callApiWithAzureToken(params);\n if (!result || result.statusCode !== 0) {\n setSubmitModal(apiErrorModal);\n return false;\n }\n setSubmitSuccess(true);\n openSuccessMessage(result.econsentId);\n return true;\n } catch (err) {\n openSubmitModal(translate('pages.consentForm.error'), MESSAGE_TYPE.error);\n return false;\n } finally {\n setSubmitting(false);\n }\n };\n\n const showPrompt = () => {\n if (submitSuccess || submitModal.open) return false;\n\n return true;\n };\n\n const handleBlockedNavigation = (nextLocation) => {\n if (\n submitSuccess ||\n (nextLocation &&\n nextLocation.pathname === pagesUrl.get('covidConsentForm').url)\n ) {\n return true;\n }\n if (isFormDirty(consentFormState)) {\n setSubmitModal({\n open: true,\n message: translate('pages.consentForm.navigateWarning'),\n messageType: MESSAGE_TYPE.confirmation,\n okText: translate('pages.request.yes'),\n cancelText: translate('pages.request.no'),\n onClose: () => setSubmitModal({ open: false }),\n onCancel: () => setSubmitModal({ open: false }),\n onOkay: () => {\n setSubmitModal({ open: false });\n clearForm();\n history.push(nextLocation.pathname);\n },\n });\n\n return false;\n }\n\n return true;\n };\n\n const handleOnChange = (name, value) => {\n const input = getInput(name);\n if (!input) return;\n\n if (\n input.type !== 'checkbox' &&\n input.type !== 'radio' &&\n input.type !== 'date'\n ) {\n const error = validateInput(input, value);\n\n updateForm(name, {\n value,\n ...(!isEmpty(error) && {\n ...error,\n }),\n });\n } else if (input.type === 'date') {\n let error = validateInput(input, value);\n if (\n value !== null &&\n value !== '' &&\n value.toString() === 'Invalid Date'\n ) {\n error = {\n error: [\n 'pages.request.information.errors.invalid',\n { label: input.label },\n ],\n };\n }\n updateForm(name, {\n value,\n ...(!isEmpty(error)\n ? {\n ...error,\n }\n : {\n error: null,\n errorAria: null,\n }),\n });\n } else {\n const error = validateInput(input, value);\n updateForm(name, {\n value,\n ...(!isEmpty(error)\n ? {\n ...error,\n }\n : {\n error: null,\n errorAria: null,\n }),\n });\n\n const corrTextFieldName = getRadioButtonConditionalText(name);\n if (corrTextFieldName !== null) {\n // This radio control is a question type ('yes' or 'no')\n // or with 'other' as one of options\n // if answer is 'Yes', we need to enable the corresponding TextField.\n // All Radio related to Question starts with 'has', so need to remove it\n // If answer is no, need to remove the corresponding textfield's value\n const isDisabled = isBoolean(toBoolean(value))\n ? value === 'false'\n : value !== 'other';\n\n const corrTextFieldInput = getInput(corrTextFieldName);\n const corrTextFieldError = validateInput(corrTextFieldInput, value);\n updateForm(corrTextFieldName, {\n disabled: isDisabled,\n ...(isDisabled\n ? { value: '', validation: {} }\n : { validation: { isRequired: true } }),\n error: corrTextFieldError.error,\n });\n }\n\n if (name === 'racialEthnicity') {\n const northAmericanIndigenousIdentity =\n consentFormFields.sectionC.northAmericanIndigenousIdentity.name;\n const disableNorthAmericanIndigenousIdentity =\n value !== 'north_american_indigenous';\n\n updateForm(northAmericanIndigenousIdentity, {\n disabled: disableNorthAmericanIndigenousIdentity,\n ...(disableNorthAmericanIndigenousIdentity\n ? { value: '', validation: {} }\n : { validation: { isRequired: true } }),\n error: null,\n });\n }\n\n updateFocusEl(null);\n }\n };\n\n const handleOnBlur = (name, value, data) => {\n const input = getInput(name);\n if (!input) return;\n\n if (name === 'mbRegistrationNumber') {\n const mbRegError = validateInput(input, value);\n const phinName = 'phin';\n const phinInput = getInput(phinName);\n const phinValue =\n consentFormState[phinName] && consentFormState[phinName].value;\n const phinError = validateInput(phinInput, phinValue);\n updateWholeForm({\n mbRegistrationNumber: {\n value,\n error: mbRegError.error,\n },\n phin: {\n value: phinValue,\n error: phinError.error,\n },\n });\n } else if (name === 'phin') {\n const phinError = validateInput(input, value);\n const mbRegName = 'mbRegistrationNumber';\n const mbRegInput = getInput(mbRegName);\n const mbRegValue =\n consentFormState[mbRegName] && consentFormState[mbRegName].value;\n const mbRegError = validateInput(mbRegInput, mbRegValue);\n updateWholeForm({\n phin: {\n value,\n error: phinError.error,\n },\n mbRegistrationNumber: {\n value: mbRegValue,\n error: mbRegError.error,\n },\n });\n } else {\n const error = validateInput(input, value);\n\n updateForm(name, {\n ...(!isEmpty(error)\n ? {\n ...error,\n }\n : {\n error: null,\n errorAria: null,\n }),\n });\n }\n\n if (data && data.schoolId) {\n setSchoolId(data.schoolId);\n }\n\n updateFocusEl(null);\n };\n\n const renderForm = () => {\n return (\n \n \n \n {translate('pages.consentForm.formTitle')}\n \n\n \n {translate('pages.consentForm.asteriskLegend')}\n \n\n \n \n A. {translate('pages.consentForm.sectionA.title')}\n \n \n \n B. {translate('pages.consentForm.sectionB.title')}\n \n \n \n C. {translate('pages.consentForm.sectionC.title')}\n \n \n \n D. {translate('pages.consentForm.sectionD.title')}\n \n
\n \n {translate('pages.consentForm.sectionD.factSheet.title')}\n \n \n {translate('pages.consentForm.sectionD.factSheet.body1', {\n covidVaccineResourcesLink: links.covidVaccineResourcesLink,\n covidVaccineResourcesLinkFr: links.covidVaccineResourcesLinkFr,\n })}\n \n \n {translate('pages.consentForm.sectionD.factSheet.body2')}\n \n \n {translate('pages.consentForm.sectionD.factSheet.body3', {\n publicHealthOfficeWebsite: links.publicHealthOfficeWebsite,\n publicHealthOfficeWebsiteFr: links.publicHealthOfficeWebsiteFr,\n })}\n \n \n \n \n {translate('pages.consentForm.sectionD.note', {\n publicHealthOfficeWebsite: links.publicHealthOfficeWebsite,\n publicHealthOfficeWebsiteFr: links.publicHealthOfficeWebsiteFr,\n })}\n \n
\n \n E. {translate('pages.consentForm.sectionE.title')}\n \n\n \n\n \n {translate(\n 'pages.consentForm.sectionE.thirdPartyDisclosureClosingStatement',\n {\n publicHealthOfficeWebsite: links.publicHealthOfficeWebsite,\n publicHealthOfficeWebsiteFr: links.publicHealthOfficeWebsiteFr,\n },\n )}\n \n\n \n {translate('pages.consentForm.sectionE.privacyNotice.title')}\n \n \n {translate('pages.consentForm.sectionE.privacyNotice.body', {\n publicHealthOfficeWebsite: links.publicHealthOfficeWebsite,\n publicHealthOfficeWebsiteFr: links.publicHealthOfficeWebsiteFr,\n })}\n \n\n
\n }\n disabled={submitting}\n startIcon={submitting && }\n onClick={handleSubmit}\n >\n {translate('pages.consentForm.submit')}\n \n\n {submitting && (\n \n {translate('pages.consentForm.submittingForm')}\n \n )}\n
\n \n \n );\n };\n\n return (\n \n \n {renderForm()}\n {loadingSchoolsApi === true && (\n \n )}\n \n \n \n );\n};\n\nexport default ConsentForm;\n","/* eslint-disable max-len */\n/* eslint-disable array-callback-return */\n/* eslint-disable radix */\n/* eslint-disable no-unused-vars */\n/* eslint-disable default-case */\nimport React from 'react';\nimport { orderBy, sumBy, filter } from 'lodash';\n\nexport const formatErrorMessages = (errorMessages, pkData) => {\n return (\n
\n {errorMessages.map((errMsg) => {\n return

{errMsg.message}

;\n })}\n
\n );\n};\n\nexport const getFieldsToSort = (sorts) => {\n const fieldsToSort = [];\n if (sorts)\n sorts.map((sort) => {\n fieldsToSort.push(sort.fieldName);\n });\n\n return fieldsToSort;\n};\n\nexport const getFieldsToSortOrder = (sorts) => {\n const fieldsToSortOrder = [];\n if (sorts)\n sorts.map((sort) => {\n fieldsToSortOrder.push(sort.order === 0 ? 'asc' : 'desc');\n });\n\n return fieldsToSortOrder;\n};\n\nexport const checkboxIndeterminate = (totalSelectedRows, totalRows) => {\n if (totalSelectedRows > 0 && totalRows > 0 && totalSelectedRows < totalRows)\n return { indeterminate: true };\n\n return null;\n};\n\nexport const applyDataGridProps = (\n data,\n gridData,\n rowIsEditing,\n urlParams,\n config,\n columns,\n) => {\n const urlParamsObj = JSON.parse(urlParams);\n const { filters } = urlParamsObj;\n const fieldsToSort = getFieldsToSort(urlParamsObj.sorts);\n const fieldsToSortBy = getFieldsToSortOrder(urlParamsObj.sorts);\n let updatedData;\n\n if (!rowIsEditing) {\n if (fieldsToSort.length > 0 || fieldsToSortBy.length > 0)\n updatedData = orderBy(\n updatedData,\n fieldsToSort.map((column) => {\n return (row) => {\n const value = row[column];\n\n return value != null ? value.toString().toLowerCase() : '';\n };\n }),\n fieldsToSortBy,\n );\n }\n\n return updatedData;\n};\n\nexport const getColumnsConfiguredWidths = (columns) => {\n const columnWidths = [];\n const cols = columns && columns.length > 0 ? [...columns] : [];\n cols.map((col, i) => {\n if (col.hide === undefined || col.hide === false)\n columnWidths.push({\n index: i,\n name: col.name,\n width: col.minWidth || 100,\n isResized: false,\n });\n });\n\n return columnWidths;\n};\n\nexport const getNewColumnWidthsAfterResized = (\n _columnHeaderWidth,\n deltaX,\n colIndex,\n) => {\n const columnHeaderWidths =\n _columnHeaderWidth && _columnHeaderWidth.length > 0\n ? [..._columnHeaderWidth]\n : [];\n const newColumnHeaderWidths = columnHeaderWidths.map((colWidth) => {\n const newColWidth = colWidth;\n if (colWidth.index === colIndex) {\n newColWidth.deductWidth = deltaX * -1;\n newColWidth.isResized = true;\n }\n\n return newColWidth;\n });\n\n return newColumnHeaderWidths;\n};\n\n// export const getNewColumnWidthAfterAdjusment = (columnHeaderWidths, tableWidth, scrollBarSize = 0) => {\n// const _columnHeaderWidths = columnHeaderWidths && columnHeaderWidths.length > 0 ? [...columnHeaderWidths] : [];\n// const lastColIndex = _columnHeaderWidths.length - 1;\n// let newColumnWidth = null;\n\n// if (scrollBarSize > 0) {\n// _columnHeaderWidths.map((colWidth) => {\n// if (colWidth.index === lastColIndex)\n// newColumnWidth = colWidth.width - scrollBarSize;\n// })\n// }\n\n// return newColumnWidth;\n// }\n\nexport const getNewColumnWidthAfterAdjusment = (\n _columnHeaderWidths,\n tableWidth,\n scrollBarSize,\n) => {\n const columnHeaderWidths =\n _columnHeaderWidths && _columnHeaderWidths.length > 0\n ? [..._columnHeaderWidths]\n : [];\n const lastColIndex = columnHeaderWidths.length - 1;\n const sumOfColumnWidths = sumBy(columnHeaderWidths, (o) => {\n return o.width;\n });\n let newColumnWidth = null;\n if (tableWidth && tableWidth > sumOfColumnWidths) {\n _columnHeaderWidths.map((colWidth) => {\n if (colWidth.index === lastColIndex) {\n const otherColumns = filter(_columnHeaderWidths, (o) => {\n return o.index !== colWidth.index;\n });\n const sumOfOtherColumnWidths = sumBy(otherColumns, (o) => {\n return o.width;\n });\n\n newColumnWidth = tableWidth - sumOfOtherColumnWidths - scrollBarSize;\n }\n });\n } else if (scrollBarSize > 0) {\n _columnHeaderWidths.map((colWidth) => {\n if (colWidth.index === lastColIndex)\n newColumnWidth = colWidth.width - scrollBarSize;\n });\n }\n\n return newColumnWidth;\n};\n\nexport const getNewColumnWidthAfterAdjusmentTableWidthRestriction = (\n _columnHeaderWidths,\n tableWidth,\n scrollBarSize,\n) => {\n // For grid that you want auto-adjust the last column with respect to grid's avalaible width\n // The grid will not show horizontal scroll if you use this.\n\n const columnHeaderWidths =\n _columnHeaderWidths && _columnHeaderWidths.length > 0\n ? [..._columnHeaderWidths]\n : [];\n const lastColIndex = columnHeaderWidths.length - 1;\n const sumOfColumnWidths = sumBy(columnHeaderWidths, (o) => {\n return o.width;\n });\n let newColumnWidth = null;\n\n if (tableWidth && scrollBarSize) {\n columnHeaderWidths.map((colWidth) => {\n if (colWidth.index === lastColIndex) {\n const otherColumns = filter(columnHeaderWidths, (o) => {\n return o.index !== colWidth.index;\n });\n const sumOfOtherColumnWidths = sumBy(otherColumns, (o) => {\n return o.width;\n });\n newColumnWidth = tableWidth - sumOfOtherColumnWidths - scrollBarSize;\n }\n });\n }\n\n return newColumnWidth;\n};\n\nexport const getNewColumnWidthsAfterLastColumnSizeAdjusment = (\n _columnHeaderWidths,\n tableWidth,\n scrollBarSize,\n) => {\n const columnHeaderWidths =\n _columnHeaderWidths && _columnHeaderWidths.length > 0\n ? [..._columnHeaderWidths]\n : [];\n const lastColIndex = columnHeaderWidths.length - 1;\n if (tableWidth && scrollBarSize) {\n const newColumnHeaderWidths = columnHeaderWidths.map((colWidth) => {\n const newColWidth = colWidth;\n if (colWidth.index === lastColIndex) {\n const otherColumns = filter(columnHeaderWidths, (o) => {\n return o.index !== colWidth.index;\n });\n const sumOfOtherColumnWidths = sumBy(otherColumns, (o) => {\n return o.width;\n });\n const newColumnWidth =\n tableWidth - sumOfOtherColumnWidths - scrollBarSize;\n\n newColWidth.width = newColumnWidth;\n newColWidth.deductWidth = 0;\n newColWidth.isResized = false;\n }\n\n return newColWidth;\n });\n\n return newColumnHeaderWidths;\n }\n\n return _columnHeaderWidths;\n};\n\nexport const getColumnWidth = (\n colIndex,\n _columns,\n columnHeaderWidths,\n formView,\n tableWidth,\n isLastIndex,\n scrollBarSize,\n) => {\n const columns = _columns && _columns.length > 0 ? [..._columns] : [];\n let defaultWidth =\n columns[colIndex] && columns[colIndex].minWidth !== null\n ? columns[colIndex].minWidth\n : 0;\n let measuredWidth =\n columnHeaderWidths[colIndex] && columnHeaderWidths[colIndex].width !== null\n ? columnHeaderWidths[colIndex].width\n : 0;\n const isResized =\n columnHeaderWidths[colIndex] &&\n columnHeaderWidths[colIndex].isResized !== null\n ? columnHeaderWidths[colIndex].isResized\n : 0;\n const deductWidth =\n columnHeaderWidths[colIndex] &&\n columnHeaderWidths[colIndex].deductWidth !== null &&\n columnHeaderWidths[colIndex].deductWidth !== undefined\n ? columnHeaderWidths[colIndex].deductWidth\n : 0;\n\n if (\n columns[colIndex].hideOnReadOnly !== undefined &&\n columns[colIndex].hideOnReadOnly &&\n columns[colIndex].hideOnReadOnly === true\n ) {\n measuredWidth = 0;\n defaultWidth = 0;\n }\n\n let newColumnWidth = [];\n\n if (!isResized) {\n if (defaultWidth > measuredWidth)\n newColumnWidth = defaultWidth - deductWidth;\n else newColumnWidth = measuredWidth - deductWidth;\n } else {\n newColumnWidth = measuredWidth - deductWidth;\n }\n\n // if (isLastIndex) {\n // const otherColumns = filter(columns, function(o) { return o.index !== colIndex; });\n // const sumOfOtherColumnWidths = sumBy(otherColumns, function(o) { return o.minWidth; });\n\n // newColumnWidth = (tableWidth - sumOfOtherColumnWidths) - scrollBarSize;\n // }\n\n return newColumnWidth < 0 ? 0 : newColumnWidth;\n};\n\nexport const updateColumnWidths = (index, newWidth, _columnHeaderWidths) => {\n const columnHeaderWidths =\n _columnHeaderWidths && _columnHeaderWidths.length > 0\n ? [..._columnHeaderWidths]\n : [];\n const newColumnHeaderWidths = columnHeaderWidths.map((colWidth) => {\n const newColWidth = colWidth;\n if (colWidth.index === index) {\n newColWidth.width = newWidth;\n newColWidth.deductWidth = 0;\n }\n\n return newColWidth;\n });\n\n return newColumnHeaderWidths;\n};\n","/* eslint-disable no-param-reassign */\n/* eslint-disable no-shadow */\n/* eslint-disable react/prop-types */\nimport React, {\n useState,\n useLayoutEffect,\n useEffect,\n useRef,\n forwardRef,\n useCallback,\n} from 'react';\nimport { Divider } from '@material-ui/core';\nimport LinearProgress from '@material-ui/core/LinearProgress';\nimport { isEqual } from 'lodash';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport { Grid, AutoSizer, ScrollSync } from 'react-virtualized';\nimport { mergeRefs } from 'use-callback-ref';\nimport {\n getColumnsConfiguredWidths,\n getNewColumnWidthAfterAdjusment,\n getColumnWidth as _getColumnWidth,\n updateColumnWidths,\n} from './helpers';\nimport './grid.css';\n\nconst pageStyles = makeStyles(() => ({\n tableContainer: {\n boxShadow:\n '0px 2px 4px -1px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px 0px rgba(0,0,0,0.12)',\n padding: '0px',\n width: '100%',\n minHeight: '400px',\n height: '100%',\n },\n linearProgress: {\n position: 'absolute',\n top: '0px',\n left: '0px',\n width: '100%',\n },\n hideScroll: {\n overflowX: 'hidden!important',\n overflowY: 'hidden!important',\n },\n}));\n\nconst CustomGrid = forwardRef((props, ref) => {\n const ROW_HEIGHT = 40;\n const {\n columns,\n columnHeaderWidths = [],\n setColumnHeaderWidths = () => {},\n cellRenderer = () => {},\n headerRenderer = () => {},\n data,\n showLoader = false,\n showLoadProgress = true,\n formView,\n scrollToRow,\n scrollToColumn,\n scrollTop: lastScrollTop,\n scrollLeft: lastScrollLeft,\n onScroll,\n customBody,\n deferredMeasurementCache,\n estimatedRowSize,\n overscanColumnCount,\n overscanRowCount,\n fixedColumnCount = 0,\n noHeader = false,\n bodyHeight = 0,\n onSectionRendered,\n title,\n } = props;\n\n const mainTheme = useTheme();\n const { divider } = mainTheme.palette;\n // const [hoveredRow, setHoveredRow] = useState(null);\n const [gridWidth, setGridWidth] = useState(0);\n const noData = !!(data && data.length === 0);\n const [scrollBarSize, setScrollBarSize] = useState(0);\n const columnCount = Object.keys(columns).length;\n const gridBody = useRef();\n const gridHeader = useRef();\n const classes = pageStyles();\n useEffect(() => {\n if (gridHeader && gridHeader.current)\n gridHeader.current.recomputeGridSize();\n\n if (gridBody && gridBody.current) gridBody.current.recomputeGridSize();\n }, [gridWidth, scrollBarSize]);\n\n const forceUpdate = () => {\n if (gridBody && gridBody.current) gridBody.current.forceUpdate();\n if (gridHeader && gridHeader.current) gridHeader.current.forceUpdate();\n };\n\n useLayoutEffect(() => {\n if (ref && ref !== null) {\n ref.current = { forceUpdate };\n }\n });\n\n useEffect(() => {\n if (gridBody && gridBody.current) gridBody.current.forceUpdate();\n }, []);\n\n const loadInitialColumnWidths = useCallback(() => {\n const initialColumnWidths = getColumnsConfiguredWidths(columns);\n setColumnHeaderWidths(initialColumnWidths);\n }, [columns, setColumnHeaderWidths]);\n\n useEffect(() => {\n if (columnCount > 0 && columnHeaderWidths.length === 0)\n loadInitialColumnWidths();\n }, [columnCount, columnHeaderWidths, gridWidth, loadInitialColumnWidths]);\n\n useEffect(() => {\n if (columnCount > 0 && columnHeaderWidths.length === 0)\n loadInitialColumnWidths();\n\n if (gridHeader && gridHeader.current)\n gridHeader.current.recomputeGridSize();\n\n if (gridBody && gridBody.current) gridBody.current.recomputeGridSize();\n }, [columnCount, columnHeaderWidths, loadInitialColumnWidths]);\n\n const recomputeGridSizeAndExpand = async () => {\n if (gridBody && gridBody.current)\n await gridBody.current.recomputeGridSize();\n };\n\n useEffect(() => {\n recomputeGridSizeAndExpand();\n }, [columns, data]);\n\n const getColumnWidth = ({ index }) => {\n let newColumnHeaderWidths =\n columnHeaderWidths && columnHeaderWidths.length > 0\n ? [...columnHeaderWidths]\n : [];\n if (newColumnHeaderWidths && newColumnHeaderWidths.length === 0)\n newColumnHeaderWidths = getColumnsConfiguredWidths(columns);\n\n const isLastColumnIndex = columns.length - 1 === index;\n let newColumnWidth = _getColumnWidth(\n index,\n columns,\n newColumnHeaderWidths,\n formView,\n gridWidth,\n isLastColumnIndex,\n scrollBarSize,\n );\n\n if (isLastColumnIndex === true) {\n const lastColumnWidthAdj = getNewColumnWidthAfterAdjusment(\n newColumnHeaderWidths,\n gridWidth,\n scrollBarSize,\n );\n if (lastColumnWidthAdj !== null) newColumnWidth = lastColumnWidthAdj;\n }\n\n const finalNewColumnHeaderWidths = updateColumnWidths(\n index,\n newColumnWidth,\n newColumnHeaderWidths,\n );\n if (!isEqual(newColumnHeaderWidths, finalNewColumnHeaderWidths))\n setColumnHeaderWidths(finalNewColumnHeaderWidths);\n\n return newColumnWidth;\n };\n\n const handleOnScroll = (e) => {\n const { scrollLeft } = e;\n const noData = !!(data && data.length === 0);\n if (onScroll) onScroll(e);\n\n if (!noData) {\n if (gridBody.current && gridBody.current !== null)\n gridBody.current.scrollLeft = scrollLeft;\n } else if (gridHeader.current && gridHeader.current !== null)\n gridHeader.current.scrollLeft = scrollLeft;\n };\n\n const onScrollPresenceChg = ({ size, vertical }) => {\n setScrollBarSize(vertical ? size : 0);\n };\n\n return (\n \n \n {() => {\n return (\n {\n if (width !== 1200) setGridWidth(width);\n }}\n >\n {({ width, height }) => {\n return (\n <>\n \n {!noHeader && (\n \n {noData && (\n \n )}\n {columnCount > 0 && (\n \n )}\n \n )}\n \n {columnCount > 0 && (\n
\n cellRenderer(props, width)}\n columnWidth={getColumnWidth}\n width={width}\n height={data.length > 0 ? bodyHeight : 0}\n columnCount={columnCount}\n rowCount={data.length}\n rowHeight={60}\n {...(scrollToRow !== null ? { scrollToRow } : null)}\n scrollTop={lastScrollTop}\n scrollLeft={lastScrollLeft}\n scrollToColumn={scrollToColumn}\n onScroll={handleOnScroll}\n // onScrollbarPresenceChange={\n // handleOnScrollPresenceChange\n // }\n deferredMeasurementCache={deferredMeasurementCache}\n estimatedRowSize={estimatedRowSize}\n overscanColumnCount={overscanColumnCount}\n overscanRowCount={overscanRowCount}\n fixedColumnCount={fixedColumnCount}\n onSectionRendered={onSectionRendered}\n />\n
\n )}\n {customBody ? (\n \n {customBody}\n \n ) : null}\n \n \n );\n }}\n \n );\n }}\n
\n \n );\n});\n\nfunction CustomBody(props) {\n const { children, height } = props;\n\n return
{children}
;\n}\n\nexport default React.memo(CustomGrid);\n","const SortDirection = {\n /**\n * Sort items in ascending order.\n * This means arranging from the lowest value to the highest (e.g. a-z, 0-9).\n */\n ASC: 'ASC',\n\n /**\n * Sort items in descending order.\n * This means arranging from the highest value to the lowest (e.g. z-a, 9-0).\n */\n DESC: 'DESC',\n};\n\nexport default SortDirection;\n","/* eslint-disable consistent-return */\n/* eslint-disable array-callback-return */\n/* eslint-disable no-nested-ternary */\n/* eslint-disable react/require-default-props */\n/* eslint-disable react/forbid-prop-types */\n/* eslint-disable react/default-props-match-prop-types */\n/* eslint-disable react/prop-types */\nimport React from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport { isEqual, find } from 'lodash';\nimport { Tooltip, Icon, Typography, makeStyles } from '@material-ui/core';\nimport SortDirection from 'components/react-virtualized-grid/SortDirection';\n\nconst useStyles = makeStyles(() => ({\n knob: {\n '&:hover': {\n opacity: '1!important',\n },\n },\n label: {\n fontSize: '0.9rem',\n fontWeight: 'bold',\n lineHeight: '1rem',\n },\n}));\n\nfunction RVHeader(props) {\n const {\n dataGrid,\n label,\n disableSort,\n defaultSort,\n setDataGridState,\n setHasSort,\n dbColumnName,\n onSort,\n hideColumnSortDirection = false,\n columnIndex,\n ariaLabel,\n } = props;\n\n const classes = useStyles();\n\n const getNewHasSort = (newSorts) => {\n if (isEqual(newSorts, defaultSort)) return false;\n return true;\n };\n\n const getNewSortDirection = (currSortDirection) => {\n switch (currSortDirection) {\n case null: {\n return SortDirection.ASC;\n }\n case SortDirection.ASC: {\n return SortDirection.DESC;\n }\n case SortDirection.DESC: {\n return null;\n }\n default: {\n return null;\n }\n }\n };\n\n const getCurrentSortDirection = (changedColumn) => {\n if (dataGrid && dataGrid.sorts) {\n const columnSort =\n dataGrid &&\n dataGrid.sorts.filter((sort) => {\n if (sort.fieldName.toLowerCase() === changedColumn.toLowerCase())\n return sort;\n\n return null;\n });\n const currentSort =\n columnSort.length !== 0\n ? columnSort[0].order === 0\n ? SortDirection.ASC\n : SortDirection.DESC\n : null;\n\n return columnSort.length === 0 ? null : currentSort;\n }\n return null;\n };\n\n const removeColumnSort = (changedColumn) => {\n const newSorts =\n dataGrid &&\n dataGrid.sorts.filter((sort) => {\n if (sort.fieldName.toLowerCase() !== changedColumn.toLowerCase())\n return sort;\n });\n\n return newSorts.length !== 0 ? newSorts : defaultSort;\n };\n\n const updateColumnSort = (changedColumn, newSortDirection) => {\n const currentHasSort = getNewHasSort(dataGrid.sorts);\n const findSort = find(currentHasSort ? dataGrid.sorts || [] : [], (o) => {\n return o.fieldName.toLowerCase() === changedColumn.toLowerCase();\n });\n let newSorts = [];\n\n const dgSorts =\n dataGrid && dataGrid.sorts && dataGrid.sorts.length > 0\n ? [...dataGrid.sorts]\n : [];\n if (findSort !== undefined) {\n const updatedSorts =\n dgSorts &&\n dgSorts.map((sort) => {\n const newSort = sort;\n if (sort.fieldName.toLowerCase() === changedColumn.toLowerCase()) {\n newSort.order = newSortDirection === SortDirection.ASC ? 0 : 1;\n }\n return newSort;\n });\n newSorts = updatedSorts;\n } else {\n newSorts = currentHasSort ? dataGrid.sorts || [] : [];\n newSorts.push({\n fieldName: changedColumn,\n order: newSortDirection === SortDirection.ASC ? 0 : 1,\n });\n }\n return newSorts;\n };\n\n const getNewSorts = (changedColumn, newSortDirection) => {\n let newSorts = [];\n if (newSortDirection === null) newSorts = removeColumnSort(changedColumn);\n else newSorts = updateColumnSort(changedColumn, newSortDirection);\n\n return newSorts;\n };\n\n // const columnSortDirection = getSortDirection(sortFound);\n const columnSortDirection = 'none';\n\n const handleColumnSortChange = (sortBy) => {\n const changedColumn = sortBy;\n const currentSortDirection = getCurrentSortDirection(changedColumn);\n const newSortDirection = getNewSortDirection(currentSortDirection);\n const newSorts = getNewSorts(changedColumn, newSortDirection);\n const newHasSort = getNewHasSort(newSorts);\n setDataGridState({ ...dataGrid, sorts: newSorts });\n setHasSort(newHasSort);\n if (onSort) onSort(newSorts);\n };\n\n return (\n <>\n \n handleColumnSortChange(dbColumnName) : null\n }\n >\n \n \n {label}\n \n \n {!hideColumnSortDirection &&\n columnSortDirection !== 'none' &&\n columnSortDirection !== null ? (\n \n handleColumnSortChange(dbColumnName)}\n >\n {columnSortDirection === SortDirection.ASC\n ? 'arrow_upward'\n : 'arrow_downward'}\n \n \n ) : null}\n
\n \n \n );\n}\n\nRVHeader.defaultProps = {\n disableSort: false,\n disableFilter: true,\n label: '',\n onSort: () => {},\n forSelectGrid: false, // If True, bgColor for Header will be one color only\n};\n\nRVHeader.propTypes = {\n defaultSort: PropTypes.array.isRequired,\n setDataGridState: PropTypes.func.isRequired,\n setHasSort: PropTypes.func,\n};\n\nexport default React.memo(RVHeader);\n","/* eslint-disable react/prop-types */\n/* eslint-disable react/forbid-prop-types */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { useTheme } from '@material-ui/core/styles';\n\nfunction RVHeaderCell(props) {\n const theme = useTheme();\n const { className, _key, style, children } = props;\n const borderColor = theme.palette.divider;\n // const defaultBgColor = settings.mainTheme.palette.background.paper;\n const defaultBgColor = '#F2F2F2';\n\n return (\n \n {children}\n \n );\n}\n\nRVHeaderCell.propTypes = {\n _key: PropTypes.string.isRequired,\n style: PropTypes.object.isRequired,\n};\n\nexport default React.memo(RVHeaderCell);\n","/* eslint-disable react/forbid-prop-types */\n/* eslint-disable react/default-props-match-prop-types */\n/* eslint-disable react/prop-types */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { useTheme } from '@material-ui/core/styles';\n\nfunction RVBodyCell(props) {\n const {\n columnIndex,\n contextMenu,\n _key,\n parent,\n rowIndex,\n style,\n children,\n active,\n customColor, // font color\n isSelected,\n isHovered,\n column,\n rowData,\n onClick,\n onRightClick,\n onDoubleClick,\n onMouseEnter,\n ...rest\n } = props;\n const theme = useTheme();\n const borderColor = theme.palette.divider;\n // const { divider } = theme.palette;\n const defaultBgColor = 'transparent';\n const bodyCell = React.useRef();\n\n function handleOnClick(e) {\n e.preventDefault();\n if (e.type === 'click') {\n if (onClick) onClick(e, column, rowData);\n }\n }\n\n function handleOnDoubleClick(e) {\n if (onDoubleClick) onDoubleClick(e, rowIndex, column, rowData);\n }\n\n const isEven = (_rowIndex) => {\n return _rowIndex % 2 === 0;\n };\n\n const getBgColor = () => {\n let bgColor = defaultBgColor;\n if (!isEven(rowIndex)) {\n bgColor = 'transparent';\n // bgColor = divider;\n }\n\n if (isHovered) bgColor = theme.palette.action.hover;\n\n if (isSelected) bgColor = theme.palette.action.selected;\n\n return bgColor;\n };\n\n const getColor = () => {\n if (customColor) return { color: customColor };\n\n return null;\n };\n\n return (\n <>\n \n \n {children}\n \n \n \n );\n}\n\nRVBodyCell.defaultProps = {\n active: true,\n rowData: null,\n column: null,\n};\n\nRVBodyCell.propTypes = {\n _key: PropTypes.string.isRequired,\n style: PropTypes.object.isRequired,\n active: PropTypes.bool,\n};\n\nexport default React.memo(RVBodyCell);\n","import React, { useContext } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { makeStyles, Typography } from '@material-ui/core';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport CustomizedButton from 'components/button/CustomizedButton';\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n backgroundColor: theme.palette.background.paper,\n padding: theme.spacing(3),\n flex: 1,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n bodyContainer: {\n marginTop: theme.spacing(2),\n display: 'flex',\n flex: 1,\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n button: {\n marginTop: theme.spacing(5),\n },\n}));\n\nconst NoData = () => {\n const classes = useStyles();\n const history = useHistory();\n const { translate } = useContext(LanguageContext);\n\n return (\n
\n \n {translate('pages.consentList.noData')}\n \n history.push('/consent-form')}\n >\n {translate('pages.consentList.addConsent')}\n \n
\n );\n};\n\nexport default NoData;\n","const commonColProps = { disableSort: true, resizable: true };\nexport default [\n {\n index: 0,\n name: 'viewPdf',\n label: 'View',\n width: '90',\n ...commonColProps,\n },\n {\n index: 1,\n name: 'submissionDate',\n label: 'Date Submitted',\n width: '170',\n ...commonColProps,\n },\n {\n index: 2,\n name: 'submittedBy',\n label: 'Submitted By',\n width: '200',\n ...commonColProps,\n },\n {\n index: 3,\n name: 'consentFor',\n label: 'Consent For',\n width: '200',\n ...commonColProps,\n },\n {\n index: 4,\n name: 'consentDecision',\n label: 'Consent Decision',\n width: '220',\n ...commonColProps,\n },\n {\n index: 5,\n name: 'schoolName',\n label: 'School Name',\n width: '150',\n ...commonColProps,\n },\n {\n index: 6,\n name: 'schoolGrade',\n label: 'Grade',\n width: '150',\n ...commonColProps,\n },\n];\n","/* eslint-disable import/no-named-as-default */\n/* eslint-disable react-hooks/exhaustive-deps */\n/* eslint-disable jsx-a11y/anchor-is-valid */\n/* eslint-disable no-undef */\n/* eslint-disable consistent-return */\n/* eslint-disable no-shadow */\n/* eslint-disable react/prop-types */\nimport React, {\n useState,\n useContext,\n useRef,\n useEffect,\n useCallback,\n} from 'react';\nimport { useHistory } from 'react-router-dom';\nimport { pick, find, includes, toInteger, toUpper } from 'lodash';\nimport PageLayout from 'components/page-layout/PageLayout';\nimport { makeStyles, Box, Typography, Link } from '@material-ui/core';\nimport withWidth from '@material-ui/core/withWidth';\nimport { useTheme } from '@material-ui/core/styles';\nimport CustomGrid from 'components/react-virtualized-grid/';\nimport RVHeader from 'components/react-virtualized-grid/components/RVHeader';\nimport RVHeaderCell from 'components/react-virtualized-grid/components/RVHeaderCell';\nimport RVBodyCell from 'components/react-virtualized-grid/components/RVBodyCell';\nimport CustomBackdrop from 'components/backdrop';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport AzureOperation from 'services/common';\nimport openPDF from 'utility/fileUtility';\nimport { LANG } from 'utility/languageUtility';\nimport CustomDialog from 'components/dialog/CustomDialog';\nimport MESSAGE_TYPE from 'components/dialog/constants';\nimport PageLoading from 'components/page-loading/PageLoading';\nimport getPageTitle from 'utility/pageTitle';\nimport NoData from './NoData';\nimport { mapData } from './helpers';\nimport columns from './columns';\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n backgroundColor: theme.palette.background.paper,\n padding: theme.spacing(3),\n flex: 1,\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n // maxHeight: '400px',\n },\n link: {\n textDecoration: 'underline',\n },\n visuallyHidden: {\n position: 'absolute',\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n width: '1px',\n margin: '-1px',\n padding: 0,\n border: 0,\n },\n}));\n\nconst ConsentList = (props) => {\n const { width } = props;\n const theme = useTheme();\n const classes = useStyles();\n const history = useHistory();\n const timer = useRef();\n const pageTitleRef = useRef();\n const containerRef = useRef();\n const WAIT_TIME = 2;\n const [time, setTime] = useState(0);\n const [modal, setModal] = useState({\n open: false,\n message: '',\n });\n const [dataLoadFailed, setDataLoadFailed] = useState(null);\n const [pdfReqFailed, setPdfReqFailed] = useState(null);\n const [pdf, setPdf] = useState(null);\n const { translate, lang } = useContext(LanguageContext);\n const [hoveredRow, setHoveredRow] = useState(null);\n const [data, setData] = useState([]);\n const [showLoader, setShowLoader] = useState(false);\n const [lastGridScrollTop, setLastGridScrollTop] = useState(0);\n const [lastGridScrollLeft, setLastGridScrollLeft] = useState(0);\n const [openBackdrop, setOpenBackdrop] = useState(false);\n const tempPKColumn = 'id';\n const [columnHeaderWidths, setColumnHeaderWidths] = useState(columns);\n const [mouseDown, setMouseDown] = useState(false);\n const [scrollTo, setScrollTo] = useState({ column: null, row: null });\n\n useEffect(() => {\n document.title = getPageTitle(translate('layout.nav.consentList'), lang);\n }, [translate, lang]);\n\n const handleCloseModal = () => {\n setModal({ open: false });\n };\n\n const appBarHeight = 80;\n const footerHeight = 40;\n const mainPageLayoutTopPadding = !includes(['xs', 'sm'], width) ? 16 : 0;\n const mainPageLayoutBottomPadding = !includes(['xs', 'sm'], width) ? 16 : 0;\n const consentListMainBoxTopPadding = 24;\n const consentListMainBoxBottomPadding = 24;\n const pageTitleBottomPadding = 16;\n const gridHeaderHeight = 40;\n let gridBodyHeight = 0;\n\n const pageTitleHeight =\n (pageTitleRef &&\n pageTitleRef.current &&\n pageTitleRef.current.clientHeight) ||\n 0;\n\n if (pageTitleHeight) {\n gridBodyHeight =\n window.innerHeight -\n pageTitleHeight -\n gridHeaderHeight -\n mainPageLayoutTopPadding -\n consentListMainBoxTopPadding -\n pageTitleBottomPadding -\n consentListMainBoxBottomPadding -\n mainPageLayoutBottomPadding;\n\n if (includes(['xs', 'sm', 'md'], width)) {\n gridBodyHeight = gridBodyHeight - appBarHeight - footerHeight;\n }\n }\n\n const errorModal = {\n open: true,\n messageType: MESSAGE_TYPE.error,\n okText: translate('pages.request.ok'),\n onOkay: () => handleCloseModal(),\n message: translate('pages.request.PDF.error'),\n };\n\n const startTimer = () => {\n timer.current = setInterval(() => {\n setTime((_time) => _time + 1);\n }, 1000);\n };\n\n const loadData = useCallback(() => {\n const { protectedResources, callApiWithAzureToken } = AzureOperation;\n const { baseUrl, method } =\n protectedResources.consentList.endpoints.getList;\n const params = {\n url: baseUrl,\n method,\n };\n\n setShowLoader(true);\n startTimer();\n callApiWithAzureToken(params)\n .then((result) => {\n if (result && (result.statusCode === 0 || result.statusCode === 200)) {\n setData(mapData(result.econsentSummary));\n setDataLoadFailed(false);\n } else {\n setDataLoadFailed(true);\n }\n })\n .catch(() => {\n setDataLoadFailed(true);\n })\n .finally(() => {});\n }, [errorModal, translate]);\n\n useEffect(() => {\n loadData();\n }, []);\n\n useEffect(() => {\n return () => {\n clearInterval(timer.current);\n timer.current = 0;\n setTime(0);\n };\n }, []);\n\n useEffect(() => {\n if (pdf !== null || pdfReqFailed === true) {\n if (time >= WAIT_TIME) {\n // Close the backdrop if the submission was successful\n // Backdrop must show atleast 3 seconds before it closes.\n clearInterval(timer.current);\n setTime(0);\n setOpenBackdrop(false);\n setPdfReqFailed(null);\n if (pdf !== null) {\n openPDF(pdf);\n setPdf(null);\n } else {\n setModal(errorModal);\n }\n }\n }\n }, [errorModal, time, pdf, pdfReqFailed]);\n\n useEffect(() => {\n if (dataLoadFailed !== null) {\n if (time >= WAIT_TIME) {\n // Close the backdrop if the submission was successful\n // Backdrop must show atleast 3 seconds before it closes.\n clearInterval(timer.current);\n setTime(0);\n setShowLoader(false);\n setDataLoadFailed(null);\n if (dataLoadFailed) {\n setModal({\n ...errorModal,\n onOkay: () => history.push('/'),\n onClose: () => history.push('/'),\n message: translate('pages.consentList.apiGetError'),\n });\n }\n }\n }\n }, [errorModal, time, dataLoadFailed]);\n\n const renderHeaderCellContent = (column) => {\n if (column.columnIndex === undefined) return null;\n return (\n \n );\n };\n\n const onViewPDF = (rowData) => {\n setOpenBackdrop(true);\n const { protectedResources, callApiWithAzureToken } = AzureOperation;\n const { baseUrl, method } = protectedResources.PDF.endpoints.covid19;\n const params = {\n url: `${baseUrl}/${lang}/${rowData.econsentId}`,\n method,\n };\n\n startTimer();\n callApiWithAzureToken(params)\n .then((result) => {\n if (result.pdf !== null) setPdf(result.pdf);\n else setPdfReqFailed(true);\n })\n .catch(() => {\n // eslint-disable-next-line no-console\n setPdfReqFailed(true);\n });\n };\n\n const renderBodyCellContent = (column, rowData) => {\n switch (column.name) {\n case 'schoolName': {\n let schoolNameField = 'schoolNameEn';\n if (lang === LANG.FR) {\n schoolNameField = 'schoolNameFr';\n }\n\n return (\n <>\n {rowData[schoolNameField]}\n \n {`${column.label}: ${rowData[schoolNameField]}\n }`}\n \n \n );\n }\n case 'viewPdf': {\n return (\n onViewPDF(rowData)}\n >\n PDF\n \n {`Generate PDF button for client: ${rowData.consentFor}`}\n \n \n );\n }\n case 'schoolGrade': {\n let schoolGradeData = rowData.schoolGrade;\n if (toUpper(rowData.schoolGrade) === 'K')\n schoolGradeData = 'Kindergarten';\n\n return (\n <>\n {schoolGradeData}\n \n {`${column.label}: ${schoolGradeData}\n }`}\n \n \n );\n }\n default: {\n return (\n <>\n {rowData[column.name]}\n \n {`${column.label}: ${rowData[column.name]}\n }`}\n \n \n );\n }\n }\n };\n\n const headerRenderer = ({ columnIndex, key, style }) => {\n const column = columns[columnIndex] ? columns[columnIndex] : null;\n const columnName = columns[columnIndex] ? columns[columnIndex].name : null;\n return (\n \n {renderHeaderCellContent({\n ...column,\n columnName,\n columnIndex,\n })}\n \n );\n };\n const handleFocus = (rowIndex, columnIndex) => {\n if (\n toInteger(columnIndex) === 0 ||\n (toInteger(columnIndex) !== 0 &&\n scrollTo &&\n scrollTo.column === columns.length)\n ) {\n setScrollTo({\n ...scrollTo,\n column: 0,\n row:\n rowIndex === null || rowIndex === ''\n ? toInteger(scrollTo.row) + 1\n : rowIndex,\n });\n } else {\n const newScrollToColumn =\n toInteger(columnIndex) + 1 === columns.length\n ? toInteger(columnIndex)\n : toInteger(columnIndex) + 1;\n\n setScrollTo({\n column:\n toInteger(columnIndex) === columns.length ? null : newScrollToColumn,\n row: rowIndex,\n });\n }\n };\n\n const onKeyUp = (e) => {\n const { id } = e.target;\n const currentRowIndex = toInteger(id.split('-')[0]);\n const currentColumnIndex = toInteger(id.split('-')[1]);\n switch (toUpper(e.key)) {\n case 'ARROWLEFT': {\n if (currentColumnIndex > 0) {\n setTimeout(() => {\n document\n .getElementById(`${currentRowIndex}-${currentColumnIndex - 1}`)\n .focus();\n }, 100);\n }\n break;\n }\n case 'ARROWRIGHT': {\n if (currentColumnIndex < columns.length - 1) {\n document\n .getElementById(`${currentRowIndex}-${currentColumnIndex + 1}`)\n .focus();\n }\n break;\n }\n case 'ARROWUP': {\n if (currentRowIndex > 0) {\n document\n .getElementById(`${currentRowIndex - 1}-${currentColumnIndex}`)\n .focus();\n }\n break;\n }\n case 'ARROWDOWN': {\n if (currentRowIndex + 1 < data.length) {\n document\n .getElementById(`${currentRowIndex + 1}-${currentColumnIndex}`)\n .focus();\n }\n break;\n }\n default: {\n break;\n }\n }\n };\n\n const cellRenderer = ({ columnIndex, key, rowIndex, style }) => {\n const rowData = data[rowIndex];\n const findColumn = find(columns, (o) => {\n return o.index === columnIndex;\n });\n\n if (findColumn !== undefined) {\n const column = findColumn;\n\n if (rowData === undefined) return null;\n\n if (column.hideOnReadOnly) return null;\n\n let isHoveredRow = false;\n if (hoveredRow && hoveredRow[tempPKColumn] === rowData[tempPKColumn])\n isHoveredRow = true;\n\n const selectedRowProps = {\n isSelected: rowData.isClicked,\n isHovered: isHoveredRow,\n column,\n rowData,\n onMouseEnter: (e, _column, _rowData) => {\n setHoveredRow(_rowData);\n },\n };\n\n return (\n {\n if (mouseDown) event.target.blur();\n else\n handleFocus(\n event.target.id.split('-')[0],\n event.target.id.split('-')[1],\n );\n }}\n // Outline focus is for keyboard-only users\n onMouseUp={() => setMouseDown(false)}\n onMouseDown={() => setMouseDown(true)}\n onKeyUp={onKeyUp}\n {...selectedRowProps}\n >\n {renderBodyCellContent(column, rowData, rowIndex, rowData.isClicked)}\n \n );\n }\n };\n\n const getRowHeight = () => {\n return 60;\n };\n\n const onScroll = ({ scrollLeft, scrollTop }) => {\n setLastGridScrollTop(scrollTop);\n setLastGridScrollLeft(scrollLeft);\n };\n\n return (\n \n \n \n \n \n {translate('layout.nav.consentList')}\n \n {showLoader && }\n {!showLoader && data && data.length > 0 && (\n \n )}\n\n {data && data.length === 0 && !showLoader && }\n \n \n );\n};\n\nexport default withWidth()(ConsentList);\n","/* eslint-disable import/prefer-default-export */\n/* eslint-disable array-callback-return */\nconst mapData = (data) => {\n const mappedData = [];\n if (!data) return [];\n\n data.map((item, i) => {\n mappedData.push({\n id: i,\n econsentId: item.econsentId,\n submissionDate: item.submissionDate,\n submittedBy: item.submittedBy,\n consentFor: `${item.client.firstName} ${item.client.lastName}`,\n consentDecision: item.consentDecision,\n schoolNameEn: item.client.schoolName_EN,\n schoolNameFr: item.client.schoolName_FR,\n schoolGrade: item.client.schoolGrade,\n viewPdf: true,\n });\n });\n return mappedData;\n};\n\nexport { mapData };\n","/* eslint-disable react/no-array-index-key */\n/* eslint-disable consistent-return */\n/* eslint-disable array-callback-return */\n/* eslint-disable no-unused-vars */\nimport React, { useContext, useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Box } from '@material-ui/core';\nimport { useLocation } from 'react-router-dom';\nimport Typography from '@material-ui/core/Typography';\nimport links from 'constants/links';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport { getLanguage, LANG } from '../../../utility/languageUtility';\nimport './PrivateSection.css';\n\nconst linkObject = {\n healthndSeniorsCareWebsite: links.healthndSeniorsCareWebsite,\n contactEmail: links.contactEmail,\n shareHealthLink: links.shareHealthLink,\n immunizationManitobaLink: links.immunizationManitobaLink,\n healthndSeniorsCareWebsiteFr: links.healthndSeniorsCareWebsiteFr,\n shareHealthLinkFr: links.shareHealthLinkFr,\n immunizationManitobaLinkFr: links.immunizationManitobaLinkFr,\n recordLinkEn: links.recordLinkEn,\n recordLinkFr: links.recordLinkFr,\n forResidentsEn: links.forResidentsEn,\n forResidentsFr: links.forResidentsFr,\n recordLinkUnderline: links.recordLinkUnderline,\n publicHealthOfficeWebsite: links.publicHealthOfficeWebsite,\n publicHealthOfficeWebsiteFr: links.publicHealthOfficeWebsiteFr,\n};\n\nconst getStyles = makeStyles((theme) => ({\n root: {\n width: '100%',\n },\n spaceTopBottom: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n title: {\n marginBottom: theme.spacing(3),\n fontWeight: 'bold',\n },\n content: {\n fontSize: '16px',\n lineHeight: '1.5em',\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word',\n marginBottom: '20px',\n },\n centered: {\n textAlign: 'center',\n },\n container: {\n backgroundColor: theme.palette.background.paper,\n padding: theme.spacing(3),\n },\n listNoSpace: {\n marginTop: '-16px',\n },\n email: {\n textTransform: 'lowercase',\n },\n link: {\n textDecoration: 'underline',\n },\n mbLogo: {\n display: 'flex',\n borderBottom: '25px solid',\n borderBottomColor: theme.palette.primary.dark,\n },\n}));\n\nconst PrivateSection = ({ privacyPolicy }) => {\n const classes = getStyles();\n const privacyPolicySections = privacyPolicy.sections;\n const [lang, setLang] = useState(LANG.EN);\n const { translate, changeLanguage } = useContext(LanguageContext);\n const { search } = useLocation();\n\n useEffect(() => {\n const lng = getLanguage(search);\n changeLanguage(lng);\n setLang(lng);\n }, [changeLanguage, search]);\n\n const renderSection = (sections, mainSectionIndex) => {\n const jsx = (\n <>\n {sections.map((sectionItem, index) => {\n return Object.keys(sectionItem).map((sectionName) => {\n if (sectionName === 'contents') {\n const translatedContents = sectionItem[sectionName][lang];\n return translatedContents.map(\n (translatedContent, translatedContentIndex) => {\n if (typeof translatedContent === 'string') {\n return (\n \n {translate('content', linkObject, {\n content: { [lang]: translatedContent },\n })}\n \n );\n }\n\n if (typeof translatedContent === 'object') {\n if (translatedContent.list) {\n return (\n \n {translatedContent.list.map((li, liIndex) => {\n return (\n \n \n {translate('li', linkObject, {\n li: { [lang]: li },\n })}\n \n \n );\n })}\n \n );\n }\n }\n },\n );\n }\n\n if (sectionName === 'title') {\n return (\n \n {translate('title', null, sectionItem[sectionName])}\n \n );\n }\n\n return null;\n });\n })}\n \n );\n\n return jsx;\n };\n\n const renderPrivacyPolicy = (mainSection, mainSectionIndex) => {\n const jsx = Object.keys(mainSection).map((mainSectionObjName) => {\n if (mainSectionObjName === 'title') {\n return (\n \n {translate(\n mainSectionObjName,\n null,\n mainSection[mainSectionObjName],\n )}\n \n );\n }\n\n if (mainSectionObjName === 'section') {\n return renderSection(mainSection[mainSectionObjName], mainSectionIndex);\n }\n });\n\n return jsx;\n };\n\n return (\n
\n \n {privacyPolicySections.map((mainSection, index) =>\n renderPrivacyPolicy(mainSection, index),\n )}\n \n
\n );\n};\n\nPrivateSection.propTypes = {\n // eslint-disable-next-line react/forbid-prop-types\n privacyPolicy: PropTypes.object,\n};\n\nPrivateSection.defaultProps = {\n privacyPolicy: {},\n};\n\nexport default PrivateSection;\n","import React, { useEffect, useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport PageLayout from 'components/page-layout/PageLayout';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport { includes } from 'lodash';\nimport withWidth from '@material-ui/core/withWidth';\nimport getPageTitle from 'utility/pageTitle';\nimport PrivateSection from './components/PrivateSection';\n\nconst PrivacyNoticAndConsentPage = ({ width }) => {\n const { getTranslationObj, translate, lang } = useContext(LanguageContext);\n const privacyPolicy = getTranslationObj('pages.privacyAndNotice');\n const maxWidth = includes(['xs', 'sm', 'md'], width) ? '100%' : '60%';\n\n useEffect(() => {\n document.title = getPageTitle(translate('layout.nav.privacyNotice'), lang);\n }, [translate, lang]);\n\n return (\n \n \n \n );\n};\n\nPrivacyNoticAndConsentPage.defaultProps = {\n width: null,\n};\n\nPrivacyNoticAndConsentPage.propTypes = {\n width: PropTypes.string,\n};\n\nexport default withWidth()(PrivacyNoticAndConsentPage);\n","import React, { useContext, useEffect } from 'react';\nimport { useHistory } from 'react-router-dom';\nimport PageLayout from 'components/page-layout/PageLayout';\nimport { makeStyles, Box, Typography } from '@material-ui/core';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport CustomizedButton from 'components/button/CustomizedButton';\nimport getPageTitle from 'utility/pageTitle';\n\nconst useStyles = makeStyles((theme) => ({\n container: {\n backgroundColor: theme.palette.background.paper,\n padding: theme.spacing(3),\n flex: 1,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n bodyContainer: {\n marginTop: theme.spacing(2),\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n },\n button: {\n marginTop: theme.spacing(5),\n },\n title: {\n textAlign: 'center',\n },\n}));\n\nconst Homepage = () => {\n const classes = useStyles();\n const history = useHistory();\n const { translate, lang } = useContext(LanguageContext);\n\n useEffect(() => {\n document.title = getPageTitle(\n `${translate('layout.projectTitle')} ${translate('layout.nav.homepage')}`,\n lang,\n );\n }, [translate, lang]);\n\n return (\n \n \n \n {translate('pages.homepage.title')}\n \n
\n \n {translate('pages.homepage.body')}\n \n history.push('/consent-form')}\n >\n {translate('pages.homepage.button')}\n \n
\n
\n
\n );\n};\n\nexport default Homepage;\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useState, useContext, useEffect, useRef } from 'react';\nimport { makeStyles, Typography, CircularProgress } from '@material-ui/core';\nimport { useTheme } from '@material-ui/core/styles';\nimport { LanguageContext } from 'services/localization/LanguageContext';\nimport getPageTitle from 'utility/pageTitle';\nimport AzureOperation from 'services/common';\nimport { LANG } from 'utility/languageUtility';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n height: '100%',\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: theme.palette.common.white,\n },\n}));\n\nconst Survey = () => {\n const classes = useStyles();\n const { translate, lang } = useContext(LanguageContext);\n const theme = useTheme();\n const WAIT_TIME = 2;\n const timer = useRef();\n const [showLoading, setShowLoading] = useState(true);\n const [time, setTime] = useState(0);\n const surveyEnLink = 'https://mbgov.surveymonkey.com/r/VKXG9BF';\n const surveyFrLink = 'https://mbgov.surveymonkey.com/r/8BS2DNY';\n const { protectedResources, callApiWithAzureToken } = AzureOperation;\n const { baseUrl, method } = protectedResources.survey.endpoints.covid19;\n const params = {\n url: baseUrl,\n method,\n };\n\n const startTimer = () => {\n timer.current = setInterval(() => {\n setTime((_time) => _time + 1);\n }, 1000);\n };\n\n useEffect(() => {\n startTimer();\n callApiWithAzureToken(params);\n return () => {\n clearInterval(timer.current);\n timer.current = 0;\n setTime(0);\n };\n }, []);\n\n useEffect(() => {\n document.title = getPageTitle(translate('layout.nav.survey'), lang);\n }, [translate, lang]);\n\n useEffect(() => {\n if (time > WAIT_TIME) {\n setShowLoading(false);\n }\n }, [time]);\n\n if (showLoading) {\n return (\n
\n
\n \n
\n \n {translate('pages.survey.loading')}\n \n
\n );\n }\n\n window.location.href = lang === LANG.EN ? surveyEnLink : surveyFrLink;\n\n return null;\n};\n\nexport default Survey;\n","import LogoutPage from './pages/logout/LogoutPage';\nimport FAQProxyPage from './pages/public-faq/FAQProxyPage';\nimport ConsentForm from './pages/consent-form';\nimport ConsentList from './pages/consent-list';\nimport PrivacyNoticeAndConsent from './pages/privacy-notice-and-consent';\nimport Homepage from './pages/homepage';\nimport Survey from './pages/survey';\nimport { getCommon } from './commons/index';\n\nconst { pagesUrl } = getCommon();\nexport const RouterRole = {\n PUBLIC: 'public',\n PROTECTED: 'protected',\n};\nconst routerConfig = [\n {\n path: pagesUrl.get('covidFaq').url,\n component: FAQProxyPage,\n exact: true,\n role: RouterRole.PROTECTED,\n },\n {\n path: pagesUrl.get('covidFaqPublic').url,\n component: FAQProxyPage,\n exact: true,\n role: RouterRole.PUBLIC,\n },\n {\n path: pagesUrl.get('PrivacyNotice').url,\n component: PrivacyNoticeAndConsent,\n exact: true,\n role: RouterRole.PUBLIC,\n },\n {\n path: pagesUrl.get('covidConsentForm').url,\n component: ConsentForm,\n exact: true,\n role: RouterRole.PROTECTED,\n },\n {\n path: pagesUrl.get('covidConsentList').url,\n component: ConsentList,\n exact: true,\n role: RouterRole.PROTECTED,\n },\n {\n path: pagesUrl.get('survey').url,\n component: Survey,\n exact: true,\n role: RouterRole.PROTECTED,\n },\n {\n path: pagesUrl.get('logout').url,\n component: LogoutPage,\n exact: true,\n role: RouterRole.PROTECTED,\n },\n {\n path: '/',\n component: Homepage,\n exact: true,\n role: RouterRole.PROTECTED,\n },\n];\nexport function getRouteInformationByRole(name) {\n const rout = routerConfig.filter((rt) => {\n return rt.role === name;\n });\n return rout;\n}\n\nexport default routerConfig;\n","/*\n * @Description:\n * @Author: Shaomin Fei\n * @Date: 2021-03-30 10:18:55\n */\n\n// the createMuiTheme will cause some warnings,\n// according to official doc, use unstable_createMuiStrictModeTheme instead\n// or remove strickmode\nimport { unstable_createMuiStrictModeTheme as createMuiTheme } from '@material-ui/core/styles';\n\nconst theme = createMuiTheme();\n\nconst LuminaTheme = createMuiTheme({\n Banner: {\n fontWeight: 'bold',\n },\n Header: {\n height: '80px',\n background: '#1a4e89',\n },\n Footer: {\n height: '40px',\n backgroundColor: '#1B2355',\n },\n palette: {\n background: {\n blue: 'blue',\n default: '#EAF0F0',\n paper: '#FFF',\n },\n borders: 'rgba(0, 0, 0, 0.1)',\n primary: {\n main: '#013E77',\n dark: '#1B2355',\n },\n confirmation: {\n main: '#e8e46c',\n },\n },\n Loading: {\n width: '300px',\n height: '100px',\n },\n typography: {\n fontFamily: [\n 'Nunito Sans',\n 'Arial',\n '-apple-system',\n 'BlinkMacSystemFont',\n 'Roboto',\n 'sans-serif',\n ].join(','),\n subtitle1: {\n fontSize: '0.74em',\n },\n },\n drawer: {\n width: '25%',\n },\n navBarBreakpoint: {\n // when width<960px, hide the nav bar\n // the follow two params have the same meaning,\n // just adapte to different usage.\n hideDrawer: { mdDown: true },\n hideDrawerButton: { lgUp: true },\n hideDrawerName: 'sm',\n },\n overrides: {\n MuiButton: {\n root: {\n textTransform: 'none',\n },\n },\n MuiStepIcon: {\n root: {\n '&$completed': {\n color: '#4EB028',\n },\n },\n },\n MuiDialog: {\n paper: {\n borderRadius: '20px',\n padding: theme.spacing(2),\n },\n },\n MuiDialogContent: {\n root: {\n padding: theme.spacing(2),\n },\n },\n MuiDialogActions: {\n root: {\n margin: 0,\n padding: theme.spacing(1),\n },\n },\n MuiDialogTitle: {\n root: {\n padding: '0px',\n display: 'flex',\n height: '36px',\n alignItems: 'center',\n },\n },\n MuiFormHelperText: {\n root: {\n fontSize: '0.875rem',\n },\n },\n MuiTooltip: {\n tooltip: {\n fontSize: '1rem',\n },\n },\n },\n});\n\nexport default LuminaTheme;\n","import React from 'react';\nimport { ThemeProvider } from '@material-ui/core/styles';\nimport { HashRouter, Switch, Route } from 'react-router-dom';\nimport { MsalProvider } from './services/login/MsalProvider';\n\nimport { LoginContextProvider } from './services/login/LoginContext';\nimport { LanguageContextProvider } from './services/localization/LanguageContext';\n\nimport RouterManage from './components/router-manage/RouterManage';\nimport routerConfig, {\n getRouteInformationByRole,\n RouterRole,\n} from './RouterConfig';\nimport LuminaTheme from './styles/theme/theme';\n\nfunction App() {\n const routPublic = getRouteInformationByRole(RouterRole.PUBLIC);\n return (\n <>\n \n \n \n \n \n {routPublic.map((rt) => {\n return (\n \n );\n })}\n\n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nexport default App;\n","// @flow\n/*\n * @Description:\n * @Author: Shaomin Fei\n * @Date: 2021-03-25 22:43:55\n */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root'),\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\n"],"sourceRoot":""}