From 395cce3c9aa754f39b367154755d8634ed65f92a Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Thu, 12 Sep 2024 16:37:29 -0400 Subject: [PATCH 01/12] PXBF-1799-asset-path-alias: alias component imports --- benefit-finder/src/App/index.jsx | 2 +- benefit-finder/src/shared/components/Accordion/index.jsx | 2 +- benefit-finder/src/shared/components/Alert/index.jsx | 2 +- .../src/shared/components/BenefitAccordionGroup/index.jsx | 2 +- benefit-finder/src/shared/components/Button/index.jsx | 2 +- benefit-finder/src/shared/components/ButtonGroup/index.jsx | 2 +- benefit-finder/src/shared/components/Card/index.jsx | 2 +- benefit-finder/src/shared/components/Chevron/index.jsx | 2 +- benefit-finder/src/shared/components/Fieldset/index.jsx | 2 +- benefit-finder/src/shared/components/Intro/index.jsx | 2 +- .../src/shared/components/KeyElegibilityCrieriaList/index.jsx | 2 +- benefit-finder/src/shared/components/LifeEventSection/index.jsx | 2 +- benefit-finder/src/shared/components/Modal/index.jsx | 2 +- benefit-finder/src/shared/components/NoticesList/index.jsx | 2 +- benefit-finder/src/shared/components/ObfuscatedLink/index.jsx | 2 +- benefit-finder/src/shared/components/PrintButton/index.jsx | 2 +- benefit-finder/src/shared/components/Radio/index.jsx | 2 +- benefit-finder/src/shared/components/RadioGroup/index.jsx | 2 +- .../src/shared/components/RelativeBenefitList/index.jsx | 2 +- .../shared/components/ResultsView/components/Results/index.jsx | 2 +- .../components/blocks/EligibleBenefitsHeading/index.jsx | 2 +- .../components/blocks/NotEligibleBenefitsHeading/index.jsx | 2 +- .../ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx | 2 +- benefit-finder/src/shared/components/Select/index.jsx | 2 +- benefit-finder/src/shared/components/StepBackButton/index.jsx | 2 +- benefit-finder/src/shared/components/StepIndicator/index.jsx | 2 +- benefit-finder/src/shared/components/Summary/index.jsx | 2 +- benefit-finder/src/shared/components/TextInput/index.jsx | 2 +- .../src/shared/components/VerifySelectionsView/index.jsx | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/benefit-finder/src/App/index.jsx b/benefit-finder/src/App/index.jsx index 9e040c70a..6e343177d 100644 --- a/benefit-finder/src/App/index.jsx +++ b/benefit-finder/src/App/index.jsx @@ -9,7 +9,7 @@ import { VerifySelectionsView, Form, Alert, -} from '../shared/components' +} from '@components' import './_index.scss' diff --git a/benefit-finder/src/shared/components/Accordion/index.jsx b/benefit-finder/src/shared/components/Accordion/index.jsx index f9fa10d35..1132d2084 100644 --- a/benefit-finder/src/shared/components/Accordion/index.jsx +++ b/benefit-finder/src/shared/components/Accordion/index.jsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' import accordion from '@uswds/uswds/js/usa-accordion' -import { Icon } from '../index' +import { Icon } from '@components' import { dataLayerUtils } from '../../utils' import PropTypes from 'prop-types' import './_index.scss' diff --git a/benefit-finder/src/shared/components/Alert/index.jsx b/benefit-finder/src/shared/components/Alert/index.jsx index da085ecfb..7f1f11190 100644 --- a/benefit-finder/src/shared/components/Alert/index.jsx +++ b/benefit-finder/src/shared/components/Alert/index.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { Heading } from '../index' +import { Heading } from '@components' import { useHandleClassName } from '../../hooks' import { dataLayerUtils } from '../../utils' import './_index.scss' diff --git a/benefit-finder/src/shared/components/BenefitAccordionGroup/index.jsx b/benefit-finder/src/shared/components/BenefitAccordionGroup/index.jsx index 4935a4ab1..1edc20693 100644 --- a/benefit-finder/src/shared/components/BenefitAccordionGroup/index.jsx +++ b/benefit-finder/src/shared/components/BenefitAccordionGroup/index.jsx @@ -7,7 +7,7 @@ import { Heading, KeyElegibilityCrieriaList, ObfuscatedLink, -} from '../index' +} from '@components' import './_index.scss' /** diff --git a/benefit-finder/src/shared/components/Button/index.jsx b/benefit-finder/src/shared/components/Button/index.jsx index a65295c06..d213d3060 100644 --- a/benefit-finder/src/shared/components/Button/index.jsx +++ b/benefit-finder/src/shared/components/Button/index.jsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' import { useHandleClassName } from '../../hooks' -import { Icon } from '../index' +import { Icon } from '@components' import Colors from '../../styles/colors/_index.js' import PropTypes from 'prop-types' import './_index.scss' diff --git a/benefit-finder/src/shared/components/ButtonGroup/index.jsx b/benefit-finder/src/shared/components/ButtonGroup/index.jsx index 94a117144..6d47e59d4 100644 --- a/benefit-finder/src/shared/components/ButtonGroup/index.jsx +++ b/benefit-finder/src/shared/components/ButtonGroup/index.jsx @@ -1,4 +1,4 @@ -import { Button } from '../index' +import { Button } from '@components' import PropTypes from 'prop-types' /** diff --git a/benefit-finder/src/shared/components/Card/index.jsx b/benefit-finder/src/shared/components/Card/index.jsx index 55ff7824a..72aee78f1 100644 --- a/benefit-finder/src/shared/components/Card/index.jsx +++ b/benefit-finder/src/shared/components/Card/index.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { Heading, Icon } from '../index' +import { Heading, Icon } from '@components' import { useHandleClassName } from '../../hooks' import { createMarkup } from '../../utils' import './_index.scss' diff --git a/benefit-finder/src/shared/components/Chevron/index.jsx b/benefit-finder/src/shared/components/Chevron/index.jsx index 97333ed84..8a1869a7b 100644 --- a/benefit-finder/src/shared/components/Chevron/index.jsx +++ b/benefit-finder/src/shared/components/Chevron/index.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { Heading } from '../index' +import { Heading } from '@components' import { createMarkup } from '../../utils' import './_index.scss' diff --git a/benefit-finder/src/shared/components/Fieldset/index.jsx b/benefit-finder/src/shared/components/Fieldset/index.jsx index 0b3fd1fb2..09e77d88a 100644 --- a/benefit-finder/src/shared/components/Fieldset/index.jsx +++ b/benefit-finder/src/shared/components/Fieldset/index.jsx @@ -1,4 +1,4 @@ -import { Hint, Legend } from '../index' +import { Hint, Legend } from '@components' import PropTypes from 'prop-types' import { useHandleClassName } from '../../hooks' diff --git a/benefit-finder/src/shared/components/Intro/index.jsx b/benefit-finder/src/shared/components/Intro/index.jsx index 59f49fb14..7109ed1f6 100644 --- a/benefit-finder/src/shared/components/Intro/index.jsx +++ b/benefit-finder/src/shared/components/Intro/index.jsx @@ -9,7 +9,7 @@ import { NoticesList, ProcessList, TimeIndicator, -} from '../index' +} from '@components' import './_index.scss' diff --git a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.jsx b/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.jsx index d6ed41ecc..02751ecce 100644 --- a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.jsx +++ b/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.jsx @@ -1,4 +1,4 @@ -import { Heading, Icon } from '../index' +import { Heading, Icon } from '@components' import PropTypes from 'prop-types' import { useHandleClassName } from '../../hooks' import './_index.scss' diff --git a/benefit-finder/src/shared/components/LifeEventSection/index.jsx b/benefit-finder/src/shared/components/LifeEventSection/index.jsx index def816084..b6891bbda 100644 --- a/benefit-finder/src/shared/components/LifeEventSection/index.jsx +++ b/benefit-finder/src/shared/components/LifeEventSection/index.jsx @@ -23,7 +23,7 @@ import { Select, StepIndicator, Modal, -} from '../index' +} from '@components' import './_index.scss' /** diff --git a/benefit-finder/src/shared/components/Modal/index.jsx b/benefit-finder/src/shared/components/Modal/index.jsx index 3743585e1..81dd053f3 100644 --- a/benefit-finder/src/shared/components/Modal/index.jsx +++ b/benefit-finder/src/shared/components/Modal/index.jsx @@ -1,7 +1,7 @@ import { useEffect, useRef } from 'react' import NavModal from 'react-modal' import PropTypes from 'prop-types' -import { Button, ObfuscatedLink, Icon, Heading } from '../index' +import { Button, ObfuscatedLink, Icon, Heading } from '@components' import { scrollLock, dataLayerUtils } from '../../utils' import { useCrazyEggUpdate } from '../../hooks' diff --git a/benefit-finder/src/shared/components/NoticesList/index.jsx b/benefit-finder/src/shared/components/NoticesList/index.jsx index 1739270c4..5fcb09d0e 100644 --- a/benefit-finder/src/shared/components/NoticesList/index.jsx +++ b/benefit-finder/src/shared/components/NoticesList/index.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types' import { createMarkup } from '../../utils' -import { Icon } from '../index' +import { Icon } from '@components' import './_index.scss' diff --git a/benefit-finder/src/shared/components/ObfuscatedLink/index.jsx b/benefit-finder/src/shared/components/ObfuscatedLink/index.jsx index bdd1498e5..932f1a670 100644 --- a/benefit-finder/src/shared/components/ObfuscatedLink/index.jsx +++ b/benefit-finder/src/shared/components/ObfuscatedLink/index.jsx @@ -1,5 +1,5 @@ import { useHandleClassName } from '../../hooks' -import { Icon } from '../index' +import { Icon } from '@components' import PropTypes from 'prop-types' import './_index.scss' diff --git a/benefit-finder/src/shared/components/PrintButton/index.jsx b/benefit-finder/src/shared/components/PrintButton/index.jsx index 5f6658c12..d2f20820e 100644 --- a/benefit-finder/src/shared/components/PrintButton/index.jsx +++ b/benefit-finder/src/shared/components/PrintButton/index.jsx @@ -1,4 +1,4 @@ -import { Button } from '../index' +import { Button } from '@components' /** * a functional component that renders a button with window print functionality diff --git a/benefit-finder/src/shared/components/Radio/index.jsx b/benefit-finder/src/shared/components/Radio/index.jsx index e71154fe0..08a1eccfb 100644 --- a/benefit-finder/src/shared/components/Radio/index.jsx +++ b/benefit-finder/src/shared/components/Radio/index.jsx @@ -1,5 +1,5 @@ import { useHandleClassName } from '../../hooks' -import { Label } from '../index' +import { Label } from '@components' import PropTypes from 'prop-types' import './_index.scss' diff --git a/benefit-finder/src/shared/components/RadioGroup/index.jsx b/benefit-finder/src/shared/components/RadioGroup/index.jsx index 08604ca64..a1752ce8c 100644 --- a/benefit-finder/src/shared/components/RadioGroup/index.jsx +++ b/benefit-finder/src/shared/components/RadioGroup/index.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { Radio } from '../index' +import { Radio } from '@components' import './_index.scss' diff --git a/benefit-finder/src/shared/components/RelativeBenefitList/index.jsx b/benefit-finder/src/shared/components/RelativeBenefitList/index.jsx index 21db22416..25ac77c87 100644 --- a/benefit-finder/src/shared/components/RelativeBenefitList/index.jsx +++ b/benefit-finder/src/shared/components/RelativeBenefitList/index.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { Card } from '../index' +import { Card } from '@components' /** * a functional component that renders a list of usa-card component(s) diff --git a/benefit-finder/src/shared/components/ResultsView/components/Results/index.jsx b/benefit-finder/src/shared/components/ResultsView/components/Results/index.jsx index e25f7f419..99bdc59dc 100644 --- a/benefit-finder/src/shared/components/ResultsView/components/Results/index.jsx +++ b/benefit-finder/src/shared/components/ResultsView/components/Results/index.jsx @@ -8,7 +8,7 @@ import { Chevron, ShareTrigger, RelativeBenefitList, -} from '../../../index' +} from '@components' import { ZeroBenefitsHeading, EligibleBenefitsHeading, diff --git a/benefit-finder/src/shared/components/ResultsView/components/blocks/EligibleBenefitsHeading/index.jsx b/benefit-finder/src/shared/components/ResultsView/components/blocks/EligibleBenefitsHeading/index.jsx index 6fc275970..b012c4286 100644 --- a/benefit-finder/src/shared/components/ResultsView/components/blocks/EligibleBenefitsHeading/index.jsx +++ b/benefit-finder/src/shared/components/ResultsView/components/blocks/EligibleBenefitsHeading/index.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { Summary, Heading } from '../../../../index' +import { Summary, Heading } from '@components' import { createMarkup } from '../../../../../utils' import './_index.scss' diff --git a/benefit-finder/src/shared/components/ResultsView/components/blocks/NotEligibleBenefitsHeading/index.jsx b/benefit-finder/src/shared/components/ResultsView/components/blocks/NotEligibleBenefitsHeading/index.jsx index 3c1498dfa..e262ab610 100644 --- a/benefit-finder/src/shared/components/ResultsView/components/blocks/NotEligibleBenefitsHeading/index.jsx +++ b/benefit-finder/src/shared/components/ResultsView/components/blocks/NotEligibleBenefitsHeading/index.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { Summary, Heading } from '../../../../index' +import { Summary, Heading } from '@components' import { createMarkup } from '../../../../../utils' import './_index.scss' diff --git a/benefit-finder/src/shared/components/ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx b/benefit-finder/src/shared/components/ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx index a4f54cdf0..6e4846c62 100644 --- a/benefit-finder/src/shared/components/ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx +++ b/benefit-finder/src/shared/components/ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { Button, Heading } from '../../../../index' +import { Button, Heading } from '@components' import { createMarkup } from '../../../../../utils' import './_index.scss' diff --git a/benefit-finder/src/shared/components/Select/index.jsx b/benefit-finder/src/shared/components/Select/index.jsx index 90c3635cf..8b931ba56 100644 --- a/benefit-finder/src/shared/components/Select/index.jsx +++ b/benefit-finder/src/shared/components/Select/index.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types' import { useHandleClassName } from '../../hooks' -import { Label } from '../index' +import { Label } from '@components' import './_index.scss' /** diff --git a/benefit-finder/src/shared/components/StepBackButton/index.jsx b/benefit-finder/src/shared/components/StepBackButton/index.jsx index 17efac714..7c22bb974 100644 --- a/benefit-finder/src/shared/components/StepBackButton/index.jsx +++ b/benefit-finder/src/shared/components/StepBackButton/index.jsx @@ -1,6 +1,6 @@ import { useResetElement } from '../../hooks' import PropTypes from 'prop-types' -import { Button } from '../index' +import { Button } from '@components' import './_index.scss' diff --git a/benefit-finder/src/shared/components/StepIndicator/index.jsx b/benefit-finder/src/shared/components/StepIndicator/index.jsx index d2d480204..f5d815a75 100644 --- a/benefit-finder/src/shared/components/StepIndicator/index.jsx +++ b/benefit-finder/src/shared/components/StepIndicator/index.jsx @@ -1,4 +1,4 @@ -import { StepBackButton } from '../index' +import { StepBackButton } from '@components' import PropTypes from 'prop-types' import './_index.scss' diff --git a/benefit-finder/src/shared/components/Summary/index.jsx b/benefit-finder/src/shared/components/Summary/index.jsx index 228937296..1d5d4693b 100644 --- a/benefit-finder/src/shared/components/Summary/index.jsx +++ b/benefit-finder/src/shared/components/Summary/index.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { Heading } from '../index' +import { Heading } from '@components' import './_index.scss' const Summary = ({ heading, listItems, cta }) => { diff --git a/benefit-finder/src/shared/components/TextInput/index.jsx b/benefit-finder/src/shared/components/TextInput/index.jsx index 161e6f12d..17cb7590c 100644 --- a/benefit-finder/src/shared/components/TextInput/index.jsx +++ b/benefit-finder/src/shared/components/TextInput/index.jsx @@ -1,5 +1,5 @@ import { useHandleClassName } from '../../hooks' -import { Label } from '../index' +import { Label } from '@components' import PropTypes from 'prop-types' import './_index.scss' diff --git a/benefit-finder/src/shared/components/VerifySelectionsView/index.jsx b/benefit-finder/src/shared/components/VerifySelectionsView/index.jsx index e1cc7bc7e..6493602a4 100644 --- a/benefit-finder/src/shared/components/VerifySelectionsView/index.jsx +++ b/benefit-finder/src/shared/components/VerifySelectionsView/index.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import { parseDate, dataLayerUtils } from '../../utils' import { useCrazyEggUpdate } from '../../hooks' import * as apiCalls from '../../api/apiCalls' -import { Heading, Button } from '../index' +import { Heading, Button } from '@components' import './_index.scss' From b2d1c7e5440c4d8905a24b58127aa165d7ed707a Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Thu, 12 Sep 2024 16:48:48 -0400 Subject: [PATCH 02/12] PXBF-1799-asset-path-alias: alias additional shared paths --- benefit-finder/src/App/index.jsx | 8 ++++---- .../src/shared/components/Accordion/index.jsx | 2 +- benefit-finder/src/shared/components/Alert/index.jsx | 4 ++-- .../shared/components/BenefitAccordionGroup/index.jsx | 2 +- benefit-finder/src/shared/components/Button/index.jsx | 4 ++-- benefit-finder/src/shared/components/Card/index.jsx | 4 ++-- benefit-finder/src/shared/components/Chevron/index.jsx | 2 +- .../src/shared/components/EmailTrigger/index.jsx | 2 +- .../src/shared/components/Fieldset/index.jsx | 2 +- benefit-finder/src/shared/components/Heading/index.jsx | 2 +- benefit-finder/src/shared/components/Intro/index.jsx | 4 ++-- .../components/KeyElegibilityCrieriaList/index.jsx | 2 +- benefit-finder/src/shared/components/Label/index.jsx | 2 +- .../src/shared/components/LifeEventSection/index.jsx | 10 +++------- benefit-finder/src/shared/components/Modal/index.jsx | 4 ++-- .../src/shared/components/NoticesList/index.jsx | 2 +- .../src/shared/components/ObfuscatedLink/index.jsx | 2 +- .../src/shared/components/Paragraph/index.jsx | 2 +- benefit-finder/src/shared/components/Radio/index.jsx | 2 +- .../ResultsView/components/Results/index.jsx | 4 ++-- .../blocks/EligibleBenefitsHeading/index.jsx | 2 +- .../blocks/NotEligibleBenefitsHeading/index.jsx | 2 +- .../components/blocks/ZeroBenefitsHeading/index.jsx | 2 +- .../src/shared/components/ResultsView/index.jsx | 6 +++--- benefit-finder/src/shared/components/Select/index.jsx | 2 +- .../src/shared/components/ShareTrigger/index.jsx | 2 +- .../src/shared/components/StepBackButton/index.jsx | 2 +- .../src/shared/components/TextInput/index.jsx | 2 +- .../shared/components/VerifySelectionsView/index.jsx | 6 +++--- 29 files changed, 44 insertions(+), 48 deletions(-) diff --git a/benefit-finder/src/App/index.jsx b/benefit-finder/src/App/index.jsx index 6e343177d..be359cdcc 100644 --- a/benefit-finder/src/App/index.jsx +++ b/benefit-finder/src/App/index.jsx @@ -1,7 +1,7 @@ import { useState, createContext, useEffect } from 'react' import { version } from '../../package.json' -import { useResetElement } from '../shared/hooks' -import * as apiCalls from '../shared/api/apiCalls' +import { useResetElement } from '@hooks' +import * as apiCalls from '@api/apiCalls' import { Intro, LifeEventSection, @@ -14,8 +14,8 @@ import { import './_index.scss' // data and ui content -import * as en from '../shared/locales/en/en.json' -import * as es from '../shared/locales/es/es.json' +import * as en from '@locales/en/en.json' +import * as es from '@locales/es/es.json' /** * a functional component that renders our application. diff --git a/benefit-finder/src/shared/components/Accordion/index.jsx b/benefit-finder/src/shared/components/Accordion/index.jsx index 1132d2084..bcd176a50 100644 --- a/benefit-finder/src/shared/components/Accordion/index.jsx +++ b/benefit-finder/src/shared/components/Accordion/index.jsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react' import accordion from '@uswds/uswds/js/usa-accordion' import { Icon } from '@components' -import { dataLayerUtils } from '../../utils' +import { dataLayerUtils } from '@utils' import PropTypes from 'prop-types' import './_index.scss' diff --git a/benefit-finder/src/shared/components/Alert/index.jsx b/benefit-finder/src/shared/components/Alert/index.jsx index 7f1f11190..0bcab1376 100644 --- a/benefit-finder/src/shared/components/Alert/index.jsx +++ b/benefit-finder/src/shared/components/Alert/index.jsx @@ -1,7 +1,7 @@ import PropTypes from 'prop-types' import { Heading } from '@components' -import { useHandleClassName } from '../../hooks' -import { dataLayerUtils } from '../../utils' +import { useHandleClassName } from '@hooks' +import { dataLayerUtils } from '@utils' import './_index.scss' import { useEffect } from 'react' diff --git a/benefit-finder/src/shared/components/BenefitAccordionGroup/index.jsx b/benefit-finder/src/shared/components/BenefitAccordionGroup/index.jsx index 1edc20693..afc05e254 100644 --- a/benefit-finder/src/shared/components/BenefitAccordionGroup/index.jsx +++ b/benefit-finder/src/shared/components/BenefitAccordionGroup/index.jsx @@ -1,6 +1,6 @@ // import { useEffect, useState } from 'react' import PropTypes from 'prop-types' -import { createMarkup, dataLayerUtils } from '../../utils' +import { createMarkup, dataLayerUtils } from '@utils' import { Accordion, Button, diff --git a/benefit-finder/src/shared/components/Button/index.jsx b/benefit-finder/src/shared/components/Button/index.jsx index d213d3060..98825a511 100644 --- a/benefit-finder/src/shared/components/Button/index.jsx +++ b/benefit-finder/src/shared/components/Button/index.jsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react' -import { useHandleClassName } from '../../hooks' +import { useHandleClassName } from '@hooks' import { Icon } from '@components' -import Colors from '../../styles/colors/_index.js' +import Colors from '@styles/colors/_index.js' import PropTypes from 'prop-types' import './_index.scss' diff --git a/benefit-finder/src/shared/components/Card/index.jsx b/benefit-finder/src/shared/components/Card/index.jsx index 72aee78f1..1e22b26d3 100644 --- a/benefit-finder/src/shared/components/Card/index.jsx +++ b/benefit-finder/src/shared/components/Card/index.jsx @@ -1,7 +1,7 @@ import PropTypes from 'prop-types' import { Heading, Icon } from '@components' -import { useHandleClassName } from '../../hooks' -import { createMarkup } from '../../utils' +import { useHandleClassName } from '@hooks' +import { createMarkup } from '@utils' import './_index.scss' /** diff --git a/benefit-finder/src/shared/components/Chevron/index.jsx b/benefit-finder/src/shared/components/Chevron/index.jsx index 8a1869a7b..5a2d60b21 100644 --- a/benefit-finder/src/shared/components/Chevron/index.jsx +++ b/benefit-finder/src/shared/components/Chevron/index.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types' import { Heading } from '@components' -import { createMarkup } from '../../utils' +import { createMarkup } from '@utils' import './_index.scss' /** diff --git a/benefit-finder/src/shared/components/EmailTrigger/index.jsx b/benefit-finder/src/shared/components/EmailTrigger/index.jsx index 73a57cb3d..3247ced81 100644 --- a/benefit-finder/src/shared/components/EmailTrigger/index.jsx +++ b/benefit-finder/src/shared/components/EmailTrigger/index.jsx @@ -1,5 +1,5 @@ import { useState } from 'react' -import { buildURIParameter } from '../../utils' +import { buildURIParameter } from '@utils' /** * a functional component that renders a anchor with mailto email context diff --git a/benefit-finder/src/shared/components/Fieldset/index.jsx b/benefit-finder/src/shared/components/Fieldset/index.jsx index 09e77d88a..bbc34fb10 100644 --- a/benefit-finder/src/shared/components/Fieldset/index.jsx +++ b/benefit-finder/src/shared/components/Fieldset/index.jsx @@ -1,6 +1,6 @@ import { Hint, Legend } from '@components' import PropTypes from 'prop-types' -import { useHandleClassName } from '../../hooks' +import { useHandleClassName } from '@hooks' import './_index.scss' diff --git a/benefit-finder/src/shared/components/Heading/index.jsx b/benefit-finder/src/shared/components/Heading/index.jsx index 646b9085d..b3365da31 100644 --- a/benefit-finder/src/shared/components/Heading/index.jsx +++ b/benefit-finder/src/shared/components/Heading/index.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { useHandleClassName } from '../../hooks' +import { useHandleClassName } from '@hooks' import './_index.scss' /** diff --git a/benefit-finder/src/shared/components/Intro/index.jsx b/benefit-finder/src/shared/components/Intro/index.jsx index 7109ed1f6..cd7db6636 100644 --- a/benefit-finder/src/shared/components/Intro/index.jsx +++ b/benefit-finder/src/shared/components/Intro/index.jsx @@ -1,6 +1,6 @@ import { useEffect } from 'react' -import { dataLayerUtils } from '../../utils' -import { useResetElement, useCrazyEggUpdate } from '../../hooks' +import { dataLayerUtils } from '@utils' +import { useResetElement, useCrazyEggUpdate } from '@hooks' import PropTypes from 'prop-types' import { Button, diff --git a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.jsx b/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.jsx index 02751ecce..0185d40fd 100644 --- a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.jsx +++ b/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.jsx @@ -1,6 +1,6 @@ import { Heading, Icon } from '@components' import PropTypes from 'prop-types' -import { useHandleClassName } from '../../hooks' +import { useHandleClassName } from '@hooks' import './_index.scss' /** diff --git a/benefit-finder/src/shared/components/Label/index.jsx b/benefit-finder/src/shared/components/Label/index.jsx index 5bc428fc3..178415185 100644 --- a/benefit-finder/src/shared/components/Label/index.jsx +++ b/benefit-finder/src/shared/components/Label/index.jsx @@ -1,4 +1,4 @@ -import { useHandleClassName } from '../../hooks' +import { useHandleClassName } from '@hooks' import PropTypes from 'prop-types' import './_index.scss' diff --git a/benefit-finder/src/shared/components/LifeEventSection/index.jsx b/benefit-finder/src/shared/components/LifeEventSection/index.jsx index b6891bbda..574a5a0e5 100644 --- a/benefit-finder/src/shared/components/LifeEventSection/index.jsx +++ b/benefit-finder/src/shared/components/LifeEventSection/index.jsx @@ -6,13 +6,9 @@ import { dataLayerUtils, errorHandling, handleSurvey, -} from '../../utils' -import { - useHandleUnload, - useResetElement, - useCrazyEggUpdate, -} from '../../hooks' -import * as apiCalls from '../../api/apiCalls' +} from '@utils' +import { useHandleUnload, useResetElement, useCrazyEggUpdate } from '@hooks' +import * as apiCalls from '@api/apiCalls' import { Alert, Button, diff --git a/benefit-finder/src/shared/components/Modal/index.jsx b/benefit-finder/src/shared/components/Modal/index.jsx index 81dd053f3..8e03c96c3 100644 --- a/benefit-finder/src/shared/components/Modal/index.jsx +++ b/benefit-finder/src/shared/components/Modal/index.jsx @@ -2,8 +2,8 @@ import { useEffect, useRef } from 'react' import NavModal from 'react-modal' import PropTypes from 'prop-types' import { Button, ObfuscatedLink, Icon, Heading } from '@components' -import { scrollLock, dataLayerUtils } from '../../utils' -import { useCrazyEggUpdate } from '../../hooks' +import { scrollLock, dataLayerUtils } from '@utils' +import { useCrazyEggUpdate } from '@hooks' import './_index.scss' diff --git a/benefit-finder/src/shared/components/NoticesList/index.jsx b/benefit-finder/src/shared/components/NoticesList/index.jsx index 5fcb09d0e..36986f265 100644 --- a/benefit-finder/src/shared/components/NoticesList/index.jsx +++ b/benefit-finder/src/shared/components/NoticesList/index.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { createMarkup } from '../../utils' +import { createMarkup } from '@utils' import { Icon } from '@components' import './_index.scss' diff --git a/benefit-finder/src/shared/components/ObfuscatedLink/index.jsx b/benefit-finder/src/shared/components/ObfuscatedLink/index.jsx index 932f1a670..7ea7c45de 100644 --- a/benefit-finder/src/shared/components/ObfuscatedLink/index.jsx +++ b/benefit-finder/src/shared/components/ObfuscatedLink/index.jsx @@ -1,4 +1,4 @@ -import { useHandleClassName } from '../../hooks' +import { useHandleClassName } from '@hooks' import { Icon } from '@components' import PropTypes from 'prop-types' import './_index.scss' diff --git a/benefit-finder/src/shared/components/Paragraph/index.jsx b/benefit-finder/src/shared/components/Paragraph/index.jsx index ffb609823..95da104be 100644 --- a/benefit-finder/src/shared/components/Paragraph/index.jsx +++ b/benefit-finder/src/shared/components/Paragraph/index.jsx @@ -1,4 +1,4 @@ -import { useHandleClassName } from '../../hooks' +import { useHandleClassName } from '@hooks' import PropTypes from 'prop-types' import './_index.scss' diff --git a/benefit-finder/src/shared/components/Radio/index.jsx b/benefit-finder/src/shared/components/Radio/index.jsx index 08a1eccfb..eab6a602a 100644 --- a/benefit-finder/src/shared/components/Radio/index.jsx +++ b/benefit-finder/src/shared/components/Radio/index.jsx @@ -1,4 +1,4 @@ -import { useHandleClassName } from '../../hooks' +import { useHandleClassName } from '@hooks' import { Label } from '@components' import PropTypes from 'prop-types' diff --git a/benefit-finder/src/shared/components/ResultsView/components/Results/index.jsx b/benefit-finder/src/shared/components/ResultsView/components/Results/index.jsx index 99bdc59dc..978c8937c 100644 --- a/benefit-finder/src/shared/components/ResultsView/components/Results/index.jsx +++ b/benefit-finder/src/shared/components/ResultsView/components/Results/index.jsx @@ -14,8 +14,8 @@ import { EligibleBenefitsHeading, NotEligibleBenefitsHeading, } from '../blocks/index' -import * as apiCalls from '../../../../api/apiCalls' -import { createMarkup } from '../../../../utils' +import * as apiCalls from '@api/apiCalls' +import { createMarkup } from '@utils' import './_index.scss' diff --git a/benefit-finder/src/shared/components/ResultsView/components/blocks/EligibleBenefitsHeading/index.jsx b/benefit-finder/src/shared/components/ResultsView/components/blocks/EligibleBenefitsHeading/index.jsx index b012c4286..a68503819 100644 --- a/benefit-finder/src/shared/components/ResultsView/components/blocks/EligibleBenefitsHeading/index.jsx +++ b/benefit-finder/src/shared/components/ResultsView/components/blocks/EligibleBenefitsHeading/index.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types' import { Summary, Heading } from '@components' -import { createMarkup } from '../../../../../utils' +import { createMarkup } from '@utils' import './_index.scss' const EligibleBenefitsHeadingBlock = ({ ui }) => { diff --git a/benefit-finder/src/shared/components/ResultsView/components/blocks/NotEligibleBenefitsHeading/index.jsx b/benefit-finder/src/shared/components/ResultsView/components/blocks/NotEligibleBenefitsHeading/index.jsx index e262ab610..b0745f941 100644 --- a/benefit-finder/src/shared/components/ResultsView/components/blocks/NotEligibleBenefitsHeading/index.jsx +++ b/benefit-finder/src/shared/components/ResultsView/components/blocks/NotEligibleBenefitsHeading/index.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types' import { Summary, Heading } from '@components' -import { createMarkup } from '../../../../../utils' +import { createMarkup } from '@utils' import './_index.scss' const NotEligibleBenefitsHeadingBlock = ({ ui }) => { diff --git a/benefit-finder/src/shared/components/ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx b/benefit-finder/src/shared/components/ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx index 6e4846c62..ce0c34895 100644 --- a/benefit-finder/src/shared/components/ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx +++ b/benefit-finder/src/shared/components/ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types' import { Button, Heading } from '@components' -import { createMarkup } from '../../../../../utils' +import { createMarkup } from '@utils' import './_index.scss' diff --git a/benefit-finder/src/shared/components/ResultsView/index.jsx b/benefit-finder/src/shared/components/ResultsView/index.jsx index 72fa04d7b..7fae0967d 100644 --- a/benefit-finder/src/shared/components/ResultsView/index.jsx +++ b/benefit-finder/src/shared/components/ResultsView/index.jsx @@ -1,9 +1,9 @@ import { useEffect, useState } from 'react' -import { useResetElement, useCrazyEggUpdate } from '../../hooks' -import * as apiCalls from '../../api/apiCalls' +import { useResetElement, useCrazyEggUpdate } from '@hooks' +import * as apiCalls from '@api/apiCalls' import PropTypes from 'prop-types' import { Results } from './components/index' -import { dataLayerUtils, handleSurvey } from '../../utils' +import { dataLayerUtils, handleSurvey } from '@utils' // import './_index.scss' // Results View is a single view with three states, eligible, not eligible, and zero benefits diff --git a/benefit-finder/src/shared/components/Select/index.jsx b/benefit-finder/src/shared/components/Select/index.jsx index 8b931ba56..ddaa25194 100644 --- a/benefit-finder/src/shared/components/Select/index.jsx +++ b/benefit-finder/src/shared/components/Select/index.jsx @@ -1,5 +1,5 @@ import PropTypes from 'prop-types' -import { useHandleClassName } from '../../hooks' +import { useHandleClassName } from '@hooks' import { Label } from '@components' import './_index.scss' diff --git a/benefit-finder/src/shared/components/ShareTrigger/index.jsx b/benefit-finder/src/shared/components/ShareTrigger/index.jsx index f76702a52..5b02e77e7 100644 --- a/benefit-finder/src/shared/components/ShareTrigger/index.jsx +++ b/benefit-finder/src/shared/components/ShareTrigger/index.jsx @@ -1,5 +1,5 @@ import { useState } from 'react' -import { buildURIParameter } from '../../utils' +import { buildURIParameter } from '@utils' /** * a functional component that renders a button with copy-to-cipboard functionality diff --git a/benefit-finder/src/shared/components/StepBackButton/index.jsx b/benefit-finder/src/shared/components/StepBackButton/index.jsx index 7c22bb974..72e444708 100644 --- a/benefit-finder/src/shared/components/StepBackButton/index.jsx +++ b/benefit-finder/src/shared/components/StepBackButton/index.jsx @@ -1,4 +1,4 @@ -import { useResetElement } from '../../hooks' +import { useResetElement } from '@hooks' import PropTypes from 'prop-types' import { Button } from '@components' diff --git a/benefit-finder/src/shared/components/TextInput/index.jsx b/benefit-finder/src/shared/components/TextInput/index.jsx index 17cb7590c..2b298e988 100644 --- a/benefit-finder/src/shared/components/TextInput/index.jsx +++ b/benefit-finder/src/shared/components/TextInput/index.jsx @@ -1,4 +1,4 @@ -import { useHandleClassName } from '../../hooks' +import { useHandleClassName } from '@hooks' import { Label } from '@components' import PropTypes from 'prop-types' import './_index.scss' diff --git a/benefit-finder/src/shared/components/VerifySelectionsView/index.jsx b/benefit-finder/src/shared/components/VerifySelectionsView/index.jsx index 6493602a4..db1468248 100644 --- a/benefit-finder/src/shared/components/VerifySelectionsView/index.jsx +++ b/benefit-finder/src/shared/components/VerifySelectionsView/index.jsx @@ -1,8 +1,8 @@ import { useEffect } from 'react' import PropTypes from 'prop-types' -import { parseDate, dataLayerUtils } from '../../utils' -import { useCrazyEggUpdate } from '../../hooks' -import * as apiCalls from '../../api/apiCalls' +import { parseDate, dataLayerUtils } from '@utils' +import { useCrazyEggUpdate } from '@hooks' +import * as apiCalls from '@api/apiCalls' import { Heading, Button } from '@components' import './_index.scss' From 51bdb8d97375fc0902fa477f6ecb9ee21d1e56d8 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Thu, 12 Sep 2024 16:57:01 -0400 Subject: [PATCH 03/12] PXBF-1799-asset-path-alias: alias paths in test specs --- .../BenefitAccordionGroup/__tests__/index.spec.jsx | 6 +++--- .../src/shared/components/Date/__tests__/index.spec.jsx | 2 +- .../src/shared/components/Fieldset/__tests__/index.spec.jsx | 2 +- benefit-finder/src/shared/components/Icon/index_icons.jsx | 2 +- .../src/shared/components/Intro/__tests__/index.spec.jsx | 4 ++-- .../KeyElegibilityCrieriaList/__tests__/index.spec.jsx | 2 +- .../components/LifeEventSection/__tests__/index.spec.jsx | 4 ++-- .../components/RelativeBenefitList/__tests__/index.spec.jsx | 2 +- .../shared/components/ResultsView/__tests__/index.spec.jsx | 6 +++--- .../ResultsView/components/Results/__tests__/index.spec.jsx | 2 +- .../blocks/EligibleBenefitsHeading/__tests__/index.spec.jsx | 2 +- .../blocks/ZeroBenefitsHeading/__tests__/index.spec.jsx | 2 +- .../src/shared/components/Select/__tests__/index.spec.jsx | 2 +- .../src/shared/components/Summary/__tests__/index.spec.jsx | 2 +- .../VerifySelectionsView/__tests__/index.spec.jsx | 2 +- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/benefit-finder/src/shared/components/BenefitAccordionGroup/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/BenefitAccordionGroup/__tests__/index.spec.jsx index 4dbfdb24d..9622e6dff 100644 --- a/benefit-finder/src/shared/components/BenefitAccordionGroup/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/BenefitAccordionGroup/__tests__/index.spec.jsx @@ -1,8 +1,8 @@ import { render, screen } from '@testing-library/react' import BenefitAccordionGroup from '../index.jsx' -import content from '../../../api/mock-data/current.js' -import * as en from '../../../locales/en/en.json' -import * as es from '../../../locales/es/es.json' +import content from '@api/mock-data/current.js' +import * as en from '@locales/en/en.json' +import * as es from '@locales/es/es.json' const { data } = JSON.parse(content) const { benefits } = data diff --git a/benefit-finder/src/shared/components/Date/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/Date/__tests__/index.spec.jsx index 37cbe52fd..f6845f0c2 100644 --- a/benefit-finder/src/shared/components/Date/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/Date/__tests__/index.spec.jsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react' import Date from '../index.jsx' -import * as en from '../../../locales/en/en.json' +import * as en from '@locales/en/en.json' const fieldSetId = 'applicant_date_of_birth_0' diff --git a/benefit-finder/src/shared/components/Fieldset/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/Fieldset/__tests__/index.spec.jsx index c42c2382b..ba48c7b55 100644 --- a/benefit-finder/src/shared/components/Fieldset/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/Fieldset/__tests__/index.spec.jsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react' import Fieldset from '../index.jsx' -import * as en from '../../../locales/en/en.json' +import * as en from '@locales/en/en.json' const fieldSetId = 'applicant_date_of_birth_0' diff --git a/benefit-finder/src/shared/components/Icon/index_icons.jsx b/benefit-finder/src/shared/components/Icon/index_icons.jsx index bec6e50fd..9699e0289 100644 --- a/benefit-finder/src/shared/components/Icon/index_icons.jsx +++ b/benefit-finder/src/shared/components/Icon/index_icons.jsx @@ -1,4 +1,4 @@ -import Colors from '../../styles/colors/_index.js' +import Colors from '@styles/colors/_index.js' // export svg components in alpha order diff --git a/benefit-finder/src/shared/components/Intro/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/Intro/__tests__/index.spec.jsx index f8a4a1398..e2eadf8d1 100644 --- a/benefit-finder/src/shared/components/Intro/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/Intro/__tests__/index.spec.jsx @@ -1,7 +1,7 @@ import { render } from '@testing-library/react' import Intro from '../index.jsx' -import * as en from '../../../locales/en/en.json' -import content from '../../../api/mock-data/current.js' +import * as en from '@locales/en/en.json' +import content from '@api/mock-data/current.js' const t = en const { data } = JSON.parse(content) diff --git a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/__tests__/index.spec.jsx index 3e765af5b..06497c22a 100644 --- a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/__tests__/index.spec.jsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react' import KeyElegibilityCrieriaList from '../index.jsx' -import * as en from '../../../locales/en/en.json' +import * as en from '@locales/en/en.json' describe('KeyElegibilityCrieriaList', () => { it('renders a match to the previous snapshot', () => { diff --git a/benefit-finder/src/shared/components/LifeEventSection/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/LifeEventSection/__tests__/index.spec.jsx index f337aeaa5..40bb7b83a 100644 --- a/benefit-finder/src/shared/components/LifeEventSection/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/LifeEventSection/__tests__/index.spec.jsx @@ -1,7 +1,7 @@ import { render } from '@testing-library/react' import LifeEventSection from '../index.jsx' -import content from '../../../api/mock-data/current.js' -import * as en from '../../../locales/en/en.json' +import content from '@api/mock-data/current.js' +import * as en from '@locales/en/en.json' const { data } = JSON.parse(content) const { lifeEventForm } = data diff --git a/benefit-finder/src/shared/components/RelativeBenefitList/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/RelativeBenefitList/__tests__/index.spec.jsx index 2830af5b5..e2e6addac 100644 --- a/benefit-finder/src/shared/components/RelativeBenefitList/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/RelativeBenefitList/__tests__/index.spec.jsx @@ -1,6 +1,6 @@ import { render, waitFor, screen } from '@testing-library/react' import RelativeBenefitList from '../index.jsx' -import content from '../../../api/mock-data/current.js' +import content from '@api/mock-data/current.js' const { data } = JSON.parse(content) const relativeBenefits = data.lifeEventForm.relevantBenefits diff --git a/benefit-finder/src/shared/components/ResultsView/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/ResultsView/__tests__/index.spec.jsx index bc4aadb80..f93f4b401 100644 --- a/benefit-finder/src/shared/components/ResultsView/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/ResultsView/__tests__/index.spec.jsx @@ -1,8 +1,8 @@ import { render, screen } from '@testing-library/react' import ResultsView from '../index.jsx' -import * as apiCalls from '../../../api/apiCalls.js' -import * as en from '../../../locales/en/en.json' -import content from '../../../api/mock-data/current.js' +import * as apiCalls from '@api/apiCalls.js' +import * as en from '@locales/en/en.json' +import content from '@api/mock-data/current.js' const { data } = JSON.parse(content) // get current data - subtract two years diff --git a/benefit-finder/src/shared/components/ResultsView/components/Results/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/ResultsView/components/Results/__tests__/index.spec.jsx index 5d46f6825..1c70afb6f 100644 --- a/benefit-finder/src/shared/components/ResultsView/components/Results/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/ResultsView/components/Results/__tests__/index.spec.jsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react' import Results from '../index.jsx' -import * as en from '../../../../../locales/en/en.json' +import * as en from '@locales/en/en.json' const { resultsView } = en diff --git a/benefit-finder/src/shared/components/ResultsView/components/blocks/EligibleBenefitsHeading/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/ResultsView/components/blocks/EligibleBenefitsHeading/__tests__/index.spec.jsx index ebd63acd2..4e3cb08ee 100644 --- a/benefit-finder/src/shared/components/ResultsView/components/blocks/EligibleBenefitsHeading/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/ResultsView/components/blocks/EligibleBenefitsHeading/__tests__/index.spec.jsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react' import EligibleBenefitsHeading from '../index.jsx' -import * as en from '../../../../../../locales/en/en.json' +import * as en from '@locales/en/en.json' const { eligible, summaryBox } = en diff --git a/benefit-finder/src/shared/components/ResultsView/components/blocks/ZeroBenefitsHeading/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/ResultsView/components/blocks/ZeroBenefitsHeading/__tests__/index.spec.jsx index 438cfe1fe..bb637ce30 100644 --- a/benefit-finder/src/shared/components/ResultsView/components/blocks/ZeroBenefitsHeading/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/ResultsView/components/blocks/ZeroBenefitsHeading/__tests__/index.spec.jsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react' import ZeroBenefitsHeading from '../index.jsx' -import * as en from '../../../../../../locales/en/en.json' +import * as en from '@locales/en/en.json' describe('ZeroBenefitsHeading', () => { it('renders a match to the previous snapshot', () => { diff --git a/benefit-finder/src/shared/components/Select/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/Select/__tests__/index.spec.jsx index d1c7ab754..8b1c2baea 100644 --- a/benefit-finder/src/shared/components/Select/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/Select/__tests__/index.spec.jsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react' import Select from '../index.jsx' -import * as en from '../../../locales/en/en.json' +import * as en from '@locales/en/en.json' const fieldSetId = 'applicant_relationship_to_the_deceased' diff --git a/benefit-finder/src/shared/components/Summary/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/Summary/__tests__/index.spec.jsx index a3648113c..1b98d3939 100644 --- a/benefit-finder/src/shared/components/Summary/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/Summary/__tests__/index.spec.jsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react' import Summary from '../index.jsx' -import * as en from '../../../locales/en/en.json' +import * as en from '@locales/en/en.json' const { heading, list, cta } = en.resultsView.summaryBox diff --git a/benefit-finder/src/shared/components/VerifySelectionsView/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/VerifySelectionsView/__tests__/index.spec.jsx index 514b0b31f..c59ad0d28 100644 --- a/benefit-finder/src/shared/components/VerifySelectionsView/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/VerifySelectionsView/__tests__/index.spec.jsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react' import VerifySelectionsView from '../index.jsx' -import * as en from '../../../locales/en/en.json' +import * as en from '@locales/en/en.json' beforeAll(() => { // handle window.scrollTo From f9e5949314f5ff0adfb83e0e6af1cc47849d0d72 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Thu, 12 Sep 2024 16:59:12 -0400 Subject: [PATCH 04/12] PXBF-1799-asset-path-alias: alias import path --- benefit-finder/src/shared/hooks/useCrazyEggUpdate/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benefit-finder/src/shared/hooks/useCrazyEggUpdate/index.js b/benefit-finder/src/shared/hooks/useCrazyEggUpdate/index.js index 99deee19a..555642bd7 100644 --- a/benefit-finder/src/shared/hooks/useCrazyEggUpdate/index.js +++ b/benefit-finder/src/shared/hooks/useCrazyEggUpdate/index.js @@ -1,5 +1,5 @@ import { useEffect } from 'react' -import { windowSize } from '../../utils' +import { windowSize } from '@utils' const useCrazyEggUpdate = ({ pageView, notEligibleView }) => { const isDesktop = windowSize(window).desktop From 5b075e30bff08af0c2c8cd46458c7d9810f5853a Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Thu, 12 Sep 2024 16:59:50 -0400 Subject: [PATCH 05/12] PXBF-1799-asset-path-alias: include vite config for path alias --- benefit-finder/vite.config.mjs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/benefit-finder/vite.config.mjs b/benefit-finder/vite.config.mjs index 452f236d7..7a9897e3f 100644 --- a/benefit-finder/vite.config.mjs +++ b/benefit-finder/vite.config.mjs @@ -1,3 +1,4 @@ +import path from 'path' import { defineConfig, loadEnv } from 'vite' import react from '@vitejs/plugin-react' import eslint from 'vite-plugin-eslint' @@ -40,10 +41,23 @@ const poscssConfig = { const server = test ? testServer : devServer +const INPUT_DIR = './src' + // https://vitejs.dev/config/ export default defineConfig({ base: './', plugins: [react(), eslint(), copy(copyConfig)], + resolve: { + alias: { + '@': path.resolve(INPUT_DIR), + '@api': path.resolve(INPUT_DIR, './shared/api'), + '@components': path.resolve(INPUT_DIR, './shared/components'), + '@hooks': path.resolve(INPUT_DIR, './shared/hooks'), + '@locales': path.resolve(INPUT_DIR, './shared/locales'), + '@styles': path.resolve(INPUT_DIR, './shared/styles'), + '@utils': path.resolve(INPUT_DIR, './shared/utils'), + }, + }, optimizeDeps: { exclude: ['@storybook/blocks'], }, From 42ae14ee0722cda5e46a481d4d734357f3950918 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Thu, 12 Sep 2024 17:00:44 -0400 Subject: [PATCH 06/12] PXBF-1799-asset-path-alias: path alias imports --- .../src/shared/components/NoticesList/__tests__/index.spec.jsx | 2 +- .../blocks/NotEligibleBenefitsHeading/__tests__/index.spec.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benefit-finder/src/shared/components/NoticesList/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/NoticesList/__tests__/index.spec.jsx index e185197c1..0a6409f2c 100644 --- a/benefit-finder/src/shared/components/NoticesList/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/NoticesList/__tests__/index.spec.jsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react' import NoticesList from '../index.jsx' -import * as en from '../../../locales/en/en.json' +import * as en from '@locales/en/en.json' describe('NoticesList', () => { const t = en diff --git a/benefit-finder/src/shared/components/ResultsView/components/blocks/NotEligibleBenefitsHeading/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/ResultsView/components/blocks/NotEligibleBenefitsHeading/__tests__/index.spec.jsx index 19e26e351..f91b2c0f4 100644 --- a/benefit-finder/src/shared/components/ResultsView/components/blocks/NotEligibleBenefitsHeading/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/ResultsView/components/blocks/NotEligibleBenefitsHeading/__tests__/index.spec.jsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react' import NotEligibleBenefitsHeading from '../index.jsx' -import * as en from '../../../../../../locales/en/en.json' +import * as en from '@locales/en/en.json' const { notEligible, summaryBox } = en From 80fdfe954aa8478200cdb24e7560b44d1c79a479 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Thu, 12 Sep 2024 17:17:19 -0400 Subject: [PATCH 07/12] PXBF-1799-asset-path-alias: update export files --- benefit-finder/src/shared/components/index.js | 115 ++++++++++++------ benefit-finder/src/shared/hooks/index.js | 15 ++- benefit-finder/src/shared/utils/index.js | 30 +++-- 3 files changed, 109 insertions(+), 51 deletions(-) diff --git a/benefit-finder/src/shared/components/index.js b/benefit-finder/src/shared/components/index.js index 5d5bc012f..b2d9724dd 100644 --- a/benefit-finder/src/shared/components/index.js +++ b/benefit-finder/src/shared/components/index.js @@ -1,38 +1,77 @@ -// order exports in alphabetical list -export { default as Alert } from './Alert' -export { default as Accordion } from './Accordion' -export { default as BenefitAccordionGroup } from './BenefitAccordionGroup' -export { default as Button } from './Button' -export { default as ButtonGroup } from './ButtonGroup' -export { default as Card } from './Card' -export { default as Chevron } from './Chevron' -export { default as Date } from './Date' -export { default as EmailTrigger } from './EmailTrigger' -export { default as Fieldset } from './Fieldset' -export { default as Form } from './Form' -export { default as Heading } from './Heading' -export { default as Hint } from './Hint' -export { default as Icon } from './Icon' -export { default as Intro } from './Intro' -export { default as KeyElegibilityCrieriaList } from './KeyElegibilityCrieriaList' -export { default as Legend } from './Legend' -export { default as Label } from './Label' -export { default as LifeEventSection } from './LifeEventSection' -export { default as Modal } from './Modal' -export { default as NoticesList } from './NoticesList' -export { default as ObfuscatedLink } from './ObfuscatedLink' -export { default as Paragraph } from './Paragraph' -export { default as PrintButton } from './PrintButton' -export { default as ProcessList } from './ProcessList' -export { default as Radio } from './Radio' -export { default as RadioGroup } from './RadioGroup' -export { default as RelativeBenefitList } from './RelativeBenefitList' -export { default as ResultsView } from './ResultsView' -export { default as ShareTrigger } from './ShareTrigger' -export { default as StepIndicator } from './StepIndicator' -export { default as StepBackButton } from './StepBackButton' -export { default as Select } from './Select' -export { default as Summary } from './Summary' -export { default as TextInput } from './TextInput' -export { default as TimeIndicator } from './TimeIndicator' -export { default as VerifySelectionsView } from './VerifySelectionsView' +import Alert from './Alert' +import Accordion from './Accordion' +import BenefitAccordionGroup from './BenefitAccordionGroup' +import Button from './Button' +import ButtonGroup from './ButtonGroup' +import Card from './Card' +import Chevron from './Chevron' +import Date from './Date' +import EmailTrigger from './EmailTrigger' +import Fieldset from './Fieldset' +import Form from './Form' +import Heading from './Heading' +import Hint from './Hint' +import Icon from './Icon' +import Intro from './Intro' +import KeyElegibilityCrieriaList from './KeyElegibilityCrieriaList' +import Legend from './Legend' +import Label from './Label' +import LifeEventSection from './LifeEventSection' +import Modal from './Modal' +import NoticesList from './NoticesList' +import ObfuscatedLink from './ObfuscatedLink' +import Paragraph from './Paragraph' +import PrintButton from './PrintButton' +import ProcessList from './ProcessList' +import Radio from './Radio' +import RadioGroup from './RadioGroup' +import RelativeBenefitList from './RelativeBenefitList' +import ResultsView from './ResultsView' +import ShareTrigger from './ShareTrigger' +import StepIndicator from './StepIndicator' +import StepBackButton from './StepBackButton' +import Select from './Select' +import Summary from './Summary' +import TextInput from './TextInput' +import TimeIndicator from './TimeIndicator' +import VerifySelectionsView from './VerifySelectionsView' + +export { + Alert, + Accordion, + BenefitAccordionGroup, + Button, + ButtonGroup, + Card, + Chevron, + Date, + EmailTrigger, + Fieldset, + Form, + Heading, + Hint, + Icon, + Intro, + KeyElegibilityCrieriaList, + Legend, + Label, + LifeEventSection, + Modal, + NoticesList, + ObfuscatedLink, + Paragraph, + PrintButton, + ProcessList, + Radio, + RadioGroup, + RelativeBenefitList, + ResultsView, + ShareTrigger, + StepIndicator, + StepBackButton, + Select, + Summary, + TextInput, + TimeIndicator, + VerifySelectionsView, +} diff --git a/benefit-finder/src/shared/hooks/index.js b/benefit-finder/src/shared/hooks/index.js index 75bdc17d2..b40171f61 100644 --- a/benefit-finder/src/shared/hooks/index.js +++ b/benefit-finder/src/shared/hooks/index.js @@ -1,4 +1,11 @@ -export { default as useCrazyEggUpdate } from './useCrazyEggUpdate' -export { default as useHandleClassName } from './useHandleClassName' -export { default as useHandleUnload } from './useHandleUnload' -export { default as useResetElement } from './useResetElement' +import useCrazyEggUpdate from './useCrazyEggUpdate' +import useHandleClassName from './useHandleClassName' +import useHandleUnload from './useHandleUnload' +import useResetElement from './useResetElement' + +export { + useCrazyEggUpdate, + useHandleClassName, + useHandleUnload, + useResetElement, +} diff --git a/benefit-finder/src/shared/utils/index.js b/benefit-finder/src/shared/utils/index.js index b7d8cd1b4..cccc324b1 100644 --- a/benefit-finder/src/shared/utils/index.js +++ b/benefit-finder/src/shared/utils/index.js @@ -1,9 +1,21 @@ -export { default as buildURIParameter } from './buildURIParameter' -export { default as errorHandling } from './errorHandling' -export { default as createMarkup } from './createMarkup' -export { default as dataLayerUtils } from './dataLayerUtils' -export { default as dateInputValidation } from './dateInputValidation' -export { default as handleSurvey } from './handleSurvey' -export { default as parseDate } from './parseDate' -export { default as scrollLock } from './scrollLock' -export { default as windowSize } from './windowSize' +import buildURIParameter from './buildURIParameter' +import errorHandling from './errorHandling' +import createMarkup from './createMarkup' +import dataLayerUtils from './dataLayerUtils' +import dateInputValidation from './dateInputValidation' +import handleSurvey from './handleSurvey' +import parseDate from './parseDate' +import scrollLock from './scrollLock' +import windowSize from './windowSize' + +export { + buildURIParameter, + errorHandling, + createMarkup, + dataLayerUtils, + dateInputValidation, + handleSurvey, + parseDate, + scrollLock, + windowSize, +} From e54ccb1bec52fc5e8287f91ec35b1e561ae3b685 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Thu, 12 Sep 2024 17:20:12 -0400 Subject: [PATCH 08/12] PXBF-1799-asset-path-alias: update export file --- benefit-finder/vite-config/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/benefit-finder/vite-config/index.js b/benefit-finder/vite-config/index.js index ecadd74f2..31902e0fc 100644 --- a/benefit-finder/vite-config/index.js +++ b/benefit-finder/vite-config/index.js @@ -1,3 +1,5 @@ -export { default as distTargets } from './dist' -export { default as testConfig } from './test' +import distTargets from './dist' +import testConfig from './test' + export * as transformers from './transformers' +export { distTargets, testConfig } From 55f9135ef6ba6d7cf0a752cb3c8b96292aaa8914 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Thu, 12 Sep 2024 17:20:19 -0400 Subject: [PATCH 09/12] PXBF-1799-asset-path-alias: update color exports --- benefit-finder/src/shared/styles/colors/_index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/benefit-finder/src/shared/styles/colors/_index.js b/benefit-finder/src/shared/styles/colors/_index.js index ed3fb10ff..f262865dd 100644 --- a/benefit-finder/src/shared/styles/colors/_index.js +++ b/benefit-finder/src/shared/styles/colors/_index.js @@ -7,14 +7,17 @@ const Colors = { offBlack: '#1b1b1b', white: '#fff', bannerBlue: '#112f4e', + grey: '#757575', mediumGrey: '#979797', darkMediumGrey: '#3d4551', baseGrey: '#dcdee0', baseLightGrey: '#f0f0f0', - lightTeal: '#e7f6f8', + lightTeal: '#d2ebf1', pureBlack: '#000', electricBlue: '#0050d8', teal: '#00bde3', + mediumTeal: '#ccecf2', + darkTeal: '#0081a1', alertRed: '#b50909', greenCheck: '#009831', } From 152b5c806f9735470ddb411a295c79c838183815 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Thu, 12 Sep 2024 17:37:53 -0400 Subject: [PATCH 10/12] PXBF-1799-asset-path-alias: move alias config to object for assignment --- benefit-finder/vite.config.mjs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/benefit-finder/vite.config.mjs b/benefit-finder/vite.config.mjs index 7a9897e3f..742204148 100644 --- a/benefit-finder/vite.config.mjs +++ b/benefit-finder/vite.config.mjs @@ -43,20 +43,22 @@ const server = test ? testServer : devServer const INPUT_DIR = './src' +const aliasConfig = { + '@': path.resolve(INPUT_DIR), + '@api': path.resolve(INPUT_DIR, './shared/api'), + '@components': path.resolve(INPUT_DIR, './shared/components'), + '@hooks': path.resolve(INPUT_DIR, './shared/hooks'), + '@locales': path.resolve(INPUT_DIR, './shared/locales'), + '@styles': path.resolve(INPUT_DIR, './shared/styles'), + '@utils': path.resolve(INPUT_DIR, './shared/utils'), +} + // https://vitejs.dev/config/ export default defineConfig({ base: './', plugins: [react(), eslint(), copy(copyConfig)], resolve: { - alias: { - '@': path.resolve(INPUT_DIR), - '@api': path.resolve(INPUT_DIR, './shared/api'), - '@components': path.resolve(INPUT_DIR, './shared/components'), - '@hooks': path.resolve(INPUT_DIR, './shared/hooks'), - '@locales': path.resolve(INPUT_DIR, './shared/locales'), - '@styles': path.resolve(INPUT_DIR, './shared/styles'), - '@utils': path.resolve(INPUT_DIR, './shared/utils'), - }, + alias: aliasConfig, }, optimizeDeps: { exclude: ['@storybook/blocks'], From 1a2215bc7d3efe7e04637de0d3349efa0fe21c0d Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Thu, 12 Sep 2024 18:57:33 -0400 Subject: [PATCH 11/12] PXBF-1799-asset-path-alias: handle manual chunks in storybook --- benefit-finder/.storybook/main.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/benefit-finder/.storybook/main.js b/benefit-finder/.storybook/main.js index 593281865..9457c7cdc 100644 --- a/benefit-finder/.storybook/main.js +++ b/benefit-finder/.storybook/main.js @@ -1,3 +1,5 @@ +import { mergeConfig } from 'vite' + const config = { staticDirs: ['../themes'], stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx)'], @@ -15,5 +17,18 @@ const config = { core: { builder: '@storybook/builder-vite', }, -} + viteFinal(config) { + return mergeConfig(config, { + build: { + chunkSizeWarningLimit: '1000', + rollupOptions: { + output: { + manualChunks: (id) => id.includes('src/App/index.jsx') ? 'app-chunk' : false, + }, + }, + }, + }); + }, +}; + export default config From 76d251a9a35e891d4285fec94197e27e6dd87609 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Thu, 12 Sep 2024 18:57:59 -0400 Subject: [PATCH 12/12] PXBF-1799-asset-path-alias: alias import paths for storybook --- benefit-finder/src/App/index.stories.jsx | 2 +- .../components/BenefitAccordionGroup/index.stories.jsx | 6 +++--- benefit-finder/src/shared/components/Date/index.stories.jsx | 2 +- .../src/shared/components/Fieldset/index.stories.jsx | 4 ++-- .../src/shared/components/Intro/index.stories.jsx | 4 ++-- .../components/KeyElegibilityCrieriaList/index.stories.jsx | 4 ++-- .../shared/components/LifeEventSection/index.stories.jsx | 4 ++-- .../src/shared/components/NoticesList/index.stories.jsx | 2 +- .../shared/components/RelativeBenefitList/index.stories.jsx | 2 +- .../src/shared/components/ResultsView/index.stories.jsx | 4 ++-- .../src/shared/components/Select/index.stories.jsx | 2 +- .../src/shared/components/StepIndicator/index.stories.jsx | 2 +- .../src/shared/components/Summary/index.stories.jsx | 2 +- .../components/VerifySelectionsView/index.stories.jsx | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/benefit-finder/src/App/index.stories.jsx b/benefit-finder/src/App/index.stories.jsx index 2103dc219..3ec135477 100644 --- a/benefit-finder/src/App/index.stories.jsx +++ b/benefit-finder/src/App/index.stories.jsx @@ -1,5 +1,5 @@ import App from './index.jsx' -import content from '../shared/api/mock-data/current.js' +import content from '@api/mock-data/current.js' const { data } = JSON.parse(content) diff --git a/benefit-finder/src/shared/components/BenefitAccordionGroup/index.stories.jsx b/benefit-finder/src/shared/components/BenefitAccordionGroup/index.stories.jsx index 1082aaade..8c42cf0a4 100644 --- a/benefit-finder/src/shared/components/BenefitAccordionGroup/index.stories.jsx +++ b/benefit-finder/src/shared/components/BenefitAccordionGroup/index.stories.jsx @@ -1,8 +1,8 @@ // import { useState } from 'react' import BenefitAccordionGroup from './index.jsx' -import content from '../../api/mock-data/current.js' -import * as en from '../../locales/en/en.json' -import * as es from '../../locales/es/es.json' +import content from '@api/mock-data/current.js' +import * as en from '@locales/en/en.json' +import * as es from '@locales/es/es.json' const { data } = JSON.parse(content) const { benefits } = data diff --git a/benefit-finder/src/shared/components/Date/index.stories.jsx b/benefit-finder/src/shared/components/Date/index.stories.jsx index c4ff7844b..699a3e8b1 100644 --- a/benefit-finder/src/shared/components/Date/index.stories.jsx +++ b/benefit-finder/src/shared/components/Date/index.stories.jsx @@ -1,5 +1,5 @@ import Date from './index.jsx' -import * as en from '../../locales/en/en.json' +import * as en from '@locales/en/en.json' export default { component: Date, diff --git a/benefit-finder/src/shared/components/Fieldset/index.stories.jsx b/benefit-finder/src/shared/components/Fieldset/index.stories.jsx index 54a53a5a2..06af81c21 100644 --- a/benefit-finder/src/shared/components/Fieldset/index.stories.jsx +++ b/benefit-finder/src/shared/components/Fieldset/index.stories.jsx @@ -1,6 +1,6 @@ import Fieldset from './index.jsx' -import { TextInput } from '../index' -import * as en from '../../locales/en/en.json' +import TextInput from '@components/TextInput' +import * as en from '@locales/en/en.json' const ui = en.errorText diff --git a/benefit-finder/src/shared/components/Intro/index.stories.jsx b/benefit-finder/src/shared/components/Intro/index.stories.jsx index 8ef6326be..da7da39fc 100644 --- a/benefit-finder/src/shared/components/Intro/index.stories.jsx +++ b/benefit-finder/src/shared/components/Intro/index.stories.jsx @@ -1,6 +1,6 @@ import Intro from './index.jsx' -import content from '../../api/mock-data/current.js' -import * as en from '../../locales/en/en.json' +import content from '@api/mock-data/current.js' +import * as en from '@locales/en/en.json' const { data } = JSON.parse(content) const { lifeEventForm } = data diff --git a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.stories.jsx b/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.stories.jsx index 6384df25b..4b080fc1a 100644 --- a/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.stories.jsx +++ b/benefit-finder/src/shared/components/KeyElegibilityCrieriaList/index.stories.jsx @@ -1,6 +1,6 @@ import KeyElegibilityCrieriaList from './index.jsx' -import content from '../../api/mock-data/current.js' -import * as en from '../../locales/en/en.json' +import content from '@api/mock-data/current.js' +import * as en from '@locales/en/en.json' const { resultsView } = en diff --git a/benefit-finder/src/shared/components/LifeEventSection/index.stories.jsx b/benefit-finder/src/shared/components/LifeEventSection/index.stories.jsx index ba15302c3..027d1464c 100644 --- a/benefit-finder/src/shared/components/LifeEventSection/index.stories.jsx +++ b/benefit-finder/src/shared/components/LifeEventSection/index.stories.jsx @@ -1,6 +1,6 @@ import LifeEventSection from './index.jsx' -import content from '../../api/mock-data/current.js' -import * as en from '../../locales/en/en.json' +import content from '@api/mock-data/current.js' +import * as en from '@locales/en/en.json' const { data } = JSON.parse(content) const { lifeEventForm } = data diff --git a/benefit-finder/src/shared/components/NoticesList/index.stories.jsx b/benefit-finder/src/shared/components/NoticesList/index.stories.jsx index da0cef9f8..15dacd814 100644 --- a/benefit-finder/src/shared/components/NoticesList/index.stories.jsx +++ b/benefit-finder/src/shared/components/NoticesList/index.stories.jsx @@ -1,5 +1,5 @@ import NoticesList from './index.jsx' -import * as en from '../../locales/en/en.json' +import * as en from '@locales/en/en.json' const { intro } = en diff --git a/benefit-finder/src/shared/components/RelativeBenefitList/index.stories.jsx b/benefit-finder/src/shared/components/RelativeBenefitList/index.stories.jsx index f64439209..4c63592bb 100644 --- a/benefit-finder/src/shared/components/RelativeBenefitList/index.stories.jsx +++ b/benefit-finder/src/shared/components/RelativeBenefitList/index.stories.jsx @@ -1,5 +1,5 @@ import RelativeBenefitList from './index.jsx' -import content from '../../api/mock-data/current.js' +import content from '@api/mock-data/current.js' const { data } = JSON.parse(content) diff --git a/benefit-finder/src/shared/components/ResultsView/index.stories.jsx b/benefit-finder/src/shared/components/ResultsView/index.stories.jsx index 35a5702a6..7ff26f3f5 100644 --- a/benefit-finder/src/shared/components/ResultsView/index.stories.jsx +++ b/benefit-finder/src/shared/components/ResultsView/index.stories.jsx @@ -1,6 +1,6 @@ import ResultsView from './index.jsx' -import content from '../../api/mock-data/current.js' -import * as en from '../../locales/en/en.json' +import content from '@api/mock-data/current.js' +import * as en from '@locales/en/en.json' const { resultsView } = en const { data } = JSON.parse(content) diff --git a/benefit-finder/src/shared/components/Select/index.stories.jsx b/benefit-finder/src/shared/components/Select/index.stories.jsx index c0754ede5..117b661a9 100644 --- a/benefit-finder/src/shared/components/Select/index.stories.jsx +++ b/benefit-finder/src/shared/components/Select/index.stories.jsx @@ -1,5 +1,5 @@ import Select from './index.jsx' -import * as en from '../../locales/en/en.json' +import * as en from '@locales/en/en.json' const { select } = en diff --git a/benefit-finder/src/shared/components/StepIndicator/index.stories.jsx b/benefit-finder/src/shared/components/StepIndicator/index.stories.jsx index c46a266cd..17e1cce10 100644 --- a/benefit-finder/src/shared/components/StepIndicator/index.stories.jsx +++ b/benefit-finder/src/shared/components/StepIndicator/index.stories.jsx @@ -1,5 +1,5 @@ import StepIndicator from './index.jsx' -import content from '../../api/mock-data/current.js' +import content from '@api/mock-data/current.js' const { data } = JSON.parse(content) const { lifeEventForm } = data diff --git a/benefit-finder/src/shared/components/Summary/index.stories.jsx b/benefit-finder/src/shared/components/Summary/index.stories.jsx index 78724ce8c..ac2dbd802 100644 --- a/benefit-finder/src/shared/components/Summary/index.stories.jsx +++ b/benefit-finder/src/shared/components/Summary/index.stories.jsx @@ -1,5 +1,5 @@ import Summary from './index.jsx' -import * as en from '../../locales/en/en.json' +import * as en from '@locales/en/en.json' const { heading, list, cta } = en.resultsView.summaryBox diff --git a/benefit-finder/src/shared/components/VerifySelectionsView/index.stories.jsx b/benefit-finder/src/shared/components/VerifySelectionsView/index.stories.jsx index 34b601d63..ddf9b9d35 100644 --- a/benefit-finder/src/shared/components/VerifySelectionsView/index.stories.jsx +++ b/benefit-finder/src/shared/components/VerifySelectionsView/index.stories.jsx @@ -1,5 +1,5 @@ import VerifySelectionsView from './index.jsx' -import * as en from '../../locales/en/en.json' +import * as en from '@locales/en/en.json' const { verifySelectionsView } = en