@madie/madie-design-system 1.0.2 → 1.0.3
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/.storybook/main.js +3 -0
- package/components/Accordion/Accordion.stories.js +11 -11
- package/components/Accordion/index.jsx +78 -76
- package/components/Alert/Alert.stories.js +60 -51
- package/components/Alert/index.js +46 -37
- package/components/Breadcrumb/Breadcrumb.stories.js +62 -62
- package/components/Breadcrumb/index.js +80 -71
- package/components/Button/Button.stories.js +92 -86
- package/components/Button/index.js +65 -65
- package/components/CalloutBox/CalloutBox.stories.js +75 -75
- package/components/CalloutBox/index.js +92 -92
- package/components/Card/Card.stories.js +135 -135
- package/components/Card/index.js +128 -121
- package/components/Dropdown/Dropdown.stories.js +73 -73
- package/components/Dropdown/index.js +72 -72
- package/components/Error/Collapsible.jsx +75 -70
- package/components/Error/ErrorUI.jsx +22 -22
- package/components/Error/error.js +20 -20
- package/components/FlashNotification/FlashNotificationUI.jsx +77 -77
- package/components/FlashNotification/index.js +23 -23
- package/components/Footer/Footer.stories.js +13 -13
- package/components/Footer/FooterUI.jsx +264 -252
- package/components/Footer/LegacyFooterUI.jsx +190 -180
- package/components/Footer/SocialLinks.jsx +58 -55
- package/components/Footer/Subscribe.jsx +29 -29
- package/components/Footer/footer.js +21 -21
- package/components/FormControlLabel/index.jsx +23 -0
- package/components/Header/Header.stories.js +29 -26
- package/components/Header/HeaderAccountMenu.jsx +163 -149
- package/components/Header/HeaderCancel.jsx +8 -8
- package/components/Header/HeaderContainer.jsx +48 -43
- package/components/Header/HeaderLogo.jsx +34 -34
- package/components/Header/HeaderMenuButton.js +39 -39
- package/components/Header/HeaderMenuItem.jsx +252 -205
- package/components/Header/HeaderMenuLink.js +37 -37
- package/components/Header/HeaderMenuSignOutButton.js +50 -50
- package/components/Header/HeaderMobileButton.js +29 -29
- package/components/Header/HeaderUI.jsx +164 -147
- package/components/Header/HelpIcon.jsx +15 -15
- package/components/Header/ImpersonatorBanner.jsx +50 -47
- package/components/Header/NavigationButtonIcon.jsx +21 -21
- package/components/Header/header.js +36 -34
- package/components/Header/hooks.js +42 -35
- package/components/Header/utag-helpers.js +8 -8
- package/components/Infotip/Infotip.jsx +48 -48
- package/components/Infotip/Infotip.stories.js +32 -30
- package/components/Infotip/InfotipIcon.jsx +30 -30
- package/components/Infotip/index.js +1 -1
- package/components/InputLabel/index.jsx +58 -0
- package/components/Link/Link.stories.js +65 -64
- package/components/Link/index.js +46 -46
- package/components/Modal/LegacyModal.jsx +56 -54
- package/components/Modal/Modal.jsx +121 -121
- package/components/Modal/Modal.stories.js +152 -144
- package/components/Modal/index.jsx +11 -11
- package/components/NotificationBanner/NotificationBanner.stories.js +16 -16
- package/components/NotificationBanner/index.js +239 -225
- package/components/Pagination/index.jsx +171 -160
- package/components/SanitizedContent/index.jsx +183 -183
- package/components/Search/Search.stories.js +14 -14
- package/components/Search/index.js +72 -72
- package/components/Select/Select.stories.js +168 -0
- package/components/Select/index.jsx +103 -0
- package/components/SessionDialog/sessionDialog.js +20 -20
- package/components/SessionDialogUI.jsx +231 -219
- package/components/SideNav/AnimationGroup/AnimationGroup.jsx +19 -17
- package/components/SideNav/Chart/ScoreChart.jsx +238 -229
- package/components/SideNav/Chart/__tests__/ScoreChart.test.js +15 -15
- package/components/SideNav/Chart/index.js +1 -1
- package/components/SideNav/Content/LevelOneContent.jsx +194 -190
- package/components/SideNav/Content/LevelTwoContent.jsx +208 -195
- package/components/SideNav/Content/index.js +2 -2
- package/components/SideNav/Details/IndividualDetails.jsx +10 -10
- package/components/SideNav/Details/PracticeDetails.jsx +36 -34
- package/components/SideNav/Details/index.js +2 -2
- package/components/SideNav/Links/CmsSwitchLink.jsx +32 -32
- package/components/SideNav/Links/NavItemInline.jsx +44 -44
- package/components/SideNav/Links/NavLinkContainer.jsx +27 -25
- package/components/SideNav/Links/NavLinkDrawer.jsx +267 -231
- package/components/SideNav/Links/NavLinkInline.jsx +94 -92
- package/components/SideNav/Links/NavLinkToggle.jsx +25 -25
- package/components/SideNav/Links/index.js +10 -10
- package/components/SideNav/SideNav.stories.js +320 -288
- package/components/SideNav/UI/SideNavUI.jsx +321 -301
- package/components/SideNav/UI/index.js +1 -1
- package/components/SideNav/helpers.js +33 -33
- package/components/SideNav/index.js +46 -46
- package/components/Spinner/index.js +6 -6
- package/components/Tabs/Tab.js +19 -19
- package/components/Tabs/TabPanel.js +31 -24
- package/components/Tabs/Tabs.stories.js +118 -108
- package/components/Tabs/index.js +81 -76
- package/components/TextField/TextField.stories.js +103 -0
- package/components/TextField/index.jsx +80 -0
- package/components/TextInput/TextInput.stories.js +84 -84
- package/components/TextInput/index.js +123 -123
- package/components/Tooltip/Tooltip.jsx +57 -57
- package/components/Tooltip/Tooltip.stories.js +50 -50
- package/components/Tooltip/index.js +1 -1
- package/components/Tooltip/position.js +42 -34
- package/components/UnwrappedSpinner/index.js +5 -5
- package/components/hooks/useGetConfig.js +64 -55
- package/components/index.js +129 -121
- package/coverage/clover.xml +368 -331
- package/coverage/coverage-final.json +57 -54
- package/coverage/lcov-report/InputLabel/index.html +116 -0
- package/coverage/lcov-report/InputLabel/index.jsx.html +214 -0
- package/coverage/lcov-report/Select/index.html +116 -0
- package/coverage/lcov-report/Select/index.jsx.html +391 -0
- package/coverage/lcov-report/Textfield/index.html +116 -0
- package/coverage/lcov-report/Textfield/index.jsx.html +322 -0
- package/coverage/lcov-report/index.html +54 -9
- package/coverage/lcov-report/react/components/Accordion/index.html +1 -1
- package/coverage/lcov-report/react/components/Accordion/index.jsx.html +84 -78
- package/coverage/lcov-report/react/components/Button/index.html +1 -1
- package/coverage/lcov-report/react/components/Button/index.js.html +66 -66
- package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +87 -72
- package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +23 -23
- package/coverage/lcov-report/react/components/Error/error.js.html +21 -21
- package/coverage/lcov-report/react/components/Error/index.html +1 -1
- package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +290 -254
- package/coverage/lcov-report/react/components/Footer/LegacyFooterUI.jsx.html +212 -182
- package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +66 -57
- package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +30 -30
- package/coverage/lcov-report/react/components/Footer/footer.js.html +22 -22
- package/coverage/lcov-report/react/components/Footer/index.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +193 -151
- package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +9 -9
- package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +60 -45
- package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +36 -36
- package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +40 -40
- package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +348 -207
- package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +38 -38
- package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +51 -51
- package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +30 -30
- package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +201 -150
- package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +16 -16
- package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +58 -49
- package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +22 -22
- package/coverage/lcov-report/react/components/Header/header.js.html +42 -36
- package/coverage/lcov-report/react/components/Header/hooks.js.html +58 -37
- package/coverage/lcov-report/react/components/Header/index.html +1 -1
- package/coverage/lcov-report/react/components/Header/utag-helpers.js.html +9 -9
- package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +49 -49
- package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +31 -31
- package/coverage/lcov-report/react/components/Infotip/index.html +1 -1
- package/coverage/lcov-report/react/components/Infotip/index.js.html +2 -2
- package/coverage/lcov-report/react/components/InputLabel/index.html +116 -0
- package/coverage/lcov-report/react/components/InputLabel/index.jsx.html +214 -0
- package/coverage/lcov-report/react/components/Modal/LegacyModal.jsx.html +62 -56
- package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +122 -122
- package/coverage/lcov-report/react/components/Modal/index.html +1 -1
- package/coverage/lcov-report/react/components/Modal/index.jsx.html +12 -12
- package/coverage/lcov-report/react/components/NotificationBanner/index.html +1 -1
- package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +269 -227
- package/coverage/lcov-report/react/components/Pagination/index.html +1 -1
- package/coverage/lcov-report/react/components/Pagination/index.jsx.html +195 -162
- package/coverage/lcov-report/react/components/SanitizedContent/index.html +1 -1
- package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +184 -184
- package/coverage/lcov-report/react/components/Select/index.html +116 -0
- package/coverage/lcov-report/react/components/Select/index.jsx.html +391 -0
- package/coverage/lcov-report/react/components/SessionDialog/index.html +1 -1
- package/coverage/lcov-report/react/components/SessionDialog/sessionDialog.js.html +21 -21
- package/coverage/lcov-report/react/components/SessionDialogUI.jsx.html +257 -221
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +25 -19
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Chart/ScoreChart.jsx.html +261 -234
- package/coverage/lcov-report/react/components/SideNav/Chart/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Chart/index.js.html +2 -2
- package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +197 -185
- package/coverage/lcov-report/react/components/SideNav/Content/LevelTwoContent.jsx.html +236 -197
- package/coverage/lcov-report/react/components/SideNav/Content/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +3 -3
- package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +11 -11
- package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +42 -36
- package/coverage/lcov-report/react/components/SideNav/Details/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +3 -3
- package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +33 -33
- package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +45 -45
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +33 -27
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +323 -215
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +100 -94
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +26 -26
- package/coverage/lcov-report/react/components/SideNav/Links/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +11 -11
- package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +363 -303
- package/coverage/lcov-report/react/components/SideNav/UI/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +2 -2
- package/coverage/lcov-report/react/components/SideNav/helpers.js.html +34 -34
- package/coverage/lcov-report/react/components/SideNav/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/index.js.html +47 -47
- package/coverage/lcov-report/react/components/Textfield/index.html +116 -0
- package/coverage/lcov-report/react/components/Textfield/index.jsx.html +322 -0
- package/coverage/lcov-report/react/components/Tooltip/Tooltip.jsx.html +58 -58
- package/coverage/lcov-report/react/components/Tooltip/index.html +1 -1
- package/coverage/lcov-report/react/components/Tooltip/index.js.html +2 -2
- package/coverage/lcov-report/react/components/Tooltip/position.js.html +60 -36
- package/coverage/lcov-report/react/components/hooks/index.html +1 -1
- package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +84 -57
- package/coverage/lcov-report/react/components/index.html +1 -1
- package/coverage/lcov-report/react/index.html +1 -1
- package/coverage/lcov-report/react/index.js.html +1 -1
- package/coverage/lcov-report/react/lib/Chevron.jsx.html +1 -1
- package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +1 -1
- package/coverage/lcov-report/react/lib/index.html +1 -1
- package/coverage/lcov-report/react/lib/svg-definitions.svg.html +1 -1
- package/coverage/lcov-report/react/session/index.html +1 -1
- package/coverage/lcov-report/react/session/index.js.html +1 -1
- package/coverage/lcov-report/react/session/logout.js.html +1 -1
- package/coverage/lcov-report/react/session/refresh.js.html +1 -1
- package/coverage/lcov-report/react/session/ttl.js.html +1 -1
- package/coverage/lcov.info +855 -779
- package/dist/browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.js +16 -16
- package/dist/react/index.js.LICENSE.txt +1 -1
- package/dist/react/index.js.map +1 -1
- package/package.json +16 -9
- package/styles/qppds/components/_button.scss +29 -1
- package/test/components/Accordion.test.js +10 -10
- package/test/components/ErrorUI.test.js +29 -30
- package/test/components/FooterUI.test.js +82 -80
- package/test/components/HeaderUI.test.js +42 -38
- package/test/components/Infotip.test.js +64 -61
- package/test/components/Pagination.test.js +50 -50
- package/test/components/Select.test.js +113 -0
- package/test/components/SessionDialogUI.test.js +302 -294
- package/test/components/SideNavUI.test.js +19 -19
- package/test/components/TextField.test.js +50 -0
- package/test/components/Tooltip.test.js +133 -133
- package/test/index.test.js +6 -6
- package/test/session/session.test.js +200 -200
- package/storybook-static/0.5651be4a8d0b1984a772.manager.bundle.js +0 -2
- package/storybook-static/0.5651be4a8d0b1984a772.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/0.ce0ed568.iframe.bundle.js +0 -1
- package/storybook-static/1.1b179d27.iframe.bundle.js +0 -3
- package/storybook-static/1.1b179d27.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/1.1b179d27.iframe.bundle.js.map +0 -1
- package/storybook-static/1.c46d7d065aa0aa5a87ca.manager.bundle.js +0 -1
- package/storybook-static/10.99011d85.iframe.bundle.js +0 -3
- package/storybook-static/10.99011d85.iframe.bundle.js.LICENSE.txt +0 -11
- package/storybook-static/10.99011d85.iframe.bundle.js.map +0 -1
- package/storybook-static/2.35ddc55d.iframe.bundle.js +0 -1
- package/storybook-static/3.ed97833d.iframe.bundle.js +0 -1
- package/storybook-static/5.333e450fad8648669908.manager.bundle.js +0 -1
- package/storybook-static/6.505ea3c696ed314e90c8.manager.bundle.js +0 -2
- package/storybook-static/6.505ea3c696ed314e90c8.manager.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/7.94be8178.iframe.bundle.js +0 -1
- package/storybook-static/7.d26483fcb6f4087398a8.manager.bundle.js +0 -1
- package/storybook-static/8.68cd1217.iframe.bundle.js +0 -3
- package/storybook-static/8.68cd1217.iframe.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/8.68cd1217.iframe.bundle.js.map +0 -1
- package/storybook-static/8.7adf0ef161215cd35a66.manager.bundle.js +0 -1
- package/storybook-static/9.488e3969.iframe.bundle.js +0 -1
- package/storybook-static/fonts/FontAwesome.otf +0 -0
- package/storybook-static/fonts/OFL.txt +0 -92
- package/storybook-static/fonts/Rubik-Black.ttf +0 -0
- package/storybook-static/fonts/Rubik-BlackItalic.ttf +0 -0
- package/storybook-static/fonts/Rubik-Bold.ttf +0 -0
- package/storybook-static/fonts/Rubik-BoldItalic.ttf +0 -0
- package/storybook-static/fonts/Rubik-Italic.ttf +0 -0
- package/storybook-static/fonts/Rubik-Light.ttf +0 -0
- package/storybook-static/fonts/Rubik-LightItalic.ttf +0 -0
- package/storybook-static/fonts/Rubik-Medium.ttf +0 -0
- package/storybook-static/fonts/Rubik-MediumItalic.ttf +0 -0
- package/storybook-static/fonts/Rubik-Regular.ttf +0 -0
- package/storybook-static/fonts/fontawesome-webfont.eot +0 -0
- package/storybook-static/fonts/fontawesome-webfont.svg +0 -2671
- package/storybook-static/fonts/fontawesome-webfont.ttf +0 -0
- package/storybook-static/fonts/fontawesome-webfont.woff +0 -0
- package/storybook-static/fonts/fontawesome-webfont.woff2 +0 -0
- package/storybook-static/iframe.html +0 -348
- package/storybook-static/images/favicon/android-chrome-192x192.png +0 -0
- package/storybook-static/images/favicon/android-chrome-256x256.png +0 -0
- package/storybook-static/images/favicon/apple-touch-icon.png +0 -0
- package/storybook-static/images/favicon/browserconfig.xml +0 -9
- package/storybook-static/images/favicon/favicon-16x16.png +0 -0
- package/storybook-static/images/favicon/favicon-32x32.png +0 -0
- package/storybook-static/images/favicon/favicon.ico +0 -0
- package/storybook-static/images/favicon/manifest.json +0 -18
- package/storybook-static/images/favicon/mstile-150x150.png +0 -0
- package/storybook-static/images/favicon/safari-pinned-tab.svg +0 -32
- package/storybook-static/images/hhs-logo-black.svg +0 -10
- package/storybook-static/images/hhs-logo-white.svg +0 -10
- package/storybook-static/images/icons/close-x.svg +0 -6
- package/storybook-static/images/icons/help-headset.svg +0 -21
- package/storybook-static/images/icons/svg/arrow-down.svg +0 -1
- package/storybook-static/images/icons/svg/arrow-download.svg +0 -1
- package/storybook-static/images/icons/svg/arrow-right.svg +0 -1
- package/storybook-static/images/icons/svg/calendar.svg +0 -1
- package/storybook-static/images/icons/svg/close.svg +0 -1
- package/storybook-static/images/icons/svg/download.svg +0 -1
- package/storybook-static/images/icons/svg/external.svg +0 -1
- package/storybook-static/images/icons/svg/file-upload.svg +0 -1
- package/storybook-static/images/icons/svg/print.svg +0 -1
- package/storybook-static/images/icons/svg/search.svg +0 -7
- package/storybook-static/images/icons/svg/tooltip-question.svg +0 -6
- package/storybook-static/images/icons/svg/trash.svg +0 -1
- package/storybook-static/images/icons/svg/upload.svg +0 -1
- package/storybook-static/images/qpp_logo_reversed.png +0 -0
- package/storybook-static/images/qpp_logo_rgb_color.png +0 -0
- package/storybook-static/index.html +0 -59
- package/storybook-static/main.5ae8041695a4f0c06f75.manager.bundle.js +0 -1
- package/storybook-static/main.ee2cae16.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.7eeb017b9a4ce6a70a00.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.e2794f2d.iframe.bundle.js +0 -1
- package/storybook-static/static/media/Bitter-Bold.091bd4b7.woff +0 -0
- package/storybook-static/static/media/Bitter-Bold.24bf01e4.woff2 +0 -0
- package/storybook-static/static/media/Bitter-Bold.46bc29e4.ttf +0 -0
- package/storybook-static/static/media/Bitter-Bold.790f4f2f.eot +0 -0
- package/storybook-static/static/media/Bitter-Italic.1fa5390c.eot +0 -0
- package/storybook-static/static/media/Bitter-Italic.25e5675f.woff +0 -0
- package/storybook-static/static/media/Bitter-Italic.2eb18f5a.ttf +0 -0
- package/storybook-static/static/media/Bitter-Italic.34644574.woff2 +0 -0
- package/storybook-static/static/media/Bitter-Regular.4b22b6e8.woff +0 -0
- package/storybook-static/static/media/Bitter-Regular.559e7075.eot +0 -0
- package/storybook-static/static/media/Bitter-Regular.8db0301b.ttf +0 -0
- package/storybook-static/static/media/Bitter-Regular.f4e2f1f1.woff2 +0 -0
- package/storybook-static/static/media/FontAwesome.91f80bba.otf +0 -0
- package/storybook-static/static/media/OpenSans-Bold-webfont.202d819d.eot +0 -0
- package/storybook-static/static/media/OpenSans-Bold-webfont.92e570c6.woff2 +0 -0
- package/storybook-static/static/media/OpenSans-Bold-webfont.da71e99a.ttf +0 -0
- package/storybook-static/static/media/OpenSans-Bold-webfont.e75949bb.woff +0 -0
- package/storybook-static/static/media/OpenSans-Italic-webfont.72daa33a.woff2 +0 -0
- package/storybook-static/static/media/OpenSans-Italic-webfont.74ead3a8.woff +0 -0
- package/storybook-static/static/media/OpenSans-Italic-webfont.ae19388f.eot +0 -0
- package/storybook-static/static/media/OpenSans-Italic-webfont.ec7a2746.ttf +0 -0
- package/storybook-static/static/media/OpenSans-Regular-webfont.63a5fa7d.woff +0 -0
- package/storybook-static/static/media/OpenSans-Regular-webfont.66451be4.ttf +0 -0
- package/storybook-static/static/media/OpenSans-Regular-webfont.7882d20f.eot +0 -0
- package/storybook-static/static/media/OpenSans-Regular-webfont.ca4dd835.woff2 +0 -0
- package/storybook-static/static/media/OpenSans-Semibold-webfont.17ded75f.woff2 +0 -0
- package/storybook-static/static/media/OpenSans-Semibold-webfont.2a5adf6c.woff +0 -0
- package/storybook-static/static/media/OpenSans-Semibold-webfont.6059fecb.ttf +0 -0
- package/storybook-static/static/media/OpenSans-Semibold-webfont.c9808185.eot +0 -0
- package/storybook-static/static/media/Rubik-Bold.31bbd4d2.ttf +0 -0
- package/storybook-static/static/media/Rubik-Light.c90e2014.ttf +0 -0
- package/storybook-static/static/media/Rubik-Medium.5daa89aa.ttf +0 -0
- package/storybook-static/static/media/Rubik-Regular.cdf97d58.ttf +0 -0
- package/storybook-static/static/media/fontawesome-webfont.1e59d233.ttf +0 -0
- package/storybook-static/static/media/fontawesome-webfont.20fd1704.woff2 +0 -0
- package/storybook-static/static/media/fontawesome-webfont.8b43027f.eot +0 -0
- package/storybook-static/static/media/fontawesome-webfont.f691f37e.woff +0 -0
- package/storybook-static/vendors~main.c7e1bdf2e91d9cdba380.manager.bundle.js +0 -2
- package/storybook-static/vendors~main.c7e1bdf2e91d9cdba380.manager.bundle.js.LICENSE.txt +0 -104
- package/storybook-static/vendors~main.f299a23f.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.f299a23f.iframe.bundle.js.LICENSE.txt +0 -145
- package/storybook-static/vendors~main.f299a23f.iframe.bundle.js.map +0 -1
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Thu Mar 24 2022 11:31:04 GMT-0700 (Pacific Daylight Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -331,7 +331,16 @@
|
|
|
331
331
|
<a name='L266'></a><a href='#L266'>266</a>
|
|
332
332
|
<a name='L267'></a><a href='#L267'>267</a>
|
|
333
333
|
<a name='L268'></a><a href='#L268'>268</a>
|
|
334
|
-
<a name='L269'></a><a href='#L269'>269</a
|
|
334
|
+
<a name='L269'></a><a href='#L269'>269</a>
|
|
335
|
+
<a name='L270'></a><a href='#L270'>270</a>
|
|
336
|
+
<a name='L271'></a><a href='#L271'>271</a>
|
|
337
|
+
<a name='L272'></a><a href='#L272'>272</a>
|
|
338
|
+
<a name='L273'></a><a href='#L273'>273</a>
|
|
339
|
+
<a name='L274'></a><a href='#L274'>274</a>
|
|
340
|
+
<a name='L275'></a><a href='#L275'>275</a>
|
|
341
|
+
<a name='L276'></a><a href='#L276'>276</a>
|
|
342
|
+
<a name='L277'></a><a href='#L277'>277</a>
|
|
343
|
+
<a name='L278'></a><a href='#L278'>278</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
335
344
|
<span class="cline-any cline-neutral"> </span>
|
|
336
345
|
<span class="cline-any cline-neutral"> </span>
|
|
337
346
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -361,6 +370,9 @@
|
|
|
361
370
|
<span class="cline-any cline-neutral"> </span>
|
|
362
371
|
<span class="cline-any cline-neutral"> </span>
|
|
363
372
|
<span class="cline-any cline-neutral"> </span>
|
|
373
|
+
<span class="cline-any cline-neutral"> </span>
|
|
374
|
+
<span class="cline-any cline-neutral"> </span>
|
|
375
|
+
<span class="cline-any cline-neutral"> </span>
|
|
364
376
|
<span class="cline-any cline-yes">1x</span>
|
|
365
377
|
<span class="cline-any cline-no"> </span>
|
|
366
378
|
<span class="cline-any cline-no"> </span>
|
|
@@ -433,7 +445,6 @@
|
|
|
433
445
|
<span class="cline-any cline-neutral"> </span>
|
|
434
446
|
<span class="cline-any cline-neutral"> </span>
|
|
435
447
|
<span class="cline-any cline-neutral"> </span>
|
|
436
|
-
<span class="cline-any cline-neutral"> </span>
|
|
437
448
|
<span class="cline-any cline-yes">1x</span>
|
|
438
449
|
<span class="cline-any cline-neutral"> </span>
|
|
439
450
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -485,6 +496,7 @@
|
|
|
485
496
|
<span class="cline-any cline-neutral"> </span>
|
|
486
497
|
<span class="cline-any cline-yes">1x</span>
|
|
487
498
|
<span class="cline-any cline-yes">9x</span>
|
|
499
|
+
<span class="cline-any cline-neutral"> </span>
|
|
488
500
|
<span class="cline-any cline-yes">3x</span>
|
|
489
501
|
<span class="cline-any cline-yes">3x</span>
|
|
490
502
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -524,14 +536,12 @@
|
|
|
524
536
|
<span class="cline-any cline-neutral"> </span>
|
|
525
537
|
<span class="cline-any cline-neutral"> </span>
|
|
526
538
|
<span class="cline-any cline-neutral"> </span>
|
|
527
|
-
<span class="cline-any cline-neutral"> </span>
|
|
528
539
|
<span class="cline-any cline-yes">1x</span>
|
|
529
540
|
<span class="cline-any cline-neutral"> </span>
|
|
530
541
|
<span class="cline-any cline-neutral"> </span>
|
|
531
542
|
<span class="cline-any cline-neutral"> </span>
|
|
532
543
|
<span class="cline-any cline-neutral"> </span>
|
|
533
544
|
<span class="cline-any cline-neutral"> </span>
|
|
534
|
-
<span class="cline-any cline-neutral"> </span>
|
|
535
545
|
<span class="cline-any cline-yes">1x</span>
|
|
536
546
|
<span class="cline-any cline-no"> </span>
|
|
537
547
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -557,6 +567,7 @@
|
|
|
557
567
|
<span class="cline-any cline-neutral"> </span>
|
|
558
568
|
<span class="cline-any cline-neutral"> </span>
|
|
559
569
|
<span class="cline-any cline-no"> </span>
|
|
570
|
+
<span class="cline-any cline-neutral"> </span>
|
|
560
571
|
<span class="cline-any cline-no"> </span>
|
|
561
572
|
<span class="cline-any cline-neutral"> </span>
|
|
562
573
|
<span class="cline-any cline-no"> </span>
|
|
@@ -570,6 +581,9 @@
|
|
|
570
581
|
<span class="cline-any cline-neutral"> </span>
|
|
571
582
|
<span class="cline-any cline-neutral"> </span>
|
|
572
583
|
<span class="cline-any cline-neutral"> </span>
|
|
584
|
+
<span class="cline-any cline-neutral"> </span>
|
|
585
|
+
<span class="cline-any cline-neutral"> </span>
|
|
586
|
+
<span class="cline-any cline-neutral"> </span>
|
|
573
587
|
<span class="cline-any cline-yes">1x</span>
|
|
574
588
|
<span class="cline-any cline-neutral"> </span>
|
|
575
589
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -580,6 +594,10 @@
|
|
|
580
594
|
<span class="cline-any cline-neutral"> </span>
|
|
581
595
|
<span class="cline-any cline-neutral"> </span>
|
|
582
596
|
<span class="cline-any cline-neutral"> </span>
|
|
597
|
+
<span class="cline-any cline-neutral"> </span>
|
|
598
|
+
<span class="cline-any cline-neutral"> </span>
|
|
599
|
+
<span class="cline-any cline-neutral"> </span>
|
|
600
|
+
<span class="cline-any cline-neutral"> </span>
|
|
583
601
|
<span class="cline-any cline-yes">1x</span>
|
|
584
602
|
<span class="cline-any cline-neutral"> </span>
|
|
585
603
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -599,10 +617,10 @@
|
|
|
599
617
|
<span class="cline-any cline-neutral"> </span>
|
|
600
618
|
<span class="cline-any cline-neutral"> </span>
|
|
601
619
|
<span class="cline-any cline-neutral"> </span>
|
|
602
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useState, useEffect } from
|
|
603
|
-
import { pie, arc } from
|
|
604
|
-
import { select, event } from
|
|
605
|
-
import PropTypes from
|
|
620
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useState, useEffect } from "react";
|
|
621
|
+
import { pie, arc } from "d3-shape";
|
|
622
|
+
import { select, event } from "d3-selection";
|
|
623
|
+
import PropTypes from "prop-types";
|
|
606
624
|
|
|
607
625
|
const WIDTH = 210;
|
|
608
626
|
const HEIGHT = 210;
|
|
@@ -610,260 +628,269 @@ const RADIUS = Math.min(WIDTH, HEIGHT) / 2;
|
|
|
610
628
|
const GAP_VALUE = 2.5;
|
|
611
629
|
|
|
612
630
|
const ScoreChart = ({ performanceYear, chartData, linkCallback }) => {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
631
|
+
const [hasLegend, setHasLegend] = useState(false);
|
|
632
|
+
const [titleMapping, setTitleMapping] = useState({
|
|
633
|
+
quality: "Quality Measures",
|
|
634
|
+
aci: "Advancing Care Info",
|
|
635
|
+
pi: "Promoting Interoperability",
|
|
636
|
+
ia: "Improvement Activities",
|
|
637
|
+
cost: "Cost",
|
|
638
|
+
});
|
|
621
639
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
640
|
+
const { categories } = chartData;
|
|
641
|
+
let legendToggler;
|
|
642
|
+
let legend;
|
|
625
643
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
<span class="cstat-no" title="statement not covered" >
|
|
629
|
-
|
|
630
|
-
|
|
644
|
+
const getAdvancingCareLabel = () => {
|
|
645
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (performanceYear > 2017) {
|
|
646
|
+
<span class="cstat-no" title="statement not covered" > setTitleMapping({</span>
|
|
647
|
+
...titleMapping,
|
|
648
|
+
aci: "Promoting Interoperability",
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
};
|
|
631
652
|
|
|
632
|
-
|
|
633
|
-
<span class="cstat-no" title="statement not covered" >
|
|
634
|
-
<span class="cstat-no" title="statement not covered" >
|
|
635
|
-
|
|
653
|
+
const redirectToCategory = <span class="fstat-no" title="function not covered" >(l</span>ink, categoryId) => {
|
|
654
|
+
<span class="cstat-no" title="statement not covered" > if (!link) {</span>
|
|
655
|
+
<span class="cstat-no" title="statement not covered" > return;</span>
|
|
656
|
+
}
|
|
636
657
|
|
|
637
|
-
|
|
638
|
-
<span class="cstat-no" title="statement not covered" >
|
|
639
|
-
<span class="cstat-no" title="statement not covered" >
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
658
|
+
// track explicitly chart legends
|
|
659
|
+
<span class="cstat-no" title="statement not covered" > if (window.utag) {</span>
|
|
660
|
+
<span class="cstat-no" title="statement not covered" > window.utag.track("link", {</span>
|
|
661
|
+
ga_event_category: "SidebarNav",
|
|
662
|
+
ga_event_action: `GoTo${categoryId}`,
|
|
663
|
+
ga_event_label: categoryId,
|
|
664
|
+
});
|
|
665
|
+
}
|
|
645
666
|
|
|
646
|
-
<span class="cstat-no" title="statement not covered" >
|
|
647
|
-
<span class="cstat-no" title="statement not covered" >
|
|
648
|
-
|
|
649
|
-
<span class="cstat-no" title="statement not covered" >
|
|
650
|
-
|
|
651
|
-
|
|
667
|
+
<span class="cstat-no" title="statement not covered" > if (linkCallback) {</span>
|
|
668
|
+
<span class="cstat-no" title="statement not covered" > linkCallback(link);</span>
|
|
669
|
+
} else {
|
|
670
|
+
<span class="cstat-no" title="statement not covered" > window.location.href = link;</span>
|
|
671
|
+
}
|
|
672
|
+
};
|
|
652
673
|
|
|
653
|
-
|
|
654
|
-
|
|
674
|
+
const draw = (chartData) => {
|
|
675
|
+
const scorePie = pie().sort(null);
|
|
655
676
|
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
677
|
+
// Removing invalid categories
|
|
678
|
+
const categories = chartData.categories.filter(
|
|
679
|
+
({ maxContribution }) => !!maxContribution
|
|
680
|
+
);
|
|
660
681
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
682
|
+
// Calculating the sum of valid categories in order to calculate ratios
|
|
683
|
+
const categorySum = categories
|
|
684
|
+
.map(({ maxContribution }) => maxContribution)
|
|
685
|
+
.reduce((sum, current) => sum + current);
|
|
665
686
|
|
|
666
|
-
|
|
667
|
-
<span class="cstat-no" title="statement not covered" >
|
|
668
|
-
|
|
687
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (!categorySum) {
|
|
688
|
+
<span class="cstat-no" title="statement not covered" > return;</span>
|
|
689
|
+
}
|
|
669
690
|
|
|
670
|
-
|
|
691
|
+
select(".score-chart").selectAll("*").remove();
|
|
671
692
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
693
|
+
const svg = select(".score-chart")
|
|
694
|
+
.attr("width", WIDTH)
|
|
695
|
+
.attr("height", HEIGHT);
|
|
675
696
|
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
697
|
+
const chartArc = arc()
|
|
698
|
+
.innerRadius(RADIUS - 1.5)
|
|
699
|
+
.outerRadius(RADIUS - 25);
|
|
679
700
|
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
<span class="cstat-no" title="statement not covered" >
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
<span class="cstat-no" title="statement not covered" >
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
701
|
+
// Preparing the data structure with ratios: [ FILLED, EMPTY, TRANSPARENT, FILLED, EMPTY, ... ]
|
|
702
|
+
let data;
|
|
703
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (categories.length === 0) {
|
|
704
|
+
<span class="cstat-no" title="statement not covered" > data = [];</span>
|
|
705
|
+
} else <span class="missing-if-branch" title="if path not taken" >I</span>if (categories.length === 1) {
|
|
706
|
+
const { value, maxContribution } = <span class="cstat-no" title="statement not covered" >categories[0];</span>
|
|
707
|
+
<span class="cstat-no" title="statement not covered" > data = [value || 0, maxContribution - value];</span>
|
|
708
|
+
} else {
|
|
709
|
+
data = categories
|
|
710
|
+
.map(({ value, maxContribution }) => [
|
|
711
|
+
value || <span class="branch-1 cbranch-no" title="branch not covered" >0,</span>
|
|
712
|
+
maxContribution - value,
|
|
713
|
+
GAP_VALUE * (categorySum / 100),
|
|
714
|
+
])
|
|
715
|
+
.reduce((a, b) => a.concat(b), []);
|
|
716
|
+
}
|
|
696
717
|
|
|
697
|
-
|
|
718
|
+
svg.append("title").attr("id", "titleID").text("Your submission score");
|
|
698
719
|
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
.text(`${chartData.finalScore} out of 100`);
|
|
720
|
+
svg.append("desc")
|
|
721
|
+
.attr("id", "descID")
|
|
722
|
+
.text(`${chartData.finalScore} out of 100`);
|
|
703
723
|
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
<span class="cstat-no" title="statement not covered" >
|
|
743
|
-
|
|
744
|
-
<span class="cstat-no" title="statement not covered" >
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
<span class="cstat-no" title="statement not covered" >
|
|
751
|
-
|
|
724
|
+
// Setting up the arcs
|
|
725
|
+
let arcs = svg
|
|
726
|
+
.append("g")
|
|
727
|
+
.attr("class", "arcs")
|
|
728
|
+
.attr("role", "presentation")
|
|
729
|
+
.selectAll("g.arc")
|
|
730
|
+
.data(scorePie(data))
|
|
731
|
+
.enter()
|
|
732
|
+
.append("g")
|
|
733
|
+
.attr("class", (d, i) => {
|
|
734
|
+
let role;
|
|
735
|
+
if (i % 3 === 0) {
|
|
736
|
+
role = "filled";
|
|
737
|
+
} else if (i % 3 === 1) {
|
|
738
|
+
role = "empty";
|
|
739
|
+
} else {
|
|
740
|
+
role = "transparent";
|
|
741
|
+
}
|
|
742
|
+
return `arc ${categories[parseInt(i / 3)].name} ${role}`;
|
|
743
|
+
})
|
|
744
|
+
.attr("transform", `translate(${RADIUS}, ${RADIUS})`)
|
|
745
|
+
// For accessibility, we add keyboard access to the filled slices
|
|
746
|
+
.attr("tabindex", (d, i) => {
|
|
747
|
+
let tabindex = -1;
|
|
748
|
+
if (i % 3 === 0) {
|
|
749
|
+
tabindex = 0;
|
|
750
|
+
}
|
|
751
|
+
return tabindex;
|
|
752
|
+
})
|
|
753
|
+
// IE for for focusable svg elements
|
|
754
|
+
.attr("focusable", (d, i) => {
|
|
755
|
+
if (i % 3 === 0) {
|
|
756
|
+
return true;
|
|
757
|
+
}
|
|
758
|
+
})
|
|
759
|
+
// For accessibility, we add keyboard access to the filled slices
|
|
760
|
+
.on("keyup", <span class="fstat-no" title="function not covered" >(d</span>, i) => {
|
|
761
|
+
const code = <span class="cstat-no" title="statement not covered" >event.keyCode || event.which;</span>
|
|
762
|
+
<span class="cstat-no" title="statement not covered" > if (code === 13) {</span>
|
|
763
|
+
const { name, link } = <span class="cstat-no" title="statement not covered" >categories[parseInt(i / 3)];</span>
|
|
764
|
+
<span class="cstat-no" title="statement not covered" > redirectToCategory(link, name);</span>
|
|
765
|
+
}
|
|
766
|
+
})
|
|
767
|
+
// On click - go to category page
|
|
768
|
+
.on("click", <span class="fstat-no" title="function not covered" >(d</span>, i) => {
|
|
769
|
+
const { name, link } = <span class="cstat-no" title="statement not covered" >categories[parseInt(i / 3)];</span>
|
|
770
|
+
<span class="cstat-no" title="statement not covered" > redirectToCategory(link, name);</span>
|
|
771
|
+
});
|
|
752
772
|
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
773
|
+
// Add accessibility description
|
|
774
|
+
arcs.append("desc").text((d, i) => {
|
|
775
|
+
if (i % 3 === 0) {
|
|
776
|
+
const { name, value, maxContribution } =
|
|
777
|
+
categories[parseInt(i / 3)];
|
|
778
|
+
return `${titleMapping[name]} ${value} out of ${maxContribution}`;
|
|
779
|
+
}
|
|
780
|
+
});
|
|
760
781
|
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
<span class="cstat-no" title="statement not covered" >
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
<span class="cstat-no" title="statement not covered" >
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
<span class="cstat-no" title="statement not covered" >
|
|
780
|
-
|
|
782
|
+
arcs.append("path")
|
|
783
|
+
.attr("d", chartArc)
|
|
784
|
+
// On mouse over - show category tooltip
|
|
785
|
+
.on("mouseover", <span class="fstat-no" title="function not covered" >(d</span>, i) => {
|
|
786
|
+
const { name, value, maxContribution } =
|
|
787
|
+
<span class="cstat-no" title="statement not covered" > categories[parseInt(i / 3)];</span>
|
|
788
|
+
<span class="cstat-no" title="statement not covered" > select(".chart-tooltip")</span>
|
|
789
|
+
.style("opacity", 1)
|
|
790
|
+
.text(`${titleMapping[name]} ${value}/${maxContribution}`);
|
|
791
|
+
})
|
|
792
|
+
// On mouse move - move category tooltip
|
|
793
|
+
.on("mousemove", <span class="fstat-no" title="function not covered" >()</span> => {
|
|
794
|
+
<span class="cstat-no" title="statement not covered" > select(".chart-tooltip")</span>
|
|
795
|
+
.style("top", event.clientY - HEIGHT + 10 + "px")
|
|
796
|
+
.style("left", event.clientX + "px");
|
|
797
|
+
})
|
|
798
|
+
// On mouse out - hide category tooltip
|
|
799
|
+
.on("mouseout", <span class="fstat-no" title="function not covered" >()</span> => {
|
|
800
|
+
<span class="cstat-no" title="statement not covered" > select(".chart-tooltip").style("opacity", 0);</span>
|
|
801
|
+
});
|
|
781
802
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
803
|
+
// Adding title and subtitle
|
|
804
|
+
const text = svg
|
|
805
|
+
.append("g")
|
|
806
|
+
.attr("text-anchor", "middle")
|
|
807
|
+
.attr("transform", `translate(${WIDTH / 2}, ${HEIGHT / 2})`);
|
|
787
808
|
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
.text(chartData.finalScore);
|
|
809
|
+
// Adding title - X%
|
|
810
|
+
text.append("text")
|
|
811
|
+
.attr("y", 4)
|
|
812
|
+
.attr("class", "chart-title")
|
|
813
|
+
.text(chartData.finalScore);
|
|
794
814
|
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
};
|
|
815
|
+
// Adding subtitle - OUT OF 100
|
|
816
|
+
text.append("text")
|
|
817
|
+
.attr("y", 24)
|
|
818
|
+
.attr("class", "chart-subtitle")
|
|
819
|
+
.text("OUT OF 100");
|
|
820
|
+
};
|
|
802
821
|
|
|
803
|
-
|
|
804
|
-
<span class="cstat-no" title="statement not covered" >
|
|
805
|
-
|
|
822
|
+
const toggleLegend = <span class="fstat-no" title="function not covered" >()</span> => {
|
|
823
|
+
<span class="cstat-no" title="statement not covered" > setHasLegend(!hasLegend);</span>
|
|
824
|
+
};
|
|
806
825
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
826
|
+
useEffect(() => {
|
|
827
|
+
<span class="missing-if-branch" title="else path not taken" >E</span>if (chartData?.finalScore) {
|
|
828
|
+
draw(chartData);
|
|
829
|
+
getAdvancingCareLabel();
|
|
830
|
+
}
|
|
831
|
+
}, [chartData?.finalScore]);
|
|
832
|
+
|
|
833
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (hasLegend) {
|
|
834
|
+
<span class="cstat-no" title="statement not covered" > legendToggler = (</span>
|
|
835
|
+
<button className="open" type="button" aria-pressed="true">
|
|
836
|
+
Hide Legend
|
|
837
|
+
<svg
|
|
838
|
+
className="right-icon rotated"
|
|
839
|
+
aria-hidden="true"
|
|
840
|
+
focusable="false"
|
|
841
|
+
>
|
|
842
|
+
<use xlinkHref="#chevron-down" />
|
|
843
|
+
</svg>
|
|
844
|
+
</button>
|
|
845
|
+
);
|
|
846
|
+
<span class="cstat-no" title="statement not covered" > legend = categories.map(</span>
|
|
847
|
+
<span class="fstat-no" title="function not covered" > ({</span> name, value, maxContribution, link }, index) => {
|
|
848
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
849
|
+
<li key={name} className="legend-axis">
|
|
850
|
+
<button onClick={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >redirectToCategory(link, name)}</span>>
|
|
851
|
+
<span className={`legend-axis-color ${name}`} />
|
|
852
|
+
&nbsp;
|
|
853
|
+
<span className="legend-axis-title">
|
|
854
|
+
{titleMapping[name]}
|
|
855
|
+
</span>
|
|
856
|
+
&nbsp;
|
|
857
|
+
<span className="legend-axis-value">{`${value}/${maxContribution}`}</span>
|
|
858
|
+
</button>
|
|
859
|
+
</li>
|
|
860
|
+
);
|
|
861
|
+
}
|
|
862
|
+
);
|
|
863
|
+
} else {
|
|
864
|
+
legendToggler = (
|
|
865
|
+
<button type="button" aria-pressed="false">
|
|
866
|
+
Show Legend
|
|
867
|
+
<svg
|
|
868
|
+
className="right-icon"
|
|
869
|
+
aria-hidden="true"
|
|
870
|
+
focusable="false"
|
|
871
|
+
>
|
|
872
|
+
<use xlinkHref="#chevron-down" />
|
|
873
|
+
</svg>
|
|
874
|
+
</button>
|
|
875
|
+
);
|
|
811
876
|
}
|
|
812
|
-
}, [chartData?.finalScore]);
|
|
813
877
|
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
>
|
|
823
|
-
<use xlinkHref="#chevron-down" />
|
|
824
|
-
</svg>
|
|
825
|
-
</button>
|
|
878
|
+
return (
|
|
879
|
+
<div className="chart">
|
|
880
|
+
<svg className="score-chart" focusable="false" />
|
|
881
|
+
<div className="chart-tooltip off" />
|
|
882
|
+
<div className="chart-legend-toggler" onClick={toggleLegend}>
|
|
883
|
+
{legendToggler}
|
|
884
|
+
</div>
|
|
885
|
+
<ul className="chart-legend">{legend}</ul>
|
|
886
|
+
</div>
|
|
826
887
|
);
|
|
827
|
-
<span class="cstat-no" title="statement not covered" > legend = categories.map(<span class="fstat-no" title="function not covered" >({</span> name, value, maxContribution, link }, index) => {</span>
|
|
828
|
-
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
829
|
-
<li key={name} className="legend-axis">
|
|
830
|
-
<button onClick={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >redirectToCategory(link, name)}</span>>
|
|
831
|
-
<span className={`legend-axis-color ${name}`} />
|
|
832
|
-
&nbsp;
|
|
833
|
-
<span className="legend-axis-title">{titleMapping[name]}</span>
|
|
834
|
-
&nbsp;
|
|
835
|
-
<span className="legend-axis-value">{`${value}/${maxContribution}`}</span>
|
|
836
|
-
</button>
|
|
837
|
-
</li>
|
|
838
|
-
);
|
|
839
|
-
});
|
|
840
|
-
} else {
|
|
841
|
-
legendToggler = (
|
|
842
|
-
<button type="button" aria-pressed="false">
|
|
843
|
-
Show Legend
|
|
844
|
-
<svg className="right-icon" aria-hidden="true" focusable="false">
|
|
845
|
-
<use xlinkHref="#chevron-down" />
|
|
846
|
-
</svg>
|
|
847
|
-
</button>
|
|
848
|
-
);
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
return (
|
|
852
|
-
<div className="chart">
|
|
853
|
-
<svg className="score-chart" focusable="false" />
|
|
854
|
-
<div className="chart-tooltip off" />
|
|
855
|
-
<div className="chart-legend-toggler" onClick={toggleLegend}>
|
|
856
|
-
{legendToggler}
|
|
857
|
-
</div>
|
|
858
|
-
<ul className="chart-legend">{legend}</ul>
|
|
859
|
-
</div>
|
|
860
|
-
);
|
|
861
888
|
};
|
|
862
889
|
|
|
863
890
|
ScoreChart.propTypes = {
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
891
|
+
chartData: PropTypes.object,
|
|
892
|
+
linkCallback: PropTypes.func,
|
|
893
|
+
performanceYear: PropTypes.number,
|
|
867
894
|
};
|
|
868
895
|
|
|
869
896
|
export default ScoreChart;
|
|
@@ -874,7 +901,7 @@ export default ScoreChart;
|
|
|
874
901
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
875
902
|
Code coverage generated by
|
|
876
903
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
877
|
-
at
|
|
904
|
+
at Thu Mar 24 2022 11:31:04 GMT-0700 (Pacific Daylight Time)
|
|
878
905
|
</div>
|
|
879
906
|
<script src="../../../../prettify.js"></script>
|
|
880
907
|
<script>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at
|
|
119
|
+
at Thu Mar 24 2022 11:31:04 GMT-0700 (Pacific Daylight Time)
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../../../prettify.js"></script>
|
|
122
122
|
<script>
|