@madie/madie-design-system 1.0.0
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/.storybook/.babelrc +4 -0
- package/.storybook/main.js +89 -0
- package/.storybook/preview-head.html +9 -0
- package/.storybook/preview.js +5 -0
- package/README.md +5 -0
- 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 +46 -0
- package/components/Breadcrumb/Breadcrumb.md +28 -0
- package/components/Breadcrumb/Breadcrumb.stories.js +76 -0
- package/components/Breadcrumb/index.js +83 -0
- package/components/Button/Button.stories.js +121 -0
- package/components/Button/index.js +90 -0
- package/components/CalloutBox/CalloutBox.stories.js +94 -0
- package/components/CalloutBox/index.js +109 -0
- package/components/Card/Card.stories.js +163 -0
- package/components/Card/index.js +137 -0
- package/components/Dropdown/Dropdown.stories.js +94 -0
- package/components/Dropdown/index.js +85 -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/Footer.stories.js +20 -0
- package/components/Footer/FooterUI.jsx +269 -0
- package/components/Footer/LegacyFooterUI.jsx +194 -0
- package/components/Footer/SocialLinks.jsx +60 -0
- package/components/Footer/Subscribe.jsx +34 -0
- package/components/Footer/footer.js +30 -0
- package/components/Header/Header.md +111 -0
- package/components/Header/Header.stories.js +32 -0
- package/components/Header/HeaderAccountMenu.jsx +169 -0
- package/components/Header/HeaderCancel.jsx +16 -0
- package/components/Header/HeaderContainer.jsx +63 -0
- package/components/Header/HeaderLogo.jsx +42 -0
- package/components/Header/HeaderMenuButton.js +50 -0
- package/components/Header/HeaderMenuItem.jsx +232 -0
- package/components/Header/HeaderMenuLink.js +50 -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 +57 -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 +52 -0
- package/components/Header/utag-helpers.js +9 -0
- package/components/Infotip/Infotip.jsx +75 -0
- package/components/Infotip/Infotip.stories.js +50 -0
- package/components/Infotip/InfotipIcon.jsx +41 -0
- package/components/Infotip/index.js +3 -0
- package/components/Link/Link.stories.js +81 -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/Modal.stories.js +159 -0
- package/components/Modal/index.jsx +22 -0
- package/components/NotificationBanner/NotificationBanner.stories.js +23 -0
- package/components/NotificationBanner/index.js +265 -0
- package/components/SanitizedContent/index.jsx +200 -0
- package/components/Search/Search.stories.js +21 -0
- package/components/Search/index.js +85 -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 +208 -0
- package/components/SideNav/Content/LevelTwoContent.jsx +216 -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 +249 -0
- package/components/SideNav/Links/NavLinkInline.jsx +107 -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/SideNav.stories.js +379 -0
- package/components/SideNav/UI/SideNavUI.jsx +333 -0
- package/components/SideNav/UI/default-content.json +99 -0
- package/components/SideNav/UI/index.js +3 -0
- package/components/SideNav/helpers.js +49 -0
- package/components/SideNav/index.js +53 -0
- package/components/Spinner/index.js +9 -0
- package/components/Tabs/Tab.js +26 -0
- package/components/Tabs/TabPanel.js +34 -0
- package/components/Tabs/Tabs.stories.js +120 -0
- package/components/Tabs/index.js +95 -0
- package/components/TextInput/TextInput.stories.js +118 -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/UnwrappedSpinner/index.js +8 -0
- package/components/hooks/useGetConfig.js +74 -0
- package/components/index.js +126 -0
- package/dist/browser.js +3 -0
- package/dist/browser.js.LICENSE.txt +54 -0
- package/dist/browser.js.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.LICENSE.txt +54 -0
- package/dist/index.js.map +1 -0
- package/dist/react/index.js +3 -0
- package/dist/react/index.js.LICENSE.txt +71 -0
- package/dist/react/index.js.map +1 -0
- package/fonts/FontAwesome.otf +0 -0
- package/fonts/OFL.txt +92 -0
- package/fonts/Rubik-Black.ttf +0 -0
- package/fonts/Rubik-BlackItalic.ttf +0 -0
- package/fonts/Rubik-Bold.ttf +0 -0
- package/fonts/Rubik-BoldItalic.ttf +0 -0
- package/fonts/Rubik-Italic.ttf +0 -0
- package/fonts/Rubik-Light.ttf +0 -0
- package/fonts/Rubik-LightItalic.ttf +0 -0
- package/fonts/Rubik-Medium.ttf +0 -0
- package/fonts/Rubik-MediumItalic.ttf +0 -0
- package/fonts/Rubik-Regular.ttf +0 -0
- package/fonts/fontawesome-webfont.eot +0 -0
- package/fonts/fontawesome-webfont.svg +2671 -0
- package/fonts/fontawesome-webfont.ttf +0 -0
- package/fonts/fontawesome-webfont.woff +0 -0
- package/fonts/fontawesome-webfont.woff2 +0 -0
- package/images/favicon/android-chrome-192x192.png +0 -0
- package/images/favicon/android-chrome-256x256.png +0 -0
- package/images/favicon/apple-touch-icon.png +0 -0
- package/images/favicon/browserconfig.xml +9 -0
- package/images/favicon/favicon-16x16.png +0 -0
- package/images/favicon/favicon-32x32.png +0 -0
- package/images/favicon/favicon.ico +0 -0
- package/images/favicon/manifest.json +18 -0
- package/images/favicon/mstile-150x150.png +0 -0
- package/images/favicon/safari-pinned-tab.svg +32 -0
- package/images/hhs-logo-black.svg +10 -0
- package/images/hhs-logo-white.svg +10 -0
- package/images/icons/close-x.svg +6 -0
- package/images/icons/help-headset.svg +21 -0
- package/images/icons/svg/arrow-down.svg +1 -0
- package/images/icons/svg/arrow-download.svg +1 -0
- package/images/icons/svg/arrow-right.svg +1 -0
- package/images/icons/svg/calendar.svg +1 -0
- package/images/icons/svg/close.svg +1 -0
- package/images/icons/svg/download.svg +1 -0
- package/images/icons/svg/external.svg +1 -0
- package/images/icons/svg/file-upload.svg +1 -0
- package/images/icons/svg/print.svg +1 -0
- package/images/icons/svg/search.svg +7 -0
- package/images/icons/svg/tooltip-question.svg +6 -0
- package/images/icons/svg/trash.svg +1 -0
- package/images/icons/svg/upload.svg +1 -0
- package/images/qpp_logo_reversed.png +0 -0
- package/images/qpp_logo_rgb_color.png +0 -0
- package/index.js +31 -0
- package/jest/mediaFileTransformer.js +9 -0
- package/jest.config.js +188 -0
- package/lib/Chevron.jsx +32 -0
- package/lib/SvgComponents.jsx +539 -0
- package/lib/svg-definitions.svg +125 -0
- package/package.json +125 -0
- package/session/index.js +5 -0
- package/session/logout.js +65 -0
- package/session/refresh.js +49 -0
- package/session/ttl.js +37 -0
- package/styles/_global.scss +106 -0
- package/styles/_main.scss +15 -0
- package/styles/_paths.scss +1 -0
- package/styles/_qpp-style.scss +31 -0
- package/styles/components/_accordion.scss +289 -0
- package/styles/components/_alerts.scss +54 -0
- package/styles/components/_autocomplete.scss +47 -0
- package/styles/components/_breadcrumbs.scss +64 -0
- package/styles/components/_buttons.scss +580 -0
- package/styles/components/_error-page.scss +56 -0
- package/styles/components/_flash-notification.scss +98 -0
- package/styles/components/_fonts.scss +42 -0
- package/styles/components/_forms.scss +277 -0
- package/styles/components/_grid.scss +37 -0
- package/styles/components/_info-modal.scss +139 -0
- package/styles/components/_links.scss +12 -0
- package/styles/components/_modals.scss +18 -0
- package/styles/components/_notification-banner.scss +165 -0
- package/styles/components/_panels.scss +61 -0
- package/styles/components/_pie-chart.scss +13 -0
- package/styles/components/_score-chart.scss +164 -0
- package/styles/components/_spinner.scss +7 -0
- package/styles/components/_tables.scss +111 -0
- package/styles/components/_tabs.scss +69 -0
- package/styles/components/_text.scss +150 -0
- package/styles/components/_toggles.scss +3 -0
- package/styles/components/_tooltip.scss +23 -0
- package/styles/components/_variables.scss +157 -0
- package/styles/components/_wells.scss +92 -0
- package/styles/qppds/README.md +0 -0
- package/styles/qppds/base/_backgrounds.scss +7 -0
- package/styles/qppds/base/_fonts.scss +26 -0
- package/styles/qppds/base/_icon.scss +23 -0
- package/styles/qppds/base/_layout.scss +5 -0
- package/styles/qppds/base/_typography.scss +85 -0
- package/styles/qppds/base/index.scss +8 -0
- package/styles/qppds/components/_alert.scss +95 -0
- package/styles/qppds/components/_breadcrumbs.scss +70 -0
- package/styles/qppds/components/_button.scss +292 -0
- package/styles/qppds/components/_card.scss +175 -0
- package/styles/qppds/components/_dropdown.scss +55 -0
- package/styles/qppds/components/_footer.scss +597 -0
- package/styles/qppds/components/_header.scss +892 -0
- package/styles/qppds/components/_link.scss +52 -0
- package/styles/qppds/components/_modal.scss +118 -0
- package/styles/qppds/components/_page-header.scss +67 -0
- package/styles/qppds/components/_pagination.scss +227 -0
- package/styles/qppds/components/_search.scss +112 -0
- package/styles/qppds/components/_sidebar.scss +9 -0
- package/styles/qppds/components/_table.scss +139 -0
- package/styles/qppds/components/_tabs.scss +197 -0
- package/styles/qppds/components/_text-input.scss +60 -0
- package/styles/qppds/components/index.scss +16 -0
- package/styles/qppds/components/sidebar/_animations.scss +38 -0
- package/styles/qppds/components/sidebar/_cms.scss +61 -0
- package/styles/qppds/components/sidebar/_details.scss +58 -0
- package/styles/qppds/components/sidebar/_links.scss +444 -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 +4 -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 +33 -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 +65 -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 +3 -0
- package/styles/qppds/settings/variables/_layout.scss +67 -0
- package/styles/qppds/settings/variables/_type.scss +132 -0
- package/styles/qppds/utilities/_background-color.scss +134 -0
- package/styles/qppds/utilities/_color.scss +32 -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/_height.scss +38 -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/_width.scss +79 -0
- package/styles/qppds/utilities/index.scss +15 -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 +46 -0
- package/styles/utility/_utilities.scss +73 -0
- package/test/components/Accordion.test.js +12 -0
- package/test/components/ErrorUI.test.js +33 -0
- package/test/components/FooterUI.test.js +90 -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 +9 -0
- package/webpack.config.js +147 -0
- package/webpack.config.react.js +86 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
NavLinkContainer,
|
|
4
|
+
NavLinkInline,
|
|
5
|
+
NavLinkDrawer,
|
|
6
|
+
NavItemInline,
|
|
7
|
+
} from '../Links';
|
|
8
|
+
import AnimationGroup from '../AnimationGroup/AnimationGroup';
|
|
9
|
+
import { PracticeDetails } from '../Details';
|
|
10
|
+
import { ScoreChart } from '../Chart';
|
|
11
|
+
import PropTypes from 'prop-types';
|
|
12
|
+
import {
|
|
13
|
+
AccountHomeIcon,
|
|
14
|
+
DashboardIcon,
|
|
15
|
+
StarIcon,
|
|
16
|
+
CliniciansIcon,
|
|
17
|
+
ScoreIncrease,
|
|
18
|
+
TooltipIcon,
|
|
19
|
+
} from '../../../lib/SvgComponents.jsx';
|
|
20
|
+
import {
|
|
21
|
+
submissionsUrl,
|
|
22
|
+
manageUrl,
|
|
23
|
+
dashboardUrl,
|
|
24
|
+
performanceFeedbackUrl,
|
|
25
|
+
} from '../helpers';
|
|
26
|
+
|
|
27
|
+
const PAST_REPORTING_YEARS = ['2017', '2018'];
|
|
28
|
+
|
|
29
|
+
const LevelTwoContent = ({
|
|
30
|
+
isExpanded,
|
|
31
|
+
chartData,
|
|
32
|
+
showReportingLinks,
|
|
33
|
+
config: {
|
|
34
|
+
chartActive = true,
|
|
35
|
+
openDrawersByDefault,
|
|
36
|
+
linkCallback,
|
|
37
|
+
updateTime,
|
|
38
|
+
practiceId,
|
|
39
|
+
practiceName,
|
|
40
|
+
practiceTin,
|
|
41
|
+
apmEntityId,
|
|
42
|
+
isConnectedUsersPage,
|
|
43
|
+
vgId,
|
|
44
|
+
roleAbbr,
|
|
45
|
+
performanceYear,
|
|
46
|
+
finalFeedbackOpen,
|
|
47
|
+
isApmPaymentDetailsPage,
|
|
48
|
+
useTooltips,
|
|
49
|
+
cpcPlusId,
|
|
50
|
+
pcfId,
|
|
51
|
+
} = {},
|
|
52
|
+
}) => {
|
|
53
|
+
const linkClass = isExpanded ? 'link-inline' : 'link-collapsed';
|
|
54
|
+
let links = [];
|
|
55
|
+
|
|
56
|
+
if (isApmPaymentDetailsPage) {
|
|
57
|
+
const apmDetailsUrl = '/user/apm-incentive-payments/(.*)/practice-details';
|
|
58
|
+
links.push(
|
|
59
|
+
<NavItemInline
|
|
60
|
+
icon={<CliniciansIcon />}
|
|
61
|
+
className={linkClass}
|
|
62
|
+
label="Payment Details"
|
|
63
|
+
urlExpressionToMatch={apmDetailsUrl}
|
|
64
|
+
showLabel={isExpanded}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
} else {
|
|
68
|
+
const linkLabel = isConnectedUsersPage
|
|
69
|
+
? 'Connected Users'
|
|
70
|
+
: 'Eligibility & Reporting';
|
|
71
|
+
let items = [];
|
|
72
|
+
|
|
73
|
+
const practiceUrlSegment =
|
|
74
|
+
performanceYear === '2017' || performanceYear === '2018' || !roleAbbr
|
|
75
|
+
? practiceId
|
|
76
|
+
: practiceId + '_' + roleAbbr;
|
|
77
|
+
|
|
78
|
+
if (showReportingLinks && !apmEntityId) {
|
|
79
|
+
items = [
|
|
80
|
+
{
|
|
81
|
+
url: `${submissionsUrl}/reporting/${practiceUrlSegment}/overview`,
|
|
82
|
+
label: vgId ? 'Virtual Group Reporting' : 'Group Reporting Overview',
|
|
83
|
+
items: [
|
|
84
|
+
{
|
|
85
|
+
url: `${submissionsUrl}/reporting/${practiceUrlSegment}/quality`,
|
|
86
|
+
label: 'Quality Measures',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
url: `${submissionsUrl}/reporting/${practiceUrlSegment}/aci`,
|
|
90
|
+
label: 'Promoting Interoperability',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
url: `${submissionsUrl}/reporting/${practiceUrlSegment}/ia`,
|
|
94
|
+
label: 'Improvement Activities',
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
}
|
|
100
|
+
links.push(
|
|
101
|
+
<NavLinkDrawer
|
|
102
|
+
key="connected-clinicians-link"
|
|
103
|
+
isAlwaysOpen
|
|
104
|
+
url={
|
|
105
|
+
!isConnectedUsersPage
|
|
106
|
+
? `${dashboardUrl}`
|
|
107
|
+
: `${manageUrl}/${practiceId}/connected-users`
|
|
108
|
+
}
|
|
109
|
+
isExpanded={isExpanded}
|
|
110
|
+
openByDefault={openDrawersByDefault}
|
|
111
|
+
leftIcon={<DashboardIcon />}
|
|
112
|
+
className={linkClass}
|
|
113
|
+
label={linkLabel}
|
|
114
|
+
linkCallback={linkCallback}
|
|
115
|
+
listOfLinks={
|
|
116
|
+
!isConnectedUsersPage && [
|
|
117
|
+
{
|
|
118
|
+
label: vgId
|
|
119
|
+
? 'Virtual Group Details & Participants'
|
|
120
|
+
: apmEntityId
|
|
121
|
+
? 'APM Entity Details & Participants'
|
|
122
|
+
: 'Practice Details & Clinicians',
|
|
123
|
+
items: items,
|
|
124
|
+
},
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
disabled={isConnectedUsersPage ? true : false}
|
|
128
|
+
/>
|
|
129
|
+
);
|
|
130
|
+
if (
|
|
131
|
+
(apmEntityId && performanceYear === '2018' && finalFeedbackOpen) ||
|
|
132
|
+
(!apmEntityId &&
|
|
133
|
+
!vgId &&
|
|
134
|
+
!isConnectedUsersPage &&
|
|
135
|
+
PAST_REPORTING_YEARS.indexOf(performanceYear) >= 0)
|
|
136
|
+
) {
|
|
137
|
+
links.push(
|
|
138
|
+
<NavLinkInline
|
|
139
|
+
key="performance-feedback-link"
|
|
140
|
+
icon={<StarIcon />}
|
|
141
|
+
className={linkClass}
|
|
142
|
+
url={performanceFeedbackUrl(
|
|
143
|
+
finalFeedbackOpen && performanceYear === '2018'
|
|
144
|
+
? performanceYear
|
|
145
|
+
: '2017'
|
|
146
|
+
)}
|
|
147
|
+
label="Performance Feedback"
|
|
148
|
+
linkCallback={linkCallback}
|
|
149
|
+
showLabel={isExpanded}
|
|
150
|
+
useTooltips={useTooltips}
|
|
151
|
+
/>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<div className="sidebar-content">
|
|
158
|
+
<AnimationGroup display={isExpanded}>
|
|
159
|
+
<NavLinkInline
|
|
160
|
+
icon={<AccountHomeIcon />}
|
|
161
|
+
url={submissionsUrl}
|
|
162
|
+
label="Account Home"
|
|
163
|
+
showLabel={isExpanded}
|
|
164
|
+
className="account-home-link"
|
|
165
|
+
linkCallback={linkCallback}
|
|
166
|
+
useTooltips={useTooltips}
|
|
167
|
+
/>
|
|
168
|
+
<hr />
|
|
169
|
+
</AnimationGroup>
|
|
170
|
+
<AnimationGroup display={isExpanded} className={'details'}>
|
|
171
|
+
<PracticeDetails
|
|
172
|
+
practiceName={practiceName}
|
|
173
|
+
{...(!practiceTin ? {} : { practiceTin })}
|
|
174
|
+
{...(!apmEntityId ? {} : { apmEntityId })}
|
|
175
|
+
{...(!vgId ? {} : { vgId })}
|
|
176
|
+
{...(!cpcPlusId ? {} : { cpcPlusId })}
|
|
177
|
+
{...(!pcfId ? {} : { pcfId })}
|
|
178
|
+
/>
|
|
179
|
+
<hr />
|
|
180
|
+
</AnimationGroup>
|
|
181
|
+
<div className="level-two-nav animation-flat">
|
|
182
|
+
<NavLinkContainer listOfLinks={links} />
|
|
183
|
+
<AnimationGroup display={isExpanded && chartActive} className="chart">
|
|
184
|
+
<div>
|
|
185
|
+
<hr />
|
|
186
|
+
<div className="chart-title">
|
|
187
|
+
<p className="title">Final Group Score</p>
|
|
188
|
+
<p className="disclaimer">
|
|
189
|
+
<svg className="left-icon" aria-hidden="true">
|
|
190
|
+
<ScoreIncrease />
|
|
191
|
+
</svg>
|
|
192
|
+
Score may increase
|
|
193
|
+
<svg className="right-icon" aria-hidden="true">
|
|
194
|
+
<TooltipIcon />
|
|
195
|
+
</svg>
|
|
196
|
+
</p>
|
|
197
|
+
{updateTime && (
|
|
198
|
+
<p className="timestamp">Last update at {updateTime}</p>
|
|
199
|
+
)}
|
|
200
|
+
</div>
|
|
201
|
+
<ScoreChart chartData={chartData} linkCallback={linkCallback} />
|
|
202
|
+
</div>
|
|
203
|
+
</AnimationGroup>
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
);
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
LevelTwoContent.propTypes = {
|
|
210
|
+
isExpanded: PropTypes.bool,
|
|
211
|
+
config: PropTypes.object,
|
|
212
|
+
chartData: PropTypes.object,
|
|
213
|
+
showReportingLinks: PropTypes.bool,
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
export default LevelTwoContent;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
const IndividualDetails = ({ individualName, individualNpi }) => {
|
|
5
|
+
return (
|
|
6
|
+
<div className="individual-container">
|
|
7
|
+
<h3 className="individual-name">{individualName}</h3>
|
|
8
|
+
<p className="individual-npi">NPI: {individualNpi}</p>
|
|
9
|
+
</div>
|
|
10
|
+
);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
IndividualDetails.propTypes = {
|
|
14
|
+
individualName: PropTypes.string,
|
|
15
|
+
individualNpi: PropTypes.string,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default IndividualDetails;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
const PracticeDetails = ({
|
|
5
|
+
practiceName,
|
|
6
|
+
practiceTin,
|
|
7
|
+
apmEntityId,
|
|
8
|
+
vgId,
|
|
9
|
+
cpcPlusId,
|
|
10
|
+
pcfId
|
|
11
|
+
}) => {
|
|
12
|
+
function renderId() {
|
|
13
|
+
if (cpcPlusId) {
|
|
14
|
+
return <p className="practice-tin">CPC+ ID: {cpcPlusId}</p>;
|
|
15
|
+
} else if (pcfId) {
|
|
16
|
+
return <p className="practice-tin">PCF ID: {pcfId}</p>;
|
|
17
|
+
} else if (apmEntityId) {
|
|
18
|
+
return <p className="practice-tin">APM Entity ID: {apmEntityId}</p>;
|
|
19
|
+
} else if (vgId) {
|
|
20
|
+
return <p className="practice-tin">VG ID: {vgId}</p>;
|
|
21
|
+
} else if (practiceTin) {
|
|
22
|
+
return <p className="practice-tin">TIN: {practiceTin}</p>;
|
|
23
|
+
} else {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className="practice-container">
|
|
30
|
+
<h2 className="practice-name">{practiceName || 'No name on record'}</h2>
|
|
31
|
+
{renderId()}
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
PracticeDetails.propTypes = {
|
|
37
|
+
practiceName: PropTypes.string,
|
|
38
|
+
practiceTin: PropTypes.string,
|
|
39
|
+
apmEntityId: PropTypes.string,
|
|
40
|
+
vgId: PropTypes.string,
|
|
41
|
+
cpcPlusId: PropTypes.string,
|
|
42
|
+
pcfId: PropTypes.string,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default PracticeDetails;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { handleNavigation } from '../helpers';
|
|
4
|
+
import { SwitchPractice, ChevronRight } from '../../../lib/SvgComponents.jsx';
|
|
5
|
+
|
|
6
|
+
const CmsSwitchLink = ({ linkCallback, url, label }) => {
|
|
7
|
+
return (
|
|
8
|
+
<div className="switch-container">
|
|
9
|
+
<a
|
|
10
|
+
href={url}
|
|
11
|
+
onClick={(e) => handleNavigation(e, linkCallback, label)}
|
|
12
|
+
className="switch-link"
|
|
13
|
+
>
|
|
14
|
+
<div className="button-partition">
|
|
15
|
+
<svg className="icon">
|
|
16
|
+
<SwitchPractice />
|
|
17
|
+
<title>Switch Practice Icon</title>
|
|
18
|
+
</svg>
|
|
19
|
+
<span>{label}</span>
|
|
20
|
+
</div>
|
|
21
|
+
<div className="button-partition">
|
|
22
|
+
<svg
|
|
23
|
+
className="icon right-icon rotated"
|
|
24
|
+
aria-hidden="true"
|
|
25
|
+
focusable="false"
|
|
26
|
+
>
|
|
27
|
+
<ChevronRight />
|
|
28
|
+
</svg>
|
|
29
|
+
</div>
|
|
30
|
+
</a>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
CmsSwitchLink.propTypes = {
|
|
36
|
+
linkCallback: PropTypes.func,
|
|
37
|
+
url: PropTypes.string,
|
|
38
|
+
label: PropTypes.string,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default CmsSwitchLink;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import AnimationGroup from '../AnimationGroup/AnimationGroup';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
|
|
5
|
+
const NavItemInline = (props) => {
|
|
6
|
+
const {
|
|
7
|
+
url,
|
|
8
|
+
urlExpressionToMatch,
|
|
9
|
+
className,
|
|
10
|
+
icon,
|
|
11
|
+
label,
|
|
12
|
+
isActive,
|
|
13
|
+
showLabel,
|
|
14
|
+
disabled,
|
|
15
|
+
} = props;
|
|
16
|
+
|
|
17
|
+
const localUrl = urlExpressionToMatch || url;
|
|
18
|
+
const urlRegExp = new RegExp(`${localUrl}/?$`);
|
|
19
|
+
const path = window.location.href && window.location.href.split('?')[0];
|
|
20
|
+
const currentPage = path && path.match(urlRegExp);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div
|
|
24
|
+
className={`${className} ${isActive || currentPage ? 'active' : ''} ${
|
|
25
|
+
disabled ? 'disabled' : ''
|
|
26
|
+
}`}
|
|
27
|
+
aria-label={label}
|
|
28
|
+
>
|
|
29
|
+
<svg
|
|
30
|
+
className={`left-icon ${disabled ? 'disabled' : ''}`}
|
|
31
|
+
aria-hidden="true"
|
|
32
|
+
focusable="false"
|
|
33
|
+
>
|
|
34
|
+
{icon}
|
|
35
|
+
</svg>
|
|
36
|
+
<AnimationGroup display={showLabel}>
|
|
37
|
+
<span tabIndex="-1">{label}</span>
|
|
38
|
+
</AnimationGroup>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
NavItemInline.propTypes = {
|
|
44
|
+
urlExpressionToMatch: PropTypes.string,
|
|
45
|
+
url: PropTypes.string,
|
|
46
|
+
className: PropTypes.string,
|
|
47
|
+
icon: PropTypes.element,
|
|
48
|
+
label: PropTypes.string,
|
|
49
|
+
isActive: PropTypes.bool,
|
|
50
|
+
showLabel: PropTypes.bool,
|
|
51
|
+
disabled: PropTypes.bool,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default NavItemInline;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
const NavLinkContainer = ({ listOfLinks, linkActiveFunc }) => {
|
|
5
|
+
const [activeLink, setActiveLink] = useState(null);
|
|
6
|
+
|
|
7
|
+
const toggleActive = (idx, disabled) => {
|
|
8
|
+
if (disabled || linkActiveFunc) return;
|
|
9
|
+
setActiveLink(idx);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<nav>
|
|
14
|
+
<ul>
|
|
15
|
+
{(listOfLinks || []).map((link, idx) => (
|
|
16
|
+
<li
|
|
17
|
+
key={idx.toString()}
|
|
18
|
+
onClick={() => toggleActive(idx, link.props.disabled)}
|
|
19
|
+
>
|
|
20
|
+
{React.cloneElement(link, { isActive: activeLink === idx })}
|
|
21
|
+
</li>
|
|
22
|
+
))}
|
|
23
|
+
</ul>
|
|
24
|
+
</nav>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
NavLinkContainer.propTypes = {
|
|
29
|
+
listOfLinks: PropTypes.array,
|
|
30
|
+
linkActiveFunc: PropTypes.func,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
NavLinkContainer.defaultProps = {
|
|
34
|
+
listOfLinks: null,
|
|
35
|
+
linkActiveFunc: null,
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default NavLinkContainer;
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
import { handleNavigation } from '../helpers';
|
|
5
|
+
import AnimationGroup from '../AnimationGroup/AnimationGroup';
|
|
6
|
+
|
|
7
|
+
const NavLinkDrawer = ({
|
|
8
|
+
className,
|
|
9
|
+
disabled,
|
|
10
|
+
isAlwaysOpen,
|
|
11
|
+
isExpanded,
|
|
12
|
+
items,
|
|
13
|
+
label,
|
|
14
|
+
leftIcon,
|
|
15
|
+
linkActiveFunc,
|
|
16
|
+
linkCallback,
|
|
17
|
+
listOfLinks,
|
|
18
|
+
openByDefault,
|
|
19
|
+
rightIcon,
|
|
20
|
+
sidebarExpand,
|
|
21
|
+
staticDrawer,
|
|
22
|
+
url,
|
|
23
|
+
isHighlighted,
|
|
24
|
+
darkerBackground,
|
|
25
|
+
leftBorderHighlightDisabled,
|
|
26
|
+
largerDrawerBottomPadding
|
|
27
|
+
}) => {
|
|
28
|
+
const [isOpen, setIsOpen] = useState(openByDefault);
|
|
29
|
+
|
|
30
|
+
const toggleDrawer = () => {
|
|
31
|
+
if (!isExpanded && typeof sidebarExpand === 'function') {
|
|
32
|
+
sidebarExpand();
|
|
33
|
+
setIsOpen(true);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (!isAlwaysOpen && !disabled) {
|
|
38
|
+
setIsOpen(!isOpen);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const isLinkActive = (link, func) => {
|
|
43
|
+
if (typeof func === 'function') {
|
|
44
|
+
return func(link);
|
|
45
|
+
}
|
|
46
|
+
return window.location.href.indexOf(link.url) > 0;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const isCurrentPage = (link, linkActiveFunc) => {
|
|
50
|
+
const targetItems = link.items || link.listOfLinks;
|
|
51
|
+
if (link.url && isLinkActive(link, linkActiveFunc)) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
return (
|
|
55
|
+
targetItems &&
|
|
56
|
+
targetItems.some((item) => isCurrentPage(item, linkActiveFunc))
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const buildLeftIconClasses = () => {
|
|
61
|
+
let leftIcon = `left-icon`;
|
|
62
|
+
|
|
63
|
+
if (isAlwaysOpen) {
|
|
64
|
+
leftIcon += ` always-open`;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (isHighlighted) {
|
|
68
|
+
leftIcon += ' fill-white';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return leftIcon;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Classes for the link drawer button
|
|
75
|
+
const currentPage = isCurrentPage(
|
|
76
|
+
{ items, listOfLinks, url },
|
|
77
|
+
linkActiveFunc
|
|
78
|
+
);
|
|
79
|
+
const expandedClass = currentPage ? 'expanded' : '';
|
|
80
|
+
|
|
81
|
+
const renderLeftIcon = (leftIcon) => {
|
|
82
|
+
if (leftIcon) {
|
|
83
|
+
return (<svg
|
|
84
|
+
className={`${buildLeftIconClasses()}`}
|
|
85
|
+
aria-hidden="true"
|
|
86
|
+
focusable="false"
|
|
87
|
+
>
|
|
88
|
+
{leftIcon}
|
|
89
|
+
</svg>)
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const hasDarkerBackground = (darkerBackground) => {
|
|
94
|
+
return darkerBackground ? 'background-highlight' : '';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const hasDarkerTitle = (darkerBackground) => {
|
|
98
|
+
return darkerBackground ? 'expanded currentPage' : '';
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const isLeftBorderHighlightDisabled = (leftBorderHighlightDisabled) => {
|
|
102
|
+
return leftBorderHighlightDisabled ? 'left-border-disabled' : ''
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const isHiddenWhileCollapsed = (isLeftBorderDisabled, isExpanded) => {
|
|
106
|
+
return isLeftBorderDisabled && !isExpanded ? 'hidden-nav-link-item' : '';
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const highlightTitle = (isHighlighted) => {
|
|
110
|
+
return isHighlighted && isExpanded ? 'highlight' : '';
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const hasLargerDrawBottomPadding = (largerDrawerBottomPadding) => {
|
|
114
|
+
return largerDrawerBottomPadding ? 'larger-drawer-bottom-padding' : '';
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const adjustItemSpacing = (largerDrawerBottomPadding) => {
|
|
118
|
+
return largerDrawerBottomPadding ? 'larger-item-spacing' : '';
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
if (disabled) {
|
|
123
|
+
setIsOpen(false);
|
|
124
|
+
}
|
|
125
|
+
if (isAlwaysOpen) {
|
|
126
|
+
setIsOpen(isAlwaysOpen);
|
|
127
|
+
}
|
|
128
|
+
}, []);
|
|
129
|
+
|
|
130
|
+
// Render the links recursively. This will theoretically allow for an infinite number of nested link items.
|
|
131
|
+
// className will either be empty, parent-link - top most node, or child-link.
|
|
132
|
+
const renderDrawerLinksRecursively = (navLinks, className = '') => {
|
|
133
|
+
return (
|
|
134
|
+
navLinks &&
|
|
135
|
+
navLinks.map((link) => {
|
|
136
|
+
if (link.type === 'divider') {
|
|
137
|
+
return (
|
|
138
|
+
<AnimationGroup display={true}>
|
|
139
|
+
<hr />
|
|
140
|
+
</AnimationGroup>
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return (
|
|
145
|
+
<li
|
|
146
|
+
key={link.label}
|
|
147
|
+
className={
|
|
148
|
+
isLinkActive(link, linkActiveFunc)
|
|
149
|
+
? `active-link ${className}`
|
|
150
|
+
: className
|
|
151
|
+
}
|
|
152
|
+
>
|
|
153
|
+
{link.url ? (
|
|
154
|
+
<a
|
|
155
|
+
href={link.url}
|
|
156
|
+
onClick={(e) => handleNavigation(e, linkCallback, link.label)}
|
|
157
|
+
tabIndex={isOpen ? '0' : '-1'}
|
|
158
|
+
data-track-category="SidebarNav"
|
|
159
|
+
data-track-action={`GoTo${
|
|
160
|
+
link.label ? link.label.split(' ').join('') : ''
|
|
161
|
+
}`}
|
|
162
|
+
data-track-label={link.label}
|
|
163
|
+
target="_self"
|
|
164
|
+
>
|
|
165
|
+
{link.label}
|
|
166
|
+
</a>
|
|
167
|
+
) : (
|
|
168
|
+
<div>{link.label}</div>
|
|
169
|
+
)}
|
|
170
|
+
{link.items && link.items.length > 0 && (
|
|
171
|
+
<ul aria-hidden={!isOpen}>
|
|
172
|
+
{renderDrawerLinksRecursively(link.items, 'child-link')}
|
|
173
|
+
</ul>
|
|
174
|
+
)}
|
|
175
|
+
</li>
|
|
176
|
+
);
|
|
177
|
+
})
|
|
178
|
+
);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
return (
|
|
182
|
+
<div className={staticDrawer ? 'static-drawer link-drawer' : 'link-drawer'}>
|
|
183
|
+
<button
|
|
184
|
+
onClick={toggleDrawer}
|
|
185
|
+
{...(!isAlwaysOpen ? { 'aria-pressed': isOpen } : {})}
|
|
186
|
+
tabIndex="0"
|
|
187
|
+
aria-label={label}
|
|
188
|
+
{...(isAlwaysOpen || disabled
|
|
189
|
+
? { disabled: isAlwaysOpen || disabled }
|
|
190
|
+
: {})}
|
|
191
|
+
className={`${className} ${expandedClass} ${highlightTitle(isHighlighted)} ${hasDarkerTitle(darkerBackground)}
|
|
192
|
+
${currentPage ? 'currentPage' : ''} ${isLeftBorderHighlightDisabled(leftBorderHighlightDisabled)}
|
|
193
|
+
${isHiddenWhileCollapsed(leftBorderHighlightDisabled, isExpanded)}`}
|
|
194
|
+
>
|
|
195
|
+
<div className={isExpanded ? 'link-body' : 'link-body collapsed'}>
|
|
196
|
+
{renderLeftIcon(leftIcon)}
|
|
197
|
+
<AnimationGroup display={isExpanded}>
|
|
198
|
+
<span>{label}</span>
|
|
199
|
+
</AnimationGroup>
|
|
200
|
+
</div>
|
|
201
|
+
{isExpanded && !isAlwaysOpen && (
|
|
202
|
+
<svg
|
|
203
|
+
className={`${isOpen ? 'right-icon rotated' : 'right-icon'}`}
|
|
204
|
+
focusable="false"
|
|
205
|
+
aria-hidden="true"
|
|
206
|
+
>
|
|
207
|
+
{rightIcon}
|
|
208
|
+
</svg>
|
|
209
|
+
)}
|
|
210
|
+
</button>
|
|
211
|
+
<AnimationGroup display={isExpanded}>
|
|
212
|
+
<div
|
|
213
|
+
className={`${currentPage ? 'currentPage' : ''} ${
|
|
214
|
+
isOpen && !disabled ? 'drawer open' : 'drawer'
|
|
215
|
+
} ${hasDarkerBackground(darkerBackground)} ${hasLargerDrawBottomPadding(largerDrawerBottomPadding)}`}
|
|
216
|
+
>
|
|
217
|
+
<ul aria-hidden={!isOpen}>
|
|
218
|
+
{listOfLinks &&
|
|
219
|
+
renderDrawerLinksRecursively(listOfLinks, `parent-link ${adjustItemSpacing(largerDrawerBottomPadding)}`)}
|
|
220
|
+
</ul>
|
|
221
|
+
</div>
|
|
222
|
+
</AnimationGroup>
|
|
223
|
+
</div>
|
|
224
|
+
);
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
NavLinkDrawer.propTypes = {
|
|
228
|
+
isExpanded: PropTypes.bool,
|
|
229
|
+
isAlwaysOpen: PropTypes.bool,
|
|
230
|
+
openByDefault: PropTypes.bool,
|
|
231
|
+
className: PropTypes.string,
|
|
232
|
+
rightIcon: PropTypes.element,
|
|
233
|
+
leftIcon: PropTypes.element,
|
|
234
|
+
label: PropTypes.string,
|
|
235
|
+
linkActiveFunc: PropTypes.func,
|
|
236
|
+
linkCallback: PropTypes.func,
|
|
237
|
+
listOfLinks: PropTypes.array,
|
|
238
|
+
disabled: PropTypes.bool,
|
|
239
|
+
sidebarExpand: PropTypes.func,
|
|
240
|
+
staticDrawer: PropTypes.bool,
|
|
241
|
+
items: PropTypes.object,
|
|
242
|
+
url: PropTypes.string,
|
|
243
|
+
isHighlighted: PropTypes.bool,
|
|
244
|
+
darkerBackground: PropTypes.bool,
|
|
245
|
+
leftBorderHighlightDisabled: PropTypes.bool,
|
|
246
|
+
largerDrawerBottomPadding: PropTypes.bool
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
export default NavLinkDrawer;
|