This repository has been archived by the owner on Dec 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 32.9 KB
/
.eslintcache
1
[{"/Users/kennethpolyak/code/calosba-service-centers/src/index.tsx":"1","/Users/kennethpolyak/code/calosba-service-centers/src/serviceWorker.ts":"2","/Users/kennethpolyak/code/calosba-service-centers/src/App.tsx":"3","/Users/kennethpolyak/code/calosba-service-centers/src/components/FormApp.tsx":"4","/Users/kennethpolyak/code/calosba-service-centers/src/components/Results.tsx":"5","/Users/kennethpolyak/code/calosba-service-centers/src/components/Landing.tsx":"6","/Users/kennethpolyak/code/calosba-service-centers/src/contexts/language.tsx":"7","/Users/kennethpolyak/code/calosba-service-centers/src/contexts/form.tsx":"8","/Users/kennethpolyak/code/calosba-service-centers/src/hooks/useLocalStorage.ts":"9","/Users/kennethpolyak/code/calosba-service-centers/src/components/Form.tsx":"10","/Users/kennethpolyak/code/calosba-service-centers/src/components/ResultsButton.tsx":"11","/Users/kennethpolyak/code/calosba-service-centers/src/components/Header.tsx":"12","/Users/kennethpolyak/code/calosba-service-centers/src/components/Footer.tsx":"13","/Users/kennethpolyak/code/calosba-service-centers/src/components/ResultsList.tsx":"14","/Users/kennethpolyak/code/calosba-service-centers/src/components/Tabsbar.tsx":"15","/Users/kennethpolyak/code/calosba-service-centers/src/components/Sidebar.tsx":"16","/Users/kennethpolyak/code/calosba-service-centers/src/forms/index.ts":"17","/Users/kennethpolyak/code/calosba-service-centers/src/components/uswds-components/index.tsx":"18","/Users/kennethpolyak/code/calosba-service-centers/src/components/Question.tsx":"19","/Users/kennethpolyak/code/calosba-service-centers/src/forms/types.ts":"20","/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/DatePicker.tsx":"21","/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/TextInput.tsx":"22","/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/Select.tsx":"23","/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/SingleSelect.tsx":"24","/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/Boolean.tsx":"25","/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/Multiselect.tsx":"26","/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/TextArea.tsx":"27","/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/PhoneNumber.tsx":"28","/Users/kennethpolyak/code/calosba-service-centers/src/components/uswds-components/Button.tsx":"29"},{"size":716,"mtime":1610221411431,"results":"30","hashOfConfig":"31"},{"size":5295,"mtime":1595297647044,"results":"32","hashOfConfig":"31"},{"size":2599,"mtime":1612794902675,"results":"33","hashOfConfig":"31"},{"size":2754,"mtime":1612795345655,"results":"34","hashOfConfig":"31"},{"size":8574,"mtime":1612795840941,"results":"35","hashOfConfig":"31"},{"size":3262,"mtime":1612743857443,"results":"36","hashOfConfig":"31"},{"size":2894,"mtime":1611595285966,"results":"37","hashOfConfig":"31"},{"size":2077,"mtime":1609732535565,"results":"38","hashOfConfig":"31"},{"size":667,"mtime":1606117302156,"results":"39","hashOfConfig":"31"},{"size":305,"mtime":1611508618449,"results":"40","hashOfConfig":"31"},{"size":3976,"mtime":1612754269718,"results":"41","hashOfConfig":"31"},{"size":1867,"mtime":1611595285958,"results":"42","hashOfConfig":"31"},{"size":2036,"mtime":1611795176022,"results":"43","hashOfConfig":"31"},{"size":2006,"mtime":1611794562149,"results":"44","hashOfConfig":"31"},{"size":1059,"mtime":1611595285962,"results":"45","hashOfConfig":"31"},{"size":522,"mtime":1611595285962,"results":"46","hashOfConfig":"31"},{"size":3323,"mtime":1611595285973,"results":"47","hashOfConfig":"31"},{"size":45,"mtime":1595297647041,"results":"48","hashOfConfig":"31"},{"size":1398,"mtime":1612039309602,"results":"49","hashOfConfig":"31"},{"size":2711,"mtime":1611595285974,"results":"50","hashOfConfig":"31"},{"size":547,"mtime":1595297647038,"results":"51","hashOfConfig":"31"},{"size":399,"mtime":1595297647039,"results":"52","hashOfConfig":"31"},{"size":917,"mtime":1612129505634,"results":"53","hashOfConfig":"31"},{"size":671,"mtime":1595297647038,"results":"54","hashOfConfig":"31"},{"size":718,"mtime":1600740088117,"results":"55","hashOfConfig":"31"},{"size":1595,"mtime":1612128706891,"results":"56","hashOfConfig":"31"},{"size":486,"mtime":1595297647038,"results":"57","hashOfConfig":"31"},{"size":1999,"mtime":1610227662222,"results":"58","hashOfConfig":"31"},{"size":516,"mtime":1595297647041,"results":"59","hashOfConfig":"31"},{"filePath":"60","messages":"61","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},"o3yleq",{"filePath":"63","messages":"64","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"65","messages":"66","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"67","messages":"68","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"69","messages":"70","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"71","messages":"72","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"73","usedDeprecatedRules":"62"},{"filePath":"74","messages":"75","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"76","messages":"77","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"78","usedDeprecatedRules":"62"},{"filePath":"79","messages":"80","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"83","messages":"84","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"85","messages":"86","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"87","usedDeprecatedRules":"62"},{"filePath":"88","messages":"89","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"90","usedDeprecatedRules":"62"},{"filePath":"91","messages":"92","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"93","usedDeprecatedRules":"62"},{"filePath":"94","messages":"95","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"96","usedDeprecatedRules":"62"},{"filePath":"97","messages":"98","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"99","usedDeprecatedRules":"62"},{"filePath":"100","messages":"101","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"102","messages":"103","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"104","messages":"105","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"106","usedDeprecatedRules":"62"},{"filePath":"107","messages":"108","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"109","messages":"110","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"111","messages":"112","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"113","messages":"114","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"115","messages":"116","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"117","messages":"118","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"119","messages":"120","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"121","usedDeprecatedRules":"62"},{"filePath":"122","messages":"123","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"124","messages":"125","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},{"filePath":"126","messages":"127","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"62"},"/Users/kennethpolyak/code/calosba-service-centers/src/index.tsx",[],["128","129"],"/Users/kennethpolyak/code/calosba-service-centers/src/serviceWorker.ts",[],"/Users/kennethpolyak/code/calosba-service-centers/src/App.tsx",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/FormApp.tsx",["130","131"],"/Users/kennethpolyak/code/calosba-service-centers/src/components/Results.tsx",["132","133","134","135"],"/Users/kennethpolyak/code/calosba-service-centers/src/components/Landing.tsx",["136"],"import React, {useState, useEffect} from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { Helmet } from \"react-helmet\";\n\nimport Header from \"./Header\";\nimport Footer from \"./Footer\";\n\nimport \"./footer.scss\";\nimport \"./index.scss\";\n\nconst Landing: React.FC = () => {\n const [windowWidth, setWindowWidth] = useState(1000);\n\n const updateDimensions = () => {\n let windowWidth = typeof window !== \"undefined\" ? window.innerWidth : 0;\n setWindowWidth(windowWidth);\n }\n\n useEffect(() => {\n updateDimensions();\n window.addEventListener(\"resize\", updateDimensions);\n }, [])\n\n const styles = {\n showSidebar: windowWidth > 768,\n sidebarWidth: windowWidth < 1100 ? 50 : 150,\n sidebarCollapsed: windowWidth < 1100\n };\n\n return (\n <div className=\"content-page\">\n <Helmet>\n <meta property=\"og:title\" content=\"COVID-19 SMB Loan Information\" />\n <meta\n property=\"og:description\"\n content=\"Learn about support programs available to help stabilize your business.\"\n />\n <title>CalOSBA Technical Assistance</title>\n <meta\n name=\"Description\"\n content=\"Learn about support programs available to help stabilize your business.\"\n />\n </Helmet>\n <Header showLanguageSelect/>\n <div className=\"container humans-image\">\n <img\n src=\"/smb_humans.svg\"\n alt=\"Person getting money\"\n ></img>\n </div>\n <main>\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-lg-7\">\n <div>\n <h1>Find technical assistance for your small business</h1>\n <p className=\"content-container\">\n California supports a network of small business technical assistance centers that provide services, including but not limited to, free one-on-one consulting and no-cost or low-cost trainings to: \n <p className=\"landing-list\">\n <li className=\"landing-list-item\">Help businesses get funded</li>\n <li className=\"landing-list-item\">Enter new markets</li>\n <li className=\"landing-list-item\">Strengthen operations</li>\n <li className=\"landing-list-item\">Build resiliency and more.</li>\n </p>\n With over 30 languages available, use this tool to find your local center today and tailored services.\n </p>\n \n <div className=\"content-container\">\n <Link \n to=\"/questions\"\n role=\"button\"\n className=\"usa-button usa-button--big\"\n >\n Get Started\n </Link>\n </div>\n </div>\n </div>\n <div className=\"col-lg-5 d-none d-md-block\">\n <img\n src=\"/smb_humans.svg\"\n alt=\"Graphic of a handdrawn women of color receiving money. We hope to better support small minority-owned businesses with this tool.\"\n ></img>\n </div>\n </div>\n </div>\n </main>\n <Footer />\n </div>\n );\n};\n\nexport default Landing;\n","/Users/kennethpolyak/code/calosba-service-centers/src/contexts/language.tsx",[],"/Users/kennethpolyak/code/calosba-service-centers/src/contexts/form.tsx",["137","138"],"import React, { createContext, useContext, useState } from 'react'\nimport { initializeForm } from \"../forms\";\nimport { Form } from '~/forms/types'\nimport { useTranslation } from '~/contexts/language'\n\ninterface FormState {\n setValue: (id: string, value: Value) => void\n setError: (id: string, value: string) => void\n values: Values\n errors: Errors\n form: Form\n}\n\nexport interface Values {\n [key: string]: Value\n}\n\nexport interface Errors {\n [key: string]: string\n}\n\nexport type Value = string | string[] | Date\n\nexport const FormContext = createContext<FormState | undefined>(undefined)\n\n// Just hardcoding this here for now, if we want to support multiple forms in the future just need to hoist it outside\n// and pass it into the provider as a prop\nconst form = initializeForm();\n\nexport const FormProvider:React.FC<{children: React.ReactNode}> = ({ children }) => { \n const [currentIndex, setCurrentIndex] = useState<number>(0);\n const [formValues, setFormValues] = useState<Values>({});\n const [formErrors, setFormErrors] = useState<Errors>({});\n\n const setFormValue = (key: string, value: Value) => setFormValues({ ...formValues, [key]: value });\n const setFormError = (key: string, value: string) =>setFormErrors({ ...formErrors, [key]: value });\n\n return (\n <FormContext.Provider\n value={{\n setError: setFormError,\n setValue: setFormValue,\n values: formValues,\n errors: formErrors,\n form: useTranslation(form)\n }}\n >\n {children}\n </FormContext.Provider>\n )\n}\n\nexport function useForm() {\n const formCtx = useContext(FormContext)\n if(formCtx === undefined) {\n throw Error('No surrounding FormProvider found')\n }\n return formCtx\n}\n\nexport function useFormDictionary(...keys: string[]): string[] {\n const foo = useForm()\n const { form: {instructions: dictionary} } = foo\n return keys.map(key => dictionary[key])\n}\n\nexport function useFormField(id: string): [Value, (val: Value) => void] {\n const { values, setValue } = useForm()\n return [values[id], (val: Value) => setValue(id, val)];\n}","/Users/kennethpolyak/code/calosba-service-centers/src/hooks/useLocalStorage.ts",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/Form.tsx",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/ResultsButton.tsx",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/Header.tsx",["139","140"],"// @ts-ignore\n\nimport React from \"react\";\nimport styled from \"styled-components\";\nimport { Link } from \"react-router-dom\";\nimport { Menu} from \"grommet\";\nimport { useSelectLanguage } from \"~/contexts/language\";\n\nimport \"./header.scss\";\n\nconst StyledMenu = styled(Menu)`\n text-decoration: underline;\n color: black;\n`;\n\ninterface Props {\n links?: Array<JSX.Element>;\n showLanguageSelect?: Boolean;\n}\n\nconst Header: React.FC<Props> = ({ links = [], showLanguageSelect }) => {\n const [language, setLanguage, languageOpts] = useSelectLanguage();\n showLanguageSelect = false;\n return (\n <div className=\"container\">\n <nav className=\"navbar\">\n <Link className=\"navbar-brand\" to=\"/\">\n <img src=\"/osba_logo_light.png\" alt=\"OSBA Logo\" />\n </Link>\n {showLanguageSelect && (\n <div>\n {languageOpts.map(lang => {\n if (lang.value !== language) {\n return <span className=\"language-option\" onClick={() => {setLanguage(lang.value)}}>{lang.title}</span>\n }\n })}\n </div>\n \n )}\n {links.length > 0 && (\n <>\n <button\n className=\"navbar-toggler\"\n type=\"button\"\n data-toggle=\"collapse\"\n data-target=\"#navbarNav\"\n aria-controls=\"navbarNav\"\n aria-expanded=\"false\"\n aria-label=\"Toggle navigation\"\n >\n <span className=\"navbar-toggler-icon\"></span>\n </button>\n <div className=\"collapse navbar-collapse\" id=\"navbarNav\">\n <ul className=\"navbar-nav ml-auto\">\n {links.map((link) => (\n <li className=\"nav-item\">{link}</li>\n ))}\n </ul>\n </div>\n </>\n )}\n </nav>\n </div>\n );\n};\n\nexport default Header;","/Users/kennethpolyak/code/calosba-service-centers/src/components/Footer.tsx",["141","142","143","144"],"import React from \"react\";\n\nimport \"./footer.scss\";\n\nconst Footer: React.FC = () => (\n <footer className=\"no-print\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col\">\n <img id=\"footer-osba-logo\" src=\"/osba_logo_light.png\" alt=\"CalOSBA Logo\" />\n Office of the Small Business Advocate (CalOSBA) and The Governor’s Office of Business and Economic Development (GO-Biz)\n </div>\n </div>\n <div className=\"row\">\n <div className=\"col\">\n <div className=\"footer-social\">\n <img className=\"social\" src=\"/twitter_logo.png\" alt=\"Twitter logo\" />\n <a target=\"_blank\" href=\"https://twitter.com/CaliforniaOSBA\">\n @CaliforniaOSBA\n </a>\n </div>\n <div className=\"footer-social\">\n <img className=\"social\" src=\"/instagram_logo.jpeg\" alt=\"Instagram logo\" />\n <a target=\"_blank\" href=\"https://instagram.com/CaliforniaOSBA\">\n @CaliforniaOSBA\n </a>\n </div>\n <div className=\"footer-social\">\n <img className=\"social\" src=\"/facebook_logo.png\" alt=\"Instagram logo\" />\n <a target=\"_blank\" href=\"https://facebook.com/CaliforniaOSBA\">\n @CaliforniaOSBA\n </a>\n </div>\n <div className=\"footer-post-script\">\n This network is funded in part by a grant from the State of California\n </div>\n </div>\n <div className=\"col\">\n <p className=\"d-inline\">\n <div>\n 1325 J Street, Suite 1800\n Sacramento, CA 95814\n </div>\n </p>\n <p className=\"d-inline\">\n <div>\n 1-877-345-4633\n </div>\n </p>\n <div>\n Submit an email request at <a target=\"_blank\" href=\"https://business.ca.gov/zendesk\">\n business.ca.gov/zendesk\n </a>\n </div>\n\n </div>\n </div>\n </div>\n </footer>\n);\n\nexport default Footer;\n","/Users/kennethpolyak/code/calosba-service-centers/src/components/ResultsList.tsx",["145","146","147","148"],"// @ts-nocheck\n\nimport React, { useEffect } from \"react\";\nimport {Center} from './../types';\nimport areas_of_service from '../data/areas_of_service.json';\nimport specific_communities from '../data/specific_communities.json';\n\nimport \"./form-style.scss\";\nimport \"./results.scss\";\n\nconst ResultsList: React.FC<resultsListProps> = ({eligibleCenters}) => eligibleCenters.map((center, i) => {\n return (\n <div id={center.id} className=\"loan-container\">\n <a name={center.id}></a>\n <h2 className=\"title\">\n {center.name}\n </h2>\n <p className=\"loan-description\">\n <strong>Address: </strong><div>{center.fullAddress}</div>\n {center.hasStatewideService && <label className=\"top-label\">This center has statewide service</label>}\n </p>\n <p>\n </p>\n <p className=\"loan-description\">\n <strong>Languages: </strong> <p>{center.languages.join(', ')}</p>\n </p>\n <p className=\"loan-description\">\n <strong>Services Offered:</strong> \n <p className=\"services-list\">\n {center.areasOfService.map(areaId => {\n const areaObj = areas_of_service.find(area => area.id === areaId);\n return <li>{areaObj.name}</li>\n })}\n </p>\n </p>\n {center.specificCommunities.length > 0 && <p className=\"loan-description\">\n <strong>Specific Communities:</strong> \n <p className=\"services-list\">\n {center.specificCommunities.map(communityId => {\n const communityObj = specific_communities.find(community => community.id === communityId);\n return <li>{communityObj.name}</li>\n })}\n </p>\n </p>}\n <a\n className=\"usa-button\"\n onClick={(e) => {\n e.preventDefault();\n window.open(`${center.website}`, '_blank')\n }}\n type=\"button\"\n href=\"#\"\n >\n Learn More\n </a>\n </div>\n )\n});\n\ntype resultsListProps = {\n eligibleCenters: Center[]\n}\n\nexport default ResultsList;","/Users/kennethpolyak/code/calosba-service-centers/src/components/Tabsbar.tsx",["149"],"// @ts-nocheck\nimport React, { useEffect , useState} from \"react\";\n\nimport \"./results.scss\";\n\nconst Tabsbar: React.FC<TabsbarProps> = ({eligibleCenters}) => {\n const [activeTab, setActiveTab] = useState('');\n\n return (\n <nav id=\"mobile-tabsbar-container\">\n <div className=\"tabsbar\">\n {eligibleCenters.map(center => {\n return center.id === activeTab ? \n (\n <span className=\"tab-item current\">\n <a className=\"tab-link current\" href={`#${center.id}`}><strong>{center.name}</strong></a>\n </span>\n ) : (\n <span className=\"tab-item\">\n <a \n className=\"tab-link\" \n href={`#${center.id}`}\n onClick={() => {\n setActiveTab(center.id)\n }}\n >\n {center.name}\n </a>\n </span>\n )\n })}\n </div>\n </nav>\n )\n}\n\ntype TabsbarProps = {\n eligibleCenters: Center[]\n}\n\nexport default Tabsbar;","/Users/kennethpolyak/code/calosba-service-centers/src/components/Sidebar.tsx",["150","151"],"// @ts-nocheck\nimport React, { useEffect , useState} from \"react\";\n\nconst Sidebar: React.FC<sidebarProps> = ({eligibleCenters}) => {\n\nreturn (\n <nav className=\"sidebar-container\">\n <div>\n <div className=\"sidebar-title\">\n INDEX\n </div>\n <div>\n {eligibleCenters.map(center => \n <div className=\"sidebar-item\"><a href={`#${center.id}`}>{center.name}</a></div>\n )}\n </div>\n </div>\n </nav>\n)}\n\ntype sidebarProps = {\n eligibleCenters: Center[]\n}\n\nexport default Sidebar;","/Users/kennethpolyak/code/calosba-service-centers/src/forms/index.ts",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/uswds-components/index.tsx",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/Question.tsx",["152","153"],"import React from 'react'\nimport { Question as QuestionInterface } from '../forms/types'\nimport { getComponent } from '../forms'\nimport { Box, Heading, Text, Markdown } from 'grommet'\nimport { useForm } from '../contexts/form';\n\ninterface Props {\n question: QuestionInterface\n}\n\nconst Question: React.FC<Props> = (props) => {\n const { question } = props\n const Component: React.FC<{ [key: string]: any }> = getComponent(question.type)\n\n const { values } = useForm()\n\n const value = values[question.id]\n const hasSwitch = question.switch && value && typeof value === 'string'\n\n // simple formatting for the question text\n const text = question.name.replace(/\\n/g, \"\\n<br/>\")\n\n return (\n <Box as=\"fieldset\" direction=\"column\" margin={{ bottom: 'small' }}>\n <Box \n as=\"legend\"\n fill={true} \n margin={{ bottom: 'small' }} \n style={{height: \"auto\"}}\n >\n <Text \n size=\"large\" \n color=\"black\" \n margin={{ top: 'large', bottom: 'medium'}}\n weight=\"bold\"\n >\n {<h1 id=\"question-text\" dangerouslySetInnerHTML={{__html: text}} />}\n </Text>\n </Box>\n <Component width=\"100%\" question={question} />\n <Box margin={{ top: 'xsmall' }}>\n {hasSwitch && question.switch![value as string]?.map(q => <Question question={q} />)}\n </Box>\n </Box>\n )\n}\n\nexport default Question\n","/Users/kennethpolyak/code/calosba-service-centers/src/forms/types.ts",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/DatePicker.tsx",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/TextInput.tsx",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/Select.tsx",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/SingleSelect.tsx",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/Boolean.tsx",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/Multiselect.tsx",["154","155"],"import React from 'react'\nimport { Question } from '~/forms/types'\nimport { Box, Text, CheckBox } from 'grommet'\nimport './single-select.css'\nimport { useFormField } from '~/contexts/form'\n\ninterface Props {\n value: string[]\n question: Question\n onChange: (val: string[]) => void\n [key: string]: any\n}\n\nconst Multiselect: React.FC<Props> = (props) => {\n const { question } = props\n const [ value, setValue ] = useFormField(question.id) as [string[] | string, any]\n\n const onSelectValue = (option: string) => {\n if (!value) {\n return setValue([option])\n }\n if (!Array.isArray(value)) {\n return setValue([value, option])\n }\n if (value.includes(option)) {\n return setValue(value.filter(val => val !== option))\n }\n\n setValue([...value, option])\n }\n\n if (!question || !question.options) {\n return <Box />\n }\n\n return (\n <Box as=\"form\">\n {question.options.map(o => {\n const isSelected = value && value.includes(o.id) || false;\n return (\n <Box \n onClick={() => onSelectValue(o.id)} \n style={{ background: isSelected ? \"#EBFFFA\" : \"white\"}} \n key={o.id} \n margin={{ bottom: 'xsmall' }} \n pad='small' \n className=\"single-select\" \n direction=\"row\"\n align=\"center\"\n >\n <Box margin={{ right: 'small' }}>\n <CheckBox\n checked={isSelected}\n />\n </Box>\n <Text>{o.name}</Text>\n </Box>\n )\n })}\n </Box>\n )\n}\n\nexport default Multiselect\n","/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/TextArea.tsx",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/form-components/PhoneNumber.tsx",[],"/Users/kennethpolyak/code/calosba-service-centers/src/components/uswds-components/Button.tsx",[],{"ruleId":"156","replacedBy":"157"},{"ruleId":"158","replacedBy":"159"},{"ruleId":"160","severity":1,"message":"161","line":2,"column":15,"nodeType":"162","messageId":"163","endLine":2,"endColumn":19},{"ruleId":"160","severity":1,"message":"164","line":15,"column":22,"nodeType":"162","messageId":"163","endLine":15,"endColumn":30},{"ruleId":"165","severity":1,"message":"166","line":64,"column":6,"nodeType":"167","endLine":64,"endColumn":8,"suggestions":"168"},{"ruleId":"169","severity":1,"message":"170","line":111,"column":90,"nodeType":"171","endLine":111,"endColumn":148},{"ruleId":"172","severity":1,"message":"173","line":127,"column":13,"nodeType":"171","endLine":127,"endColumn":32},{"ruleId":"174","severity":1,"message":"175","line":127,"column":13,"nodeType":"171","endLine":127,"endColumn":32},{"ruleId":"160","severity":1,"message":"176","line":24,"column":9,"nodeType":"162","messageId":"163","endLine":24,"endColumn":15},{"ruleId":"160","severity":1,"message":"177","line":31,"column":10,"nodeType":"162","messageId":"163","endLine":31,"endColumn":22},{"ruleId":"160","severity":1,"message":"178","line":31,"column":24,"nodeType":"162","messageId":"163","endLine":31,"endColumn":39},{"ruleId":"160","severity":1,"message":"179","line":11,"column":7,"nodeType":"162","messageId":"163","endLine":11,"endColumn":17},{"ruleId":"180","severity":1,"message":"181","line":32,"column":34,"nodeType":"182","messageId":"183","endLine":32,"endColumn":36},{"ruleId":"169","severity":1,"message":"170","line":18,"column":13,"nodeType":"171","endLine":18,"endColumn":74},{"ruleId":"169","severity":1,"message":"170","line":24,"column":13,"nodeType":"171","endLine":24,"endColumn":76},{"ruleId":"169","severity":1,"message":"170","line":30,"column":13,"nodeType":"171","endLine":30,"endColumn":75},{"ruleId":"169","severity":1,"message":"170","line":51,"column":42,"nodeType":"171","endLine":51,"endColumn":100},{"ruleId":"160","severity":1,"message":"184","line":3,"column":17,"nodeType":"162","messageId":"163","endLine":3,"endColumn":26},{"ruleId":"172","severity":1,"message":"173","line":14,"column":7,"nodeType":"171","endLine":14,"endColumn":27},{"ruleId":"174","severity":1,"message":"175","line":14,"column":7,"nodeType":"171","endLine":14,"endColumn":27},{"ruleId":"174","severity":1,"message":"185","line":45,"column":7,"nodeType":"171","endLine":53,"endColumn":8},{"ruleId":"160","severity":1,"message":"184","line":2,"column":17,"nodeType":"162","messageId":"163","endLine":2,"endColumn":26},{"ruleId":"160","severity":1,"message":"184","line":2,"column":17,"nodeType":"162","messageId":"163","endLine":2,"endColumn":26},{"ruleId":"160","severity":1,"message":"186","line":2,"column":29,"nodeType":"162","messageId":"163","endLine":2,"endColumn":37},{"ruleId":"160","severity":1,"message":"187","line":4,"column":15,"nodeType":"162","messageId":"163","endLine":4,"endColumn":22},{"ruleId":"160","severity":1,"message":"188","line":4,"column":30,"nodeType":"162","messageId":"163","endLine":4,"endColumn":38},{"ruleId":"189","severity":1,"message":"190","line":39,"column":34,"nodeType":"191","messageId":"192","endLine":39,"endColumn":36},{"ruleId":"189","severity":1,"message":"190","line":39,"column":58,"nodeType":"191","messageId":"192","endLine":39,"endColumn":60},"no-native-reassign",["193"],"no-negated-in-lhs",["194"],"@typescript-eslint/no-unused-vars","'Text' is defined but never used.","Identifier","unusedVar","'complete' is assigned a value but never used.","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'idsFromQuery' and 'renderLeafletMap'. Either include them or remove the dependency array.","ArrayExpression",["195"],"react/jsx-no-target-blank","Using target=\"_blank\" without rel=\"noreferrer\" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener","JSXOpeningElement","jsx-a11y/anchor-has-content","Anchors must have content and the content must be accessible by a screen reader.","jsx-a11y/anchor-is-valid","The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md","'styles' is assigned a value but never used.","'currentIndex' is assigned a value but never used.","'setCurrentIndex' is assigned a value but never used.","'StyledMenu' is assigned a value but never used.","array-callback-return","Array.prototype.map() expects a value to be returned at the end of arrow function.","ArrowFunctionExpression","expectedAtEnd","'useEffect' is defined but never used.","The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href value. If you cannot provide a valid href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md","'useState' is defined but never used.","'Heading' is defined but never used.","'Markdown' is defined but never used.","no-mixed-operators","Unexpected mix of '&&' and '||'.","LogicalExpression","unexpectedMixedOperator","no-global-assign","no-unsafe-negation",{"desc":"196","fix":"197"},"Update the dependencies array to be: [idsFromQuery, renderLeafletMap]",{"range":"198","text":"199"},[2315,2317],"[idsFromQuery, renderLeafletMap]"]