qpp-style 2.0.1 → 2.0.2-sm.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +10 -0
- package/.editorconfig +22 -0
- package/.eslintignore +5 -0
- package/.eslintrc.js +31 -0
- package/.husky/pre-commit +5 -0
- package/README.md +35 -55
- package/components/Accordion/Accordion.stories.js +20 -0
- package/components/Accordion/index.jsx +93 -0
- package/components/Alert/Alert.stories.js +61 -0
- package/components/Alert/index.js +53 -0
- package/components/Breadcrumb/Breadcrumb.md +28 -0
- package/components/Breadcrumb/index.js +83 -0
- package/components/Button/index.js +90 -0
- package/components/CalloutBox/index.js +109 -0
- package/components/Card/index.js +137 -0
- package/components/Details/Details.stories.js +63 -0
- package/components/Details/DetailsIcons.js +50 -0
- package/components/Details/index.js +53 -0
- package/components/Dropdown/index.js +85 -0
- package/components/DropdownButton/DropdownButton.stories.js +127 -0
- package/components/DropdownButton/Menu.js +25 -0
- package/components/DropdownButton/MenuButton.js +41 -0
- package/components/DropdownButton/MenuItem.js +25 -0
- package/components/DropdownButton/MenuItemLink.js +27 -0
- package/components/Error/Collapsible.jsx +88 -0
- package/components/Error/ErrorUI.jsx +31 -0
- package/components/Error/error.js +26 -0
- package/components/FlashNotification/FlashNotificationUI.jsx +91 -0
- package/components/FlashNotification/index.js +30 -0
- package/components/Footer/FooterUI.jsx +212 -0
- package/components/Footer/SocialLinks.jsx +60 -0
- package/components/Footer/Subscribe.jsx +34 -0
- package/components/Footer/footer.js +20 -0
- package/components/GovBanner/index.js +117 -0
- package/components/Header/Header.md +111 -0
- package/components/Header/HeaderAccountMenu.jsx +94 -0
- package/components/Header/HeaderCancel.jsx +16 -0
- package/components/Header/HeaderContainer.jsx +74 -0
- package/components/Header/HeaderLogo.jsx +42 -0
- package/components/Header/HeaderMenuButton.js +50 -0
- package/components/Header/HeaderMenuItem.jsx +239 -0
- package/components/Header/HeaderMenuLink.js +56 -0
- package/components/Header/HeaderMenuSignOutButton.js +62 -0
- package/components/Header/HeaderMobileButton.js +37 -0
- package/components/Header/HeaderUI.jsx +167 -0
- package/components/Header/HelpIcon.jsx +32 -0
- package/components/Header/ImpersonatorBanner.jsx +82 -0
- package/components/Header/NavigationButtonIcon.jsx +27 -0
- package/components/Header/default-content.json +280 -0
- package/components/Header/header.js +40 -0
- package/components/Header/hooks.js +66 -0
- package/components/Header/utag-helpers.js +9 -0
- package/components/Infotip/Infotip.jsx +75 -0
- package/components/Infotip/InfotipIcon.jsx +41 -0
- package/components/Infotip/index.js +3 -0
- package/components/Link/index.js +61 -0
- package/components/Modal/LegacyModal.jsx +72 -0
- package/components/Modal/Modal.jsx +140 -0
- package/components/Modal/index.jsx +22 -0
- package/components/NotificationBanner/CollapsedView.js +39 -0
- package/components/NotificationBanner/ExpandedView.js +45 -0
- package/components/NotificationBanner/index.js +221 -0
- package/components/SanitizedContent/index.jsx +200 -0
- package/components/Search/index.js +98 -0
- package/components/SessionDialog/sessionDialog.js +26 -0
- package/components/SessionDialogUI.jsx +261 -0
- package/components/SideNav/AnimationGroup/AnimationGroup.jsx +27 -0
- package/components/SideNav/Chart/ScoreChart.jsx +268 -0
- package/components/SideNav/Chart/__tests__/ScoreChart.test.js +22 -0
- package/components/SideNav/Chart/__tests__/__snapshots__/ScoreChart.test.js.snap +173 -0
- package/components/SideNav/Chart/index.js +3 -0
- package/components/SideNav/Content/LevelOneContent.jsx +199 -0
- package/components/SideNav/Content/LevelTwoContent.jsx +216 -0
- package/components/SideNav/Content/SelectRole/index.js +77 -0
- package/components/SideNav/Content/SelectRole/utils.js +140 -0
- package/components/SideNav/Content/index.js +4 -0
- package/components/SideNav/Details/IndividualDetails.jsx +18 -0
- package/components/SideNav/Details/PracticeDetails.jsx +45 -0
- package/components/SideNav/Details/index.js +4 -0
- package/components/SideNav/Links/CmsSwitchLink.jsx +41 -0
- package/components/SideNav/Links/NavItemInline.jsx +54 -0
- package/components/SideNav/Links/NavLinkContainer.jsx +38 -0
- package/components/SideNav/Links/NavLinkDrawer.jsx +276 -0
- package/components/SideNav/Links/NavLinkInline.jsx +110 -0
- package/components/SideNav/Links/NavLinkToggle.jsx +34 -0
- package/components/SideNav/Links/index.js +13 -0
- package/components/SideNav/SideNav.md +50 -0
- package/components/SideNav/UI/SideNavUI.jsx +298 -0
- package/components/SideNav/UI/default-content.json +117 -0
- package/components/SideNav/UI/index.js +3 -0
- package/components/SideNav/UI/utils.js +0 -0
- package/components/SideNav/helpers.js +351 -0
- package/components/SideNav/index.js +53 -0
- package/components/Tabs/Tab.js +26 -0
- package/components/Tabs/TabPanel.js +41 -0
- package/components/Tabs/index.js +100 -0
- package/components/TextInput/index.js +137 -0
- package/components/Tooltip/Tooltip.jsx +88 -0
- package/components/Tooltip/Tooltip.stories.js +80 -0
- package/components/Tooltip/index.js +3 -0
- package/components/Tooltip/position.js +68 -0
- package/components/hooks/useGetConfig.js +75 -0
- package/components/index.js +128 -0
- package/coverage/clover.xml +1453 -0
- package/coverage/coverage-final.json +71 -0
- package/coverage/lcov-report/Tooltip.jsx.html +232 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/components/Accordion/index.html +116 -0
- package/coverage/lcov-report/components/Accordion/index.jsx.html +364 -0
- package/coverage/lcov-report/components/Button/index.html +116 -0
- package/coverage/lcov-report/components/Button/index.js.html +355 -0
- package/coverage/lcov-report/components/Error/Collapsible.jsx.html +349 -0
- package/coverage/lcov-report/components/Error/ErrorUI.jsx.html +178 -0
- package/coverage/lcov-report/components/Error/index.html +131 -0
- package/coverage/lcov-report/components/Footer/FooterUI.jsx.html +706 -0
- package/coverage/lcov-report/components/Footer/SocialLinks.jsx.html +265 -0
- package/coverage/lcov-report/components/Footer/Subscribe.jsx.html +187 -0
- package/coverage/lcov-report/components/Footer/index.html +146 -0
- package/coverage/lcov-report/components/GovBanner/index.html +116 -0
- package/coverage/lcov-report/components/GovBanner/index.js.html +436 -0
- package/coverage/lcov-report/components/Header/HeaderAccountMenu.jsx.html +367 -0
- package/coverage/lcov-report/components/Header/HeaderCancel.jsx.html +133 -0
- package/coverage/lcov-report/components/Header/HeaderContainer.jsx.html +307 -0
- package/coverage/lcov-report/components/Header/HeaderLogo.jsx.html +211 -0
- package/coverage/lcov-report/components/Header/HeaderMenuButton.js.html +235 -0
- package/coverage/lcov-report/components/Header/HeaderMenuItem.jsx.html +802 -0
- package/coverage/lcov-report/components/Header/HeaderMenuLink.js.html +253 -0
- package/coverage/lcov-report/components/Header/HeaderMenuSignOutButton.js.html +271 -0
- package/coverage/lcov-report/components/Header/HeaderMobileButton.js.html +196 -0
- package/coverage/lcov-report/components/Header/HeaderUI.jsx.html +586 -0
- package/coverage/lcov-report/components/Header/HelpIcon.jsx.html +181 -0
- package/coverage/lcov-report/components/Header/ImpersonatorBanner.jsx.html +328 -0
- package/coverage/lcov-report/components/Header/NavigationButtonIcon.jsx.html +166 -0
- package/coverage/lcov-report/components/Header/hooks.js.html +283 -0
- package/coverage/lcov-report/components/Header/index.html +326 -0
- package/coverage/lcov-report/components/Header/utag-helpers.js.html +112 -0
- package/coverage/lcov-report/components/Infotip/Infotip.jsx.html +310 -0
- package/coverage/lcov-report/components/Infotip/InfotipIcon.jsx.html +208 -0
- package/coverage/lcov-report/components/Infotip/index.html +146 -0
- package/coverage/lcov-report/components/Infotip/index.js.html +94 -0
- package/coverage/lcov-report/components/Modal/LegacyModal.jsx.html +301 -0
- package/coverage/lcov-report/components/Modal/Modal.jsx.html +505 -0
- package/coverage/lcov-report/components/Modal/index.html +146 -0
- package/coverage/lcov-report/components/Modal/index.jsx.html +151 -0
- package/coverage/lcov-report/components/NotificationBanner/CollapsedView.js.html +202 -0
- package/coverage/lcov-report/components/NotificationBanner/ExpandedView.js.html +220 -0
- package/coverage/lcov-report/components/NotificationBanner/index.html +146 -0
- package/coverage/lcov-report/components/NotificationBanner/index.js.html +748 -0
- package/coverage/lcov-report/components/SanitizedContent/index.html +116 -0
- package/coverage/lcov-report/components/SanitizedContent/index.jsx.html +685 -0
- package/coverage/lcov-report/components/SessionDialogUI.jsx.html +868 -0
- package/coverage/lcov-report/components/SideNav/Content/SelectRole/index.html +116 -0
- package/coverage/lcov-report/components/SideNav/Content/SelectRole/utils.js.html +505 -0
- package/coverage/lcov-report/components/SideNav/helpers.js.html +1138 -0
- package/coverage/lcov-report/components/SideNav/index.html +116 -0
- package/coverage/lcov-report/components/Tooltip/Tooltip.jsx.html +349 -0
- package/coverage/lcov-report/components/Tooltip/index.html +146 -0
- package/coverage/lcov-report/components/Tooltip/index.js.html +94 -0
- package/coverage/lcov-report/components/Tooltip/position.js.html +289 -0
- package/coverage/lcov-report/components/hooks/index.html +116 -0
- package/coverage/lcov-report/components/hooks/useGetConfig.js.html +310 -0
- package/coverage/lcov-report/components/index.html +116 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +476 -0
- package/coverage/lcov-report/index.js.html +94 -0
- package/coverage/lcov-report/lib/Chevron.jsx.html +181 -0
- package/coverage/lcov-report/lib/SvgComponents.jsx.html +2200 -0
- package/coverage/lcov-report/lib/index.html +131 -0
- package/coverage/lcov-report/position.js.html +289 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/react/components/Accordion/index.html +116 -0
- package/coverage/lcov-report/react/components/Accordion/index.jsx.html +364 -0
- package/coverage/lcov-report/react/components/Button/index.html +116 -0
- package/coverage/lcov-report/react/components/Button/index.js.html +355 -0
- package/coverage/lcov-report/react/components/Dropdown/index.html +116 -0
- package/coverage/lcov-report/react/components/Dropdown/index.js.html +340 -0
- package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +349 -0
- package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +178 -0
- package/coverage/lcov-report/react/components/Error/error.js.html +163 -0
- package/coverage/lcov-report/react/components/Error/index.html +146 -0
- package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +718 -0
- package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +265 -0
- package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +187 -0
- package/coverage/lcov-report/react/components/Footer/footer.js.html +145 -0
- package/coverage/lcov-report/react/components/Footer/index.html +161 -0
- package/coverage/lcov-report/react/components/GovBanner/index.html +116 -0
- package/coverage/lcov-report/react/components/GovBanner/index.js.html +436 -0
- package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +367 -0
- package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +133 -0
- package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +307 -0
- package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +211 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +235 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +802 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +253 -0
- package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +271 -0
- package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +196 -0
- package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +586 -0
- package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +181 -0
- package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +328 -0
- package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +166 -0
- package/coverage/lcov-report/react/components/Header/header.js.html +205 -0
- package/coverage/lcov-report/react/components/Header/hooks.js.html +283 -0
- package/coverage/lcov-report/react/components/Header/index.html +341 -0
- package/coverage/lcov-report/react/components/Header/utag-helpers.js.html +112 -0
- package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +298 -0
- package/coverage/lcov-report/react/components/Infotip/InfotipContent.jsx.html +223 -0
- package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +208 -0
- package/coverage/lcov-report/react/components/Infotip/index.html +161 -0
- package/coverage/lcov-report/react/components/Infotip/index.js.html +94 -0
- package/coverage/lcov-report/react/components/Modal/LegacyModal.jsx.html +301 -0
- package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +505 -0
- package/coverage/lcov-report/react/components/Modal/index.html +146 -0
- package/coverage/lcov-report/react/components/Modal/index.jsx.html +151 -0
- package/coverage/lcov-report/react/components/NotificationBanner/CollapsedView.js.html +202 -0
- package/coverage/lcov-report/react/components/NotificationBanner/ExpandedView.js.html +220 -0
- package/coverage/lcov-report/react/components/NotificationBanner/index.html +146 -0
- package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +748 -0
- package/coverage/lcov-report/react/components/SanitizedContent/index.html +116 -0
- package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +685 -0
- package/coverage/lcov-report/react/components/SessionDialog/index.html +116 -0
- package/coverage/lcov-report/react/components/SessionDialog/sessionDialog.js.html +163 -0
- package/coverage/lcov-report/react/components/SessionDialogUI.jsx.html +868 -0
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +166 -0
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +116 -0
- package/coverage/lcov-report/react/components/SideNav/Chart/ScoreChart.jsx.html +889 -0
- package/coverage/lcov-report/react/components/SideNav/Chart/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/Chart/index.js.html +94 -0
- package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +682 -0
- package/coverage/lcov-report/react/components/SideNav/Content/LevelTwoContent.jsx.html +733 -0
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.js.html +316 -0
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/utils.js.html +505 -0
- package/coverage/lcov-report/react/components/SideNav/Content/index.html +146 -0
- package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +97 -0
- package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +139 -0
- package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +220 -0
- package/coverage/lcov-report/react/components/SideNav/Details/index.html +146 -0
- package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +97 -0
- package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +208 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +247 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +199 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +913 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +421 -0
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +187 -0
- package/coverage/lcov-report/react/components/SideNav/Links/index.html +206 -0
- package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +124 -0
- package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +1087 -0
- package/coverage/lcov-report/react/components/SideNav/UI/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +94 -0
- package/coverage/lcov-report/react/components/SideNav/helpers.js.html +1138 -0
- package/coverage/lcov-report/react/components/SideNav/index.html +131 -0
- package/coverage/lcov-report/react/components/SideNav/index.js.html +244 -0
- package/coverage/lcov-report/react/components/Tooltip/Tooltip.jsx.html +232 -0
- package/coverage/lcov-report/react/components/Tooltip/index.html +146 -0
- package/coverage/lcov-report/react/components/Tooltip/index.js.html +94 -0
- package/coverage/lcov-report/react/components/Tooltip/position.js.html +289 -0
- package/coverage/lcov-report/react/components/hooks/index.html +116 -0
- package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +310 -0
- package/coverage/lcov-report/react/components/index.html +116 -0
- package/coverage/lcov-report/react/index.html +116 -0
- package/coverage/lcov-report/react/index.js.html +178 -0
- package/coverage/lcov-report/react/lib/Chevron.jsx.html +181 -0
- package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +2200 -0
- package/coverage/lcov-report/react/lib/index.html +131 -0
- package/coverage/lcov-report/react/lib/svg-definitions.svg.html +460 -0
- package/coverage/lcov-report/react/session/index.html +161 -0
- package/coverage/lcov-report/react/session/index.js.html +100 -0
- package/coverage/lcov-report/react/session/logout.js.html +307 -0
- package/coverage/lcov-report/react/session/refresh.js.html +232 -0
- package/coverage/lcov-report/react/session/ttl.js.html +196 -0
- package/coverage/lcov-report/session/index.html +161 -0
- package/coverage/lcov-report/session/index.js.html +100 -0
- package/coverage/lcov-report/session/logout.js.html +307 -0
- package/coverage/lcov-report/session/refresh.js.html +232 -0
- package/coverage/lcov-report/session/ttl.js.html +196 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +3189 -0
- package/dist/browser.js +3 -53
- package/dist/browser.js.LICENSE.txt +70 -0
- package/dist/browser.js.map +1 -0
- package/dist/index.js +3 -53
- package/dist/index.js.LICENSE.txt +70 -0
- package/dist/index.js.map +1 -0
- package/dist/react/index.js +3 -0
- package/dist/react/index.js.LICENSE.txt +96 -0
- package/dist/react/index.js.map +1 -0
- package/fonts/PublicSans-Black.ttf +0 -0
- package/fonts/PublicSans-BlackItalic.ttf +0 -0
- package/fonts/PublicSans-Bold.ttf +0 -0
- package/fonts/PublicSans-BoldItalic.ttf +0 -0
- package/fonts/PublicSans-ExtraBold.ttf +0 -0
- package/fonts/PublicSans-ExtraBoldItalic.ttf +0 -0
- package/fonts/PublicSans-ExtraLight.ttf +0 -0
- package/fonts/PublicSans-ExtraLightItalic.ttf +0 -0
- package/fonts/PublicSans-Italic.ttf +0 -0
- package/fonts/PublicSans-Light.ttf +0 -0
- package/fonts/PublicSans-LightItalic.ttf +0 -0
- package/fonts/PublicSans-Medium.ttf +0 -0
- package/fonts/PublicSans-MediumItalic.ttf +0 -0
- package/fonts/PublicSans-Regular.ttf +0 -0
- package/fonts/PublicSans-SemiBold.ttf +0 -0
- package/fonts/PublicSans-SemiBoldItalic.ttf +0 -0
- package/fonts/PublicSans-Thin.ttf +0 -0
- package/fonts/PublicSans-ThinItalic.ttf +0 -0
- package/images/favicon/manifest.json +3 -3
- package/images/hhs-logo-black.svg +10 -0
- package/images/icon-dot-gov.svg +1 -0
- package/images/icon-https.svg +1 -0
- package/images/icons/close-x.svg +6 -0
- package/images/icons/svg/arrow-down.svg +3 -0
- package/images/icons/svg/arrow-download.svg +1 -0
- package/images/icons/svg/arrow-right.svg +1 -0
- package/images/icons/svg/arrow-up.svg +3 -0
- package/images/icons/svg/calendar.svg +1 -0
- package/images/icons/svg/checkmark.svg +7 -0
- package/images/icons/svg/chevron-down.svg +11 -0
- package/images/icons/svg/chevron-left.svg +12 -0
- package/images/icons/svg/chevron-right.svg +12 -0
- package/images/icons/svg/chevron-up.svg +12 -0
- package/images/icons/svg/clipboard.svg +1 -0
- package/images/icons/svg/close.svg +1 -0
- package/images/icons/svg/divide.svg +13 -0
- package/images/icons/svg/doctors-and-clinicians-preview.svg +10 -0
- package/images/icons/svg/download.svg +1 -0
- package/images/icons/svg/dropdown-arrow.svg +1 -0
- package/images/icons/svg/equals.svg +13 -0
- package/images/icons/svg/exclamation.svg +11 -0
- package/images/icons/svg/external.svg +1 -0
- package/images/icons/svg/file-download.svg +1 -0
- package/images/icons/svg/file-upload.svg +1 -0
- package/images/icons/svg/info.svg +20 -0
- package/images/icons/svg/manage-user-access.svg +8 -0
- package/images/icons/svg/multiply.svg +12 -0
- package/images/icons/svg/performance-feedback.svg +1 -0
- package/images/icons/svg/plus.svg +12 -0
- package/images/icons/svg/preview.svg +17 -0
- package/images/icons/svg/print.svg +1 -0
- package/images/icons/svg/registration.svg +8 -0
- package/images/icons/svg/reporting.svg +17 -0
- package/images/icons/svg/save-disk.svg +5 -0
- package/images/icons/svg/search.svg +1 -0
- package/images/icons/svg/subtract.svg +15 -0
- package/images/icons/svg/targeted-review.svg +15 -0
- package/images/icons/svg/tooltip-question.svg +1 -0
- package/images/icons/svg/trash.svg +1 -0
- package/images/icons/svg/upload.svg +1 -0
- package/images/us_flag_small.png +0 -0
- package/index.js +31 -0
- package/jest/mediaFileTransformer.js +9 -0
- package/jest.config.js +195 -0
- package/lib/Chevron.jsx +32 -0
- package/lib/SvgComponents.jsx +585 -0
- package/lib/svg-definitions.svg +125 -0
- package/package.json +76 -54
- package/{js/session → session}/index.js +2 -4
- package/session/logout.js +74 -0
- package/{js/session → session}/refresh.js +9 -7
- package/session/ttl.js +37 -0
- package/storybook-static/229.630347465201d1822126.manager.bundle.js +1 -0
- package/storybook-static/295.aa3c5122636a27ad7c7b.manager.bundle.js +1 -0
- package/storybook-static/468.d976c69e47003b4dcfa3.manager.bundle.js +2 -0
- package/storybook-static/468.d976c69e47003b4dcfa3.manager.bundle.js.LICENSE.txt +94 -0
- package/storybook-static/51.fc4b02f2a75c894ae64e.manager.bundle.js +2 -0
- package/storybook-static/51.fc4b02f2a75c894ae64e.manager.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/551.45aead073703cc6fb12b.manager.bundle.js +1 -0
- package/storybook-static/807.1a7f4dcf15e4696572ca.manager.bundle.js +2 -0
- package/storybook-static/807.1a7f4dcf15e4696572ca.manager.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/897.9b5fee8cc7074607c812.manager.bundle.js +2 -0
- package/storybook-static/897.9b5fee8cc7074607c812.manager.bundle.js.LICENSE.txt +12 -0
- package/storybook-static/935.532759f0652585685af7.manager.bundle.js +1 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/index.html +59 -0
- package/storybook-static/main.ad4edcd27d527a119d7a.manager.bundle.js +1 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/runtime~main.b165398bf7ef3e30d431.manager.bundle.js +1 -0
- package/styles/_global.scss +81 -59
- package/styles/_main.scss +11 -3
- package/styles/_paths.scss +1 -1
- package/styles/_qpp-style.scss +7 -4
- package/styles/components/_accordion.scss +266 -149
- package/styles/components/_alerts.scss +5 -7
- package/styles/components/_autocomplete.scss +47 -0
- package/styles/components/_breadcrumbs.scss +18 -17
- package/styles/components/_buttons.scss +545 -275
- package/styles/components/_error-page.scss +56 -0
- package/styles/components/_flash-notification.scss +98 -0
- package/styles/components/_fonts.scss +12 -13
- package/styles/components/_forms.scss +144 -70
- package/styles/components/_grid.scss +26 -20
- package/styles/components/_info-modal.scss +92 -19
- package/styles/components/_links.scss +4 -3
- package/styles/components/_modals.scss +10 -9
- package/styles/components/_notification-banner.scss +165 -0
- package/styles/components/_panels.scss +23 -21
- package/styles/components/_pie-chart.scss +3 -3
- package/styles/components/_score-chart.scss +135 -105
- package/styles/components/_spinner.scss +7 -0
- package/styles/components/_tables.scss +96 -72
- package/styles/components/_tabs.scss +69 -0
- package/styles/components/_text.scss +114 -48
- package/styles/components/_tooltip.scss +23 -0
- package/styles/components/_variables.scss +87 -58
- package/styles/components/_wells.scss +39 -29
- package/styles/qppds/README.md +0 -0
- package/styles/qppds/base/_backgrounds.scss +7 -0
- package/styles/qppds/base/_fonts.scss +50 -0
- package/styles/qppds/base/_icon.scss +31 -0
- package/styles/qppds/base/_layout.scss +5 -0
- package/styles/qppds/base/_typography.scss +97 -0
- package/styles/qppds/base/index.scss +8 -0
- package/styles/qppds/components/_alert.scss +101 -0
- package/styles/qppds/components/_breadcrumbs.scss +91 -0
- package/styles/qppds/components/_button.scss +306 -0
- package/styles/qppds/components/_card.scss +175 -0
- package/styles/qppds/components/_checkbox.scss +199 -0
- package/styles/qppds/components/_circular-loader.scss +47 -0
- package/styles/qppds/components/_details.scss +90 -0
- package/styles/qppds/components/_dropdown-menu.scss +125 -0
- package/styles/qppds/components/_dropdown.scss +56 -0
- package/styles/qppds/components/_footer.scss +606 -0
- package/styles/qppds/components/_gov-banner.scss +344 -0
- package/styles/qppds/components/_header.scss +913 -0
- package/styles/qppds/components/_link.scss +52 -0
- package/styles/qppds/components/_modal.scss +118 -0
- package/styles/qppds/components/_page-header.scss +104 -0
- package/styles/qppds/components/_pagination.scss +227 -0
- package/styles/qppds/components/_process-list.scss +104 -0
- package/styles/qppds/components/_radio-button.scss +184 -0
- package/styles/qppds/components/_search.scss +118 -0
- package/styles/qppds/components/_sidebar.scss +10 -0
- package/styles/qppds/components/_step-indicator.scss +190 -0
- package/styles/qppds/components/_table.scss +157 -0
- package/styles/qppds/components/_tabs.scss +197 -0
- package/styles/qppds/components/_text-input.scss +60 -0
- package/styles/qppds/components/index.scss +24 -0
- package/styles/qppds/components/sidebar/_animations.scss +38 -0
- package/styles/{components → qppds/components}/sidebar/_cms.scss +19 -10
- package/styles/{components → qppds/components}/sidebar/_details.scss +25 -21
- package/styles/qppds/components/sidebar/_links.scss +462 -0
- package/styles/qppds/components/sidebar/_select-role-dropdown.scss +21 -0
- package/styles/qppds/components/sidebar/_sidebar-animation.scss +125 -0
- package/styles/qppds/components/sidebar/_sidebar-tooltip.scss +33 -0
- package/styles/qppds/components/sidebar/_sidebar.scss +146 -0
- package/styles/qppds/components/sidebar/project-specific/_wi.scss +42 -0
- package/styles/qppds/index.scss +4 -0
- package/styles/qppds/settings/_functions.scss +6 -0
- package/styles/qppds/settings/_index.scss +3 -0
- package/styles/qppds/settings/mixins/_borders.scss +6 -0
- package/styles/qppds/settings/mixins/_focus.scss +28 -0
- package/styles/qppds/settings/mixins/_icons.scss +43 -0
- package/styles/qppds/settings/mixins/_index.scss +8 -0
- package/styles/qppds/settings/mixins/_layout.scss +74 -0
- package/styles/qppds/settings/mixins/_lists.scss +12 -0
- package/styles/qppds/settings/mixins/_table.scss +91 -0
- package/styles/qppds/settings/mixins/_type.scss +89 -0
- package/styles/qppds/settings/mixins/_visually-hidden.scss +30 -0
- package/styles/qppds/settings/variables/_color.scss +86 -0
- package/styles/qppds/settings/variables/_index.scss +4 -0
- package/styles/qppds/settings/variables/_layout.scss +69 -0
- package/styles/qppds/settings/variables/_type.scss +135 -0
- package/styles/qppds/settings/variables/_z-index.scss +8 -0
- package/styles/qppds/utilities/_background-color.scss +134 -0
- package/styles/qppds/utilities/_color.scss +40 -0
- package/styles/qppds/utilities/_display-visibility.scss +83 -0
- package/styles/qppds/utilities/_flexbox.scss +240 -0
- package/styles/qppds/utilities/_font-family.scss +9 -0
- package/styles/qppds/utilities/_font-size.scss +8 -0
- package/styles/qppds/utilities/_font-weight.scss +8 -0
- package/styles/qppds/utilities/_gap.scss +38 -0
- package/styles/qppds/utilities/_height.scss +79 -0
- package/styles/qppds/utilities/_list-style.scss +18 -0
- package/styles/qppds/utilities/_margin.scss +136 -0
- package/styles/qppds/utilities/_padding.scss +76 -0
- package/styles/qppds/utilities/_position.scss +24 -0
- package/styles/qppds/utilities/_text-align.scss +40 -0
- package/styles/qppds/utilities/_text-transform.scss +7 -0
- package/styles/qppds/utilities/_truncate.scss +8 -0
- package/styles/qppds/utilities/_vertical-align.scss +72 -0
- package/styles/qppds/utilities/_width.scss +81 -0
- package/styles/qppds/utilities/index.scss +17 -0
- package/styles/qppds.scss +2 -0
- package/styles/third-party/_legacy-bootstrap.scss +19 -0
- package/styles/third-party/legacy-bootstrap/_buttons.scss +126 -0
- package/styles/third-party/legacy-bootstrap/_dropdowns.scss +211 -0
- package/styles/third-party/legacy-bootstrap/_forms.scss +510 -0
- package/styles/third-party/legacy-bootstrap/_grid.scss +73 -0
- package/styles/third-party/legacy-bootstrap/_mixins.scss +27 -0
- package/styles/third-party/legacy-bootstrap/_navbar.scss +644 -0
- package/styles/third-party/legacy-bootstrap/_navs.scss +193 -0
- package/styles/third-party/legacy-bootstrap/_normalize.scss +385 -0
- package/styles/third-party/legacy-bootstrap/_scaffolding.scss +116 -0
- package/styles/third-party/legacy-bootstrap/_variables.scss +858 -0
- package/styles/third-party/legacy-bootstrap/mixins/_buttons.scss +70 -0
- package/styles/third-party/legacy-bootstrap/mixins/_clearfix.scss +22 -0
- package/styles/third-party/legacy-bootstrap/mixins/_forms.scss +108 -0
- package/styles/third-party/legacy-bootstrap/mixins/_grid-framework.scss +86 -0
- package/styles/third-party/legacy-bootstrap/mixins/_grid.scss +112 -0
- package/styles/third-party/legacy-bootstrap/mixins/_labels.scss +12 -0
- package/styles/third-party/legacy-bootstrap/mixins/_nav-divider.scss +10 -0
- package/styles/third-party/legacy-bootstrap/mixins/_nav-vertical-align.scss +9 -0
- package/styles/third-party/legacy-bootstrap/mixins/_opacity.scss +7 -0
- package/styles/third-party/legacy-bootstrap/mixins/_panels.scss +30 -0
- package/styles/third-party/legacy-bootstrap/mixins/_reset-filter.scss +7 -0
- package/styles/third-party/legacy-bootstrap/mixins/_reset-text.scss +18 -0
- package/styles/third-party/legacy-bootstrap/mixins/_resize.scss +6 -0
- package/styles/third-party/legacy-bootstrap/mixins/_responsive-visibility.scss +25 -0
- package/styles/third-party/legacy-bootstrap/mixins/_size.scss +10 -0
- package/styles/third-party/legacy-bootstrap/mixins/_tab-focus.scss +9 -0
- package/styles/third-party/legacy-bootstrap/mixins/_table-row.scss +28 -0
- package/styles/third-party/legacy-bootstrap/mixins/_text-emphasis.scss +12 -0
- package/styles/third-party/legacy-bootstrap/mixins/_text-overflow.scss +8 -0
- package/styles/third-party/legacy-bootstrap/mixins/_vendor-prefixes.scss +182 -0
- package/styles/utility/_mixins.scss +12 -11
- package/styles/utility/_utilities.scss +12 -1
- package/svgo.config.js +14 -0
- package/test/components/Accordion.test.js +12 -0
- package/test/components/ErrorUI.test.js +33 -0
- package/test/components/FooterUI.test.js +60 -0
- package/test/components/HeaderUI.test.js +45 -0
- package/test/components/Infotip.test.js +73 -0
- package/test/components/SessionDialogUI.test.js +339 -0
- package/test/components/SideNavUI.test.js +23 -0
- package/test/components/Tooltip.test.js +147 -0
- package/test/index.test.js +8 -0
- package/test/session/session.test.js +221 -0
- package/test-setup.js +1 -0
- package/webpack.config.js +137 -0
- package/webpack.config.react.js +75 -0
- package/Dockerfile +0 -27
- package/Jenkinsfile +0 -22
- package/_config.dev.yml +0 -17
- package/_layouts/base.html +0 -42
- package/css/main.scss +0 -5
- package/dist/default.css +0 -2
- package/dist/default.css.map +0 -1
- package/dist/fonts/FontAwesome.otf +0 -0
- package/dist/fonts/Rubik-Bold.ttf +0 -0
- package/dist/fonts/Rubik-Light.ttf +0 -0
- package/dist/fonts/Rubik-Medium.ttf +0 -0
- package/dist/fonts/Rubik-Regular.ttf +0 -0
- package/dist/fonts/fontawesome-webfont.eot +0 -0
- package/dist/fonts/fontawesome-webfont.ttf +0 -0
- package/dist/fonts/fontawesome-webfont.woff +0 -0
- package/dist/fonts/fontawesome-webfont.woff2 +0 -0
- package/dist/report.html +0 -25
- package/js/components/Footer/FooterUI.jsx +0 -39
- package/js/components/Footer/footer.js +0 -17
- package/js/components/Header/HeaderAbout.jsx +0 -27
- package/js/components/Header/HeaderAccountMenu.jsx +0 -114
- package/js/components/Header/HeaderApms.jsx +0 -25
- package/js/components/Header/HeaderMips.jsx +0 -43
- package/js/components/Header/HeaderUI.jsx +0 -87
- package/js/components/Header/header.js +0 -15
- package/js/components/InfoModal/index.jsx +0 -43
- package/js/components/SessionDialogUI.jsx +0 -181
- package/js/components/SideNav/Chart/ScoreChart.jsx +0 -246
- package/js/components/SideNav/Chart/__tests__/ScoreChart.test.js +0 -28
- package/js/components/SideNav/Chart/__tests__/__snapshots__/ScoreChart.test.js.snap +0 -57
- package/js/components/SideNav/Chart/index.js +0 -1
- package/js/components/SideNav/Content/CmsContent.jsx +0 -81
- package/js/components/SideNav/Content/LevelOneContent.jsx +0 -53
- package/js/components/SideNav/Content/LevelThreeContent.jsx +0 -98
- package/js/components/SideNav/Content/LevelTwoContent.jsx +0 -87
- package/js/components/SideNav/Content/index.js +0 -4
- package/js/components/SideNav/Details/IndividualDetails.jsx +0 -35
- package/js/components/SideNav/Details/PracticeDetails.jsx +0 -33
- package/js/components/SideNav/Details/index.js +0 -2
- package/js/components/SideNav/Links/CmsReportLink.jsx +0 -114
- package/js/components/SideNav/Links/NavLinkBack.jsx +0 -8
- package/js/components/SideNav/Links/NavLinkContainer.jsx +0 -33
- package/js/components/SideNav/Links/NavLinkDrawer.jsx +0 -72
- package/js/components/SideNav/Links/NavLinkInline.jsx +0 -20
- package/js/components/SideNav/Links/NavLinkSlideOut.jsx +0 -47
- package/js/components/SideNav/Links/NavLinkToggle.jsx +0 -25
- package/js/components/SideNav/Links/index.js +0 -7
- package/js/components/SideNav/UI/SideNavUI.jsx +0 -109
- package/js/components/SideNav/UI/index.js +0 -1
- package/js/components/SideNav/index.js +0 -24
- package/js/components/index.js +0 -9
- package/js/index.js +0 -24
- package/js/session/logout.js +0 -41
- package/sidebar-demo.html +0 -48
- package/styles/components/_footer.scss +0 -164
- package/styles/components/_header.scss +0 -393
- package/styles/components/_sidebar.scss +0 -6
- package/styles/components/_tool-tips.scss +0 -6
- package/styles/components/sidebar/_animations.scss +0 -16
- package/styles/components/sidebar/_links.scss +0 -269
- package/styles/components/sidebar/_sidebar.scss +0 -107
- package/styles/guide/_layout.scss +0 -120
- package/styles/guide/sidebar-demo.css +0 -121
- package/yarn.lock +0 -5694
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import SearchIcon from '@material-ui/icons/Search';
|
|
4
|
+
|
|
5
|
+
const Search = ({
|
|
6
|
+
id,
|
|
7
|
+
name,
|
|
8
|
+
placeholder,
|
|
9
|
+
disableSearchBtn,
|
|
10
|
+
disabled,
|
|
11
|
+
inputValue,
|
|
12
|
+
onClick,
|
|
13
|
+
onChange,
|
|
14
|
+
inputAriaLabel,
|
|
15
|
+
buttonAriaLabel,
|
|
16
|
+
inputWidth,
|
|
17
|
+
label,
|
|
18
|
+
parentElement,
|
|
19
|
+
}) => {
|
|
20
|
+
const ContainerElement = parentElement || 'span';
|
|
21
|
+
const inputStyle = {
|
|
22
|
+
width: inputWidth,
|
|
23
|
+
};
|
|
24
|
+
return (
|
|
25
|
+
<ContainerElement className="qppds">
|
|
26
|
+
<form role="search" className="qpp-c-search qpp-c-search--compact">
|
|
27
|
+
<label
|
|
28
|
+
className={label ? 'qpp-u-margin-bottom--8' : 'qpp-u-visually-hidden'}
|
|
29
|
+
htmlFor={id}
|
|
30
|
+
>
|
|
31
|
+
{label ? label : 'Search'}
|
|
32
|
+
</label>
|
|
33
|
+
|
|
34
|
+
<div className="qpp-c-search__wrap">
|
|
35
|
+
<input
|
|
36
|
+
style={inputStyle}
|
|
37
|
+
className="qpp-c-text-input"
|
|
38
|
+
type="search"
|
|
39
|
+
id={id}
|
|
40
|
+
name={name}
|
|
41
|
+
placeholder={placeholder}
|
|
42
|
+
value={inputValue}
|
|
43
|
+
disabled={disabled}
|
|
44
|
+
onChange={onChange}
|
|
45
|
+
aria-label={inputAriaLabel}
|
|
46
|
+
/>
|
|
47
|
+
|
|
48
|
+
<button
|
|
49
|
+
data-testid="search-btn"
|
|
50
|
+
aria-label={buttonAriaLabel}
|
|
51
|
+
onClick={onClick}
|
|
52
|
+
disabled={disableSearchBtn}
|
|
53
|
+
id={`${id}-submit`}
|
|
54
|
+
type="submit"
|
|
55
|
+
className="qpp-c-search__submit qpp-c-button qpp-c-button--text"
|
|
56
|
+
>
|
|
57
|
+
<span className="qpp-u-visually-hidden">Search</span>
|
|
58
|
+
<SearchIcon classes={{ root: 'qpp-icon-mat' }} />
|
|
59
|
+
</button>
|
|
60
|
+
</div>
|
|
61
|
+
</form>
|
|
62
|
+
</ContainerElement>
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
Search.propTypes = {
|
|
67
|
+
id: PropTypes.string,
|
|
68
|
+
name: PropTypes.string,
|
|
69
|
+
placeholder: PropTypes.string,
|
|
70
|
+
disableSearchBtn: PropTypes.bool,
|
|
71
|
+
disabled: PropTypes.bool,
|
|
72
|
+
inputValue: PropTypes.string,
|
|
73
|
+
onClick: PropTypes.func,
|
|
74
|
+
onChange: PropTypes.func,
|
|
75
|
+
inputAriaLabel: PropTypes.string,
|
|
76
|
+
buttonAriaLabel: PropTypes.string,
|
|
77
|
+
inputWidth: PropTypes.string,
|
|
78
|
+
label: PropTypes.string,
|
|
79
|
+
parentElement: PropTypes.string,
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
Search.defaultProps = {
|
|
83
|
+
label: null,
|
|
84
|
+
id: 'search-input',
|
|
85
|
+
name: '',
|
|
86
|
+
placeholder: '',
|
|
87
|
+
disableSearchBtn: false,
|
|
88
|
+
disabled: false,
|
|
89
|
+
inputValue: '',
|
|
90
|
+
onClick: () => null,
|
|
91
|
+
onChange: () => null,
|
|
92
|
+
inputAriaLabel: '',
|
|
93
|
+
buttonAriaLabel: '',
|
|
94
|
+
inputWidth: 'auto',
|
|
95
|
+
parentElement: 'span',
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export default Search;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from 'react-dom';
|
|
3
|
+
import SessionDialogUI from '../SessionDialogUI';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Renders the Session Dialog UI content.
|
|
7
|
+
*/
|
|
8
|
+
export default class SessionDialog {
|
|
9
|
+
/**
|
|
10
|
+
* @param {Object} options - An object containing content and config data
|
|
11
|
+
* @param {Boolean} options.showImmediate
|
|
12
|
+
* @param {Number} options.warningTimeout
|
|
13
|
+
* @param {String} options.appElement
|
|
14
|
+
* @param {HTMLElement} options.rootElement - Elem inside which to render
|
|
15
|
+
*/
|
|
16
|
+
constructor(options) {
|
|
17
|
+
render(
|
|
18
|
+
<SessionDialogUI
|
|
19
|
+
showImmediate={options.showImmediate}
|
|
20
|
+
warningTimeout={options.warningTimeout}
|
|
21
|
+
appElement={options.appElement}
|
|
22
|
+
/>,
|
|
23
|
+
options.rootElement
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import cookie from 'cookie';
|
|
4
|
+
import retry from 'retry';
|
|
5
|
+
import jwtDecode from 'jwt-decode';
|
|
6
|
+
|
|
7
|
+
import Modal from './Modal';
|
|
8
|
+
import RefreshSession from '../session/refresh';
|
|
9
|
+
import LogoutSession from '../session/logout';
|
|
10
|
+
import fetchTtl from '../session/ttl';
|
|
11
|
+
|
|
12
|
+
const fetchTtlIntervalMs = 60000;
|
|
13
|
+
|
|
14
|
+
export default class SessionDialogUI extends Component {
|
|
15
|
+
/**
|
|
16
|
+
* Create a SessionDialogUI component.
|
|
17
|
+
* @param {object} props - Configuration options. See SessionDialog for more
|
|
18
|
+
*/
|
|
19
|
+
constructor(props) {
|
|
20
|
+
super(props);
|
|
21
|
+
|
|
22
|
+
this.handleOpenModal = this.handleOpenModal.bind(this);
|
|
23
|
+
this.handleCloseModal = this.handleCloseModal.bind(this);
|
|
24
|
+
this.refreshSession = this.refreshSession.bind(this);
|
|
25
|
+
this.signOut = this.signOut.bind(this);
|
|
26
|
+
this.startTimer = this.startTimer.bind(this);
|
|
27
|
+
this.shouldShowDialog = this.shouldShowDialog.bind(this);
|
|
28
|
+
this.shouldSignOut = this.shouldSignOut.bind(this);
|
|
29
|
+
this.minutesUntil = this.minutesUntil.bind(this);
|
|
30
|
+
this.checkExpiry = this.checkExpiry.bind(this);
|
|
31
|
+
this.onInterval = this.onInterval.bind(this);
|
|
32
|
+
|
|
33
|
+
if (props.showImmediate === true) {
|
|
34
|
+
this.state = {
|
|
35
|
+
showModal: true,
|
|
36
|
+
showError: false,
|
|
37
|
+
};
|
|
38
|
+
} else {
|
|
39
|
+
this.state = {
|
|
40
|
+
showModal: false,
|
|
41
|
+
showError: false,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
this.startTimer();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Extracts the token exp value as a JavaScript date.
|
|
50
|
+
* @param {Object} cookies - An object representation of the cookie store
|
|
51
|
+
* @returns {(date|null)} The token expiration date, if found
|
|
52
|
+
*/
|
|
53
|
+
getTokenExpiry(cookies) {
|
|
54
|
+
let expiry = null;
|
|
55
|
+
|
|
56
|
+
if (cookies.hasOwnProperty('qpp_auth_token') && cookies.qpp_auth_token) {
|
|
57
|
+
// See https://tools.ietf.org/html/rfc7519
|
|
58
|
+
// `exp` is a NumericDate representing "seconds since the epoch"
|
|
59
|
+
// and it needs to be milliseconds to get a JavaScript date from it.
|
|
60
|
+
const { exp } = jwtDecode(cookies.qpp_auth_token);
|
|
61
|
+
expiry = new Date(exp * 1000);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return expiry;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
checkExpiry(expiry) {
|
|
68
|
+
if (expiry) {
|
|
69
|
+
if (this.shouldShowDialog(expiry)) {
|
|
70
|
+
this.handleOpenModal();
|
|
71
|
+
} else if (this.shouldSignOut(expiry)) {
|
|
72
|
+
this.signOut();
|
|
73
|
+
clearInterval(this.warningInterval);
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
clearInterval(this.warningInterval);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
onInterval() {
|
|
81
|
+
const cookies = cookie.parse(document.cookie);
|
|
82
|
+
|
|
83
|
+
if (cookies.hasOwnProperty('qpp_auth_token') && cookies.qpp_auth_token) {
|
|
84
|
+
const operation = retry.operation({
|
|
85
|
+
retries: 5,
|
|
86
|
+
factor: 1,
|
|
87
|
+
minTimeout: 1000,
|
|
88
|
+
maxTimeout: 1000,
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
operation.attempt(() => {
|
|
92
|
+
fetchTtl(cookies.qpp_auth_token)
|
|
93
|
+
.then(this.checkExpiry)
|
|
94
|
+
.catch((error) => {
|
|
95
|
+
if (operation.retry(error)) {
|
|
96
|
+
// try again before giving up
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
clearInterval(this.warningInterval);
|
|
100
|
+
// sign an inactive user out
|
|
101
|
+
this.forceTimeoutHandle = setTimeout(this.signOut, 120 * 1000);
|
|
102
|
+
this.setState({
|
|
103
|
+
showModal: false,
|
|
104
|
+
showError: true,
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Checks whether the user is within a specified number of minutes before
|
|
113
|
+
* their session token expires. If so, show a warning dialog. If the
|
|
114
|
+
* expiration has been reached, sign the user out.
|
|
115
|
+
*/
|
|
116
|
+
startTimer() {
|
|
117
|
+
clearInterval(this.warningInterval);
|
|
118
|
+
|
|
119
|
+
this.warningInterval = setInterval(this.onInterval, fetchTtlIntervalMs);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Returns whether the current time is within the timeout range of expiry.
|
|
124
|
+
* @param {date|number} expiry - Expiration date to check against
|
|
125
|
+
* @returns {boolean}
|
|
126
|
+
*/
|
|
127
|
+
shouldShowDialog(expiry) {
|
|
128
|
+
if (typeof expiry === 'number') {
|
|
129
|
+
const minutesLeft = expiry / 60;
|
|
130
|
+
|
|
131
|
+
return !this.state.showModal && minutesLeft <= this.props.warningTimeout;
|
|
132
|
+
} else {
|
|
133
|
+
return (
|
|
134
|
+
!this.state.showModal &&
|
|
135
|
+
this.minutesUntil(expiry) <= this.props.warningTimeout
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Returns whether the current time has reached the expiration date.
|
|
142
|
+
* @param {date|number} expiry - Expiration date to check against
|
|
143
|
+
* @returns {boolean}
|
|
144
|
+
*/
|
|
145
|
+
shouldSignOut(expiry) {
|
|
146
|
+
if (typeof expiry === 'number') {
|
|
147
|
+
return expiry <= 1;
|
|
148
|
+
} else {
|
|
149
|
+
return this.minutesUntil(expiry) <= 0;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Returns number of minutes until the expiration date.
|
|
155
|
+
* @param {date} expiry - Expiration date to check against
|
|
156
|
+
* @returns {number}
|
|
157
|
+
*/
|
|
158
|
+
minutesUntil(expiry) {
|
|
159
|
+
return (expiry - new Date().getTime()) / 60000;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Sets the modal state to visible.
|
|
164
|
+
*/
|
|
165
|
+
handleOpenModal() {
|
|
166
|
+
this.setState({
|
|
167
|
+
showModal: true,
|
|
168
|
+
showError: false,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Sets the modal state to hidden.
|
|
174
|
+
*/
|
|
175
|
+
handleCloseModal() {
|
|
176
|
+
this.setState({
|
|
177
|
+
showModal: false,
|
|
178
|
+
showError: false,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Handles the user requesting their session be extended.
|
|
184
|
+
*/
|
|
185
|
+
refreshSession() {
|
|
186
|
+
RefreshSession({
|
|
187
|
+
window,
|
|
188
|
+
onSuccess: () => {
|
|
189
|
+
this.startTimer();
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
this.handleCloseModal();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Handles the user requesting their session be ended.
|
|
198
|
+
*/
|
|
199
|
+
signOut() {
|
|
200
|
+
if (this.forceTimeoutHandle) {
|
|
201
|
+
clearTimeout(this.forceTimeoutHandle);
|
|
202
|
+
}
|
|
203
|
+
LogoutSession(window);
|
|
204
|
+
this.handleCloseModal();
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
render() {
|
|
208
|
+
return (
|
|
209
|
+
<React.Fragment>
|
|
210
|
+
<Modal
|
|
211
|
+
useDesignSystem
|
|
212
|
+
title="You will be signed out within two minutes"
|
|
213
|
+
isOpen={this.state.showModal}
|
|
214
|
+
primary={{
|
|
215
|
+
title: 'Keep me signed in',
|
|
216
|
+
onClick: this.refreshSession,
|
|
217
|
+
}}
|
|
218
|
+
secondary={{
|
|
219
|
+
title: 'Sign me out now',
|
|
220
|
+
onClick: this.signOut,
|
|
221
|
+
}}
|
|
222
|
+
onRequestClose={this.handleCloseModal}
|
|
223
|
+
>
|
|
224
|
+
<p>
|
|
225
|
+
You have been inactive for thirty minutes. For your security, we
|
|
226
|
+
will sign you out automatically.
|
|
227
|
+
</p>
|
|
228
|
+
</Modal>
|
|
229
|
+
|
|
230
|
+
<Modal
|
|
231
|
+
useDesignSystem
|
|
232
|
+
title="Technical Difficulties"
|
|
233
|
+
isOpen={this.state.showError}
|
|
234
|
+
primary={{
|
|
235
|
+
title: 'Sign Out',
|
|
236
|
+
onClick: this.signOut,
|
|
237
|
+
}}
|
|
238
|
+
onRequestClose={this.signOut}
|
|
239
|
+
>
|
|
240
|
+
<p>
|
|
241
|
+
We’re experiencing technical difficulties. Please log in again to
|
|
242
|
+
continue. For your security, we will sign you out automatically
|
|
243
|
+
within two minutes.
|
|
244
|
+
</p>
|
|
245
|
+
</Modal>
|
|
246
|
+
</React.Fragment>
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
SessionDialogUI.propTypes = {
|
|
252
|
+
showImmediate: PropTypes.bool,
|
|
253
|
+
warningTimeout: PropTypes.number,
|
|
254
|
+
appElement: PropTypes.string,
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
SessionDialogUI.defaultProps = {
|
|
258
|
+
showImmediate: false,
|
|
259
|
+
warningTimeout: 2,
|
|
260
|
+
appElement: undefined,
|
|
261
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
const hasDarkerBackground = (darkerBackground) => {
|
|
5
|
+
return darkerBackground ? 'background-highlight' : '';
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const AnimationGroup = ({ display, className, children, darkerBackground }) => {
|
|
9
|
+
return (
|
|
10
|
+
<div
|
|
11
|
+
className={`animation-group animation-group-${className || 'default'}${
|
|
12
|
+
display ? ' animation-group-enter' : ' animation-group-exit'
|
|
13
|
+
} ${hasDarkerBackground(darkerBackground)}`}
|
|
14
|
+
>
|
|
15
|
+
{children}
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
AnimationGroup.propTypes = {
|
|
21
|
+
children: PropTypes.node,
|
|
22
|
+
className: PropTypes.string,
|
|
23
|
+
display: PropTypes.bool,
|
|
24
|
+
darkerBackground: PropTypes.bool,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default AnimationGroup;
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { pie, arc } from 'd3-shape';
|
|
3
|
+
import { select, event } from 'd3-selection';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
|
|
6
|
+
const WIDTH = 210;
|
|
7
|
+
const HEIGHT = 210;
|
|
8
|
+
const RADIUS = Math.min(WIDTH, HEIGHT) / 2;
|
|
9
|
+
const GAP_VALUE = 2.5;
|
|
10
|
+
|
|
11
|
+
const ScoreChart = ({ performanceYear, chartData, linkCallback }) => {
|
|
12
|
+
const [hasLegend, setHasLegend] = useState(false);
|
|
13
|
+
const [titleMapping, setTitleMapping] = useState({
|
|
14
|
+
quality: 'Quality Measures',
|
|
15
|
+
aci: 'Advancing Care Info',
|
|
16
|
+
pi: 'Promoting Interoperability',
|
|
17
|
+
ia: 'Improvement Activities',
|
|
18
|
+
cost: 'Cost',
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const { categories } = chartData;
|
|
22
|
+
let legendToggler;
|
|
23
|
+
let legend;
|
|
24
|
+
|
|
25
|
+
const getAdvancingCareLabel = () => {
|
|
26
|
+
if (performanceYear > 2017) {
|
|
27
|
+
setTitleMapping({ ...titleMapping, aci: 'Promoting Interoperability' });
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const redirectToCategory = (link, categoryId) => {
|
|
32
|
+
if (!link) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// track explicitly chart legends
|
|
37
|
+
if (window.utag) {
|
|
38
|
+
window.utag.track('link', {
|
|
39
|
+
ga_event_category: 'SidebarNav',
|
|
40
|
+
ga_event_action: `GoTo${categoryId}`,
|
|
41
|
+
ga_event_label: categoryId,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (linkCallback) {
|
|
46
|
+
linkCallback(link);
|
|
47
|
+
} else {
|
|
48
|
+
window.location.href = link;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const draw = (chartData) => {
|
|
53
|
+
const scorePie = pie().sort(null);
|
|
54
|
+
|
|
55
|
+
// Removing invalid categories
|
|
56
|
+
const categories = chartData.categories.filter(
|
|
57
|
+
({ maxContribution }) => !!maxContribution
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
// Calculating the sum of valid categories in order to calculate ratios
|
|
61
|
+
const categorySum = categories
|
|
62
|
+
.map(({ maxContribution }) => maxContribution)
|
|
63
|
+
.reduce((sum, current) => sum + current);
|
|
64
|
+
|
|
65
|
+
if (!categorySum) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
select('.score-chart').selectAll('*').remove();
|
|
70
|
+
|
|
71
|
+
const svg = select('.score-chart')
|
|
72
|
+
.attr('width', WIDTH)
|
|
73
|
+
.attr('height', HEIGHT);
|
|
74
|
+
|
|
75
|
+
const chartArc = arc()
|
|
76
|
+
.innerRadius(RADIUS - 1.5)
|
|
77
|
+
.outerRadius(RADIUS - 25);
|
|
78
|
+
|
|
79
|
+
// Preparing the data structure with ratios: [ FILLED, EMPTY, TRANSPARENT, FILLED, EMPTY, ... ]
|
|
80
|
+
let data;
|
|
81
|
+
if (categories.length === 0) {
|
|
82
|
+
data = [];
|
|
83
|
+
} else if (categories.length === 1) {
|
|
84
|
+
const { value, maxContribution } = categories[0];
|
|
85
|
+
data = [value || 0, maxContribution - value];
|
|
86
|
+
} else {
|
|
87
|
+
data = categories
|
|
88
|
+
.map(({ value, maxContribution }) => [
|
|
89
|
+
value || 0,
|
|
90
|
+
maxContribution - value,
|
|
91
|
+
GAP_VALUE * (categorySum / 100),
|
|
92
|
+
])
|
|
93
|
+
.reduce((a, b) => a.concat(b), []);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
svg.append('title').attr('id', 'titleID').text('Your submission score');
|
|
97
|
+
|
|
98
|
+
svg
|
|
99
|
+
.append('desc')
|
|
100
|
+
.attr('id', 'descID')
|
|
101
|
+
.text(`${chartData.finalScore} out of 100`);
|
|
102
|
+
|
|
103
|
+
// Setting up the arcs
|
|
104
|
+
let arcs = svg
|
|
105
|
+
.append('g')
|
|
106
|
+
.attr('class', 'arcs')
|
|
107
|
+
.attr('role', 'presentation')
|
|
108
|
+
.selectAll('g.arc')
|
|
109
|
+
.data(scorePie(data))
|
|
110
|
+
.enter()
|
|
111
|
+
.append('g')
|
|
112
|
+
.attr('class', (d, i) => {
|
|
113
|
+
let role;
|
|
114
|
+
if (i % 3 === 0) {
|
|
115
|
+
role = 'filled';
|
|
116
|
+
} else if (i % 3 === 1) {
|
|
117
|
+
role = 'empty';
|
|
118
|
+
} else {
|
|
119
|
+
role = 'transparent';
|
|
120
|
+
}
|
|
121
|
+
return `arc ${categories[parseInt(i / 3)].name} ${role}`;
|
|
122
|
+
})
|
|
123
|
+
.attr('transform', `translate(${RADIUS}, ${RADIUS})`)
|
|
124
|
+
// For accessibility, we add keyboard access to the filled slices
|
|
125
|
+
.attr('tabindex', (d, i) => {
|
|
126
|
+
let tabindex = -1;
|
|
127
|
+
if (i % 3 === 0) {
|
|
128
|
+
tabindex = 0;
|
|
129
|
+
}
|
|
130
|
+
return tabindex;
|
|
131
|
+
})
|
|
132
|
+
// IE for for focusable svg elements
|
|
133
|
+
.attr('focusable', (d, i) => {
|
|
134
|
+
if (i % 3 === 0) {
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
// For accessibility, we add keyboard access to the filled slices
|
|
139
|
+
.on('keyup', (d, i) => {
|
|
140
|
+
const code = event.keyCode || event.which;
|
|
141
|
+
if (code === 13) {
|
|
142
|
+
const { name, link } = categories[parseInt(i / 3)];
|
|
143
|
+
redirectToCategory(link, name);
|
|
144
|
+
}
|
|
145
|
+
})
|
|
146
|
+
// On click - go to category page
|
|
147
|
+
.on('click', (d, i) => {
|
|
148
|
+
const { name, link } = categories[parseInt(i / 3)];
|
|
149
|
+
redirectToCategory(link, name);
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// Add accessibility description
|
|
153
|
+
arcs.append('desc').text((d, i) => {
|
|
154
|
+
if (i % 3 === 0) {
|
|
155
|
+
const { name, value, maxContribution } = categories[parseInt(i / 3)];
|
|
156
|
+
return `${titleMapping[name]} ${value} out of ${maxContribution}`;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
arcs
|
|
161
|
+
.append('path')
|
|
162
|
+
.attr('d', chartArc)
|
|
163
|
+
// On mouse over - show category tooltip
|
|
164
|
+
.on('mouseover', (d, i) => {
|
|
165
|
+
const { name, value, maxContribution } = categories[parseInt(i / 3)];
|
|
166
|
+
select('.chart-tooltip')
|
|
167
|
+
.style('opacity', 1)
|
|
168
|
+
.text(`${titleMapping[name]} ${value}/${maxContribution}`);
|
|
169
|
+
})
|
|
170
|
+
// On mouse move - move category tooltip
|
|
171
|
+
.on('mousemove', () => {
|
|
172
|
+
select('.chart-tooltip')
|
|
173
|
+
.style('top', event.clientY - HEIGHT + 10 + 'px')
|
|
174
|
+
.style('left', event.clientX + 'px');
|
|
175
|
+
})
|
|
176
|
+
// On mouse out - hide category tooltip
|
|
177
|
+
.on('mouseout', () => {
|
|
178
|
+
select('.chart-tooltip').style('opacity', 0);
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
// Adding title and subtitle
|
|
182
|
+
const text = svg
|
|
183
|
+
.append('g')
|
|
184
|
+
.attr('text-anchor', 'middle')
|
|
185
|
+
.attr('transform', `translate(${WIDTH / 2}, ${HEIGHT / 2})`);
|
|
186
|
+
|
|
187
|
+
// Adding title - X%
|
|
188
|
+
text
|
|
189
|
+
.append('text')
|
|
190
|
+
.attr('y', 4)
|
|
191
|
+
.attr('class', 'chart-title')
|
|
192
|
+
.text(chartData.finalScore);
|
|
193
|
+
|
|
194
|
+
// Adding subtitle - OUT OF 100
|
|
195
|
+
text
|
|
196
|
+
.append('text')
|
|
197
|
+
.attr('y', 24)
|
|
198
|
+
.attr('class', 'chart-subtitle')
|
|
199
|
+
.text('OUT OF 100');
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
const toggleLegend = () => {
|
|
203
|
+
setHasLegend(!hasLegend);
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
useEffect(() => {
|
|
207
|
+
if (chartData?.finalScore) {
|
|
208
|
+
draw(chartData);
|
|
209
|
+
getAdvancingCareLabel();
|
|
210
|
+
}
|
|
211
|
+
}, [chartData?.finalScore]);
|
|
212
|
+
|
|
213
|
+
if (hasLegend) {
|
|
214
|
+
legendToggler = (
|
|
215
|
+
<button className="open" type="button" aria-pressed="true">
|
|
216
|
+
Hide Legend
|
|
217
|
+
<svg
|
|
218
|
+
className="right-icon rotated"
|
|
219
|
+
aria-hidden="true"
|
|
220
|
+
focusable="false"
|
|
221
|
+
>
|
|
222
|
+
<use xlinkHref="#chevron-down" />
|
|
223
|
+
</svg>
|
|
224
|
+
</button>
|
|
225
|
+
);
|
|
226
|
+
legend = categories.map(({ name, value, maxContribution, link }, index) => {
|
|
227
|
+
return (
|
|
228
|
+
<li key={name} className="legend-axis">
|
|
229
|
+
<button onClick={() => redirectToCategory(link, name)}>
|
|
230
|
+
<span className={`legend-axis-color ${name}`} />
|
|
231
|
+
|
|
232
|
+
<span className="legend-axis-title">{titleMapping[name]}</span>
|
|
233
|
+
|
|
234
|
+
<span className="legend-axis-value">{`${value}/${maxContribution}`}</span>
|
|
235
|
+
</button>
|
|
236
|
+
</li>
|
|
237
|
+
);
|
|
238
|
+
});
|
|
239
|
+
} else {
|
|
240
|
+
legendToggler = (
|
|
241
|
+
<button type="button" aria-pressed="false">
|
|
242
|
+
Show Legend
|
|
243
|
+
<svg className="right-icon" aria-hidden="true" focusable="false">
|
|
244
|
+
<use xlinkHref="#chevron-down" />
|
|
245
|
+
</svg>
|
|
246
|
+
</button>
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return (
|
|
251
|
+
<div className="chart">
|
|
252
|
+
<svg className="score-chart" focusable="false" />
|
|
253
|
+
<div className="chart-tooltip off" />
|
|
254
|
+
<div className="chart-legend-toggler" onClick={toggleLegend}>
|
|
255
|
+
{legendToggler}
|
|
256
|
+
</div>
|
|
257
|
+
<ul className="chart-legend">{legend}</ul>
|
|
258
|
+
</div>
|
|
259
|
+
);
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
ScoreChart.propTypes = {
|
|
263
|
+
chartData: PropTypes.object,
|
|
264
|
+
linkCallback: PropTypes.func,
|
|
265
|
+
performanceYear: PropTypes.number,
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
export default ScoreChart;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* global expect */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { render } from '@testing-library/react';
|
|
4
|
+
import ScoreChart from '../ScoreChart';
|
|
5
|
+
|
|
6
|
+
const CHART_DATA = {
|
|
7
|
+
finalScore: 50,
|
|
8
|
+
submissionId: 'x',
|
|
9
|
+
categories: [
|
|
10
|
+
{ name: 'quality', value: 30, maxContribution: 60 },
|
|
11
|
+
{ name: 'aci', value: 15, maxContribution: 30 },
|
|
12
|
+
{ name: 'ia', value: 5, maxContribution: 10 },
|
|
13
|
+
],
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
describe('ScoreChart component', () => {
|
|
17
|
+
it('should match snapshot', () => {
|
|
18
|
+
const { container } = render(<ScoreChart chartData={CHART_DATA} />);
|
|
19
|
+
|
|
20
|
+
expect(container).toMatchSnapshot();
|
|
21
|
+
});
|
|
22
|
+
});
|