qpp-style 9.34.0 → 9.34.1
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/.eslintrc.js +11 -10
- package/.prettierrc +1 -0
- package/components/Accordion/index.jsx +13 -13
- package/components/Alert/index.js +7 -7
- package/components/Breadcrumb/index.js +5 -5
- package/components/Button/index.js +15 -15
- package/components/Details/DetailsIcons.js +3 -3
- package/components/Details/index.js +7 -7
- package/components/Dropdown/index.js +9 -9
- package/components/DropdownButton/Menu.js +4 -4
- package/components/DropdownButton/MenuButton.js +7 -7
- package/components/DropdownButton/MenuItem.js +5 -5
- package/components/DropdownButton/MenuItemLink.js +5 -5
- package/components/Error/Collapsible.jsx +3 -3
- package/components/Error/ErrorUI.jsx +4 -4
- package/components/Error/error.js +3 -3
- package/components/FlashNotification/FlashNotificationUI.jsx +8 -8
- package/components/FlashNotification/index.js +4 -4
- package/components/Footer/FooterUI.jsx +10 -10
- package/components/Footer/SocialLinks.jsx +1 -1
- package/components/Footer/Subscribe.jsx +1 -1
- package/components/Footer/footer.js +4 -4
- package/components/GovBanner/index.js +2 -2
- package/components/Header/HeaderAccountMenu.jsx +8 -8
- package/components/Header/HeaderCancel.jsx +2 -2
- package/components/Header/HeaderContainer.jsx +13 -13
- package/components/Header/HeaderLogo.jsx +2 -2
- package/components/Header/HeaderMenuButton.js +7 -7
- package/components/Header/HeaderMenuItem.jsx +37 -37
- package/components/Header/HeaderMenuLink.js +9 -9
- package/components/Header/HeaderMenuSignOutButton.js +9 -9
- package/components/Header/HeaderMobileButton.js +4 -4
- package/components/Header/HeaderUI.jsx +12 -12
- package/components/Header/HelpIcon.jsx +1 -1
- package/components/Header/ImpersonatorBanner.jsx +24 -24
- package/components/Header/NavigationButtonIcon.jsx +1 -1
- package/components/Header/header.js +3 -3
- package/components/Header/hooks.js +8 -8
- package/components/Header/utag-helpers.js +1 -1
- package/components/Infotip/Infotip.jsx +11 -11
- package/components/Infotip/InfotipContent.jsx +10 -10
- package/components/Infotip/InfotipIcon.jsx +5 -5
- package/components/Infotip/index.js +1 -1
- package/components/Link/index.js +11 -11
- package/components/Modal/LegacyModal.jsx +8 -8
- package/components/Modal/Modal.jsx +10 -10
- package/components/Modal/index.jsx +5 -5
- package/components/NotificationBanner/CollapsedView.js +4 -4
- package/components/NotificationBanner/ExpandedView.js +5 -5
- package/components/NotificationBanner/index.js +28 -28
- package/components/SanitizedContent/index.jsx +177 -177
- package/components/Search/index.js +14 -14
- package/components/Session/Session.jsx +8 -8
- package/components/Session/SessionDialogWrapped.jsx +3 -3
- package/components/Session/index.jsx +1 -1
- package/components/SideNav/AnimationGroup/AnimationGroup.jsx +5 -5
- package/components/SideNav/Content/LevelOneContent.jsx +10 -10
- package/components/SideNav/Content/SelectRole/index.js +5 -5
- package/components/SideNav/Content/SelectRole/utils.js +22 -22
- package/components/SideNav/Content/index.js +1 -1
- package/components/SideNav/Details/IndividualDetails.jsx +2 -2
- package/components/SideNav/Details/PracticeDetails.jsx +3 -3
- package/components/SideNav/Details/index.js +2 -2
- package/components/SideNav/Links/CmsSwitchLink.jsx +4 -4
- package/components/SideNav/Links/NavItemInline.jsx +7 -7
- package/components/SideNav/Links/NavLinkContainer.jsx +2 -2
- package/components/SideNav/Links/NavLinkDrawer.jsx +32 -32
- package/components/SideNav/Links/NavLinkInline.jsx +14 -14
- package/components/SideNav/Links/NavLinkToggle.jsx +7 -7
- package/components/SideNav/Links/index.js +5 -5
- package/components/SideNav/UI/SideNavUI.jsx +30 -30
- package/components/SideNav/UI/index.js +1 -1
- package/components/SideNav/helpers.js +82 -78
- package/components/SideNav/index.js +3 -3
- package/components/Tabs/Tabs.js +4 -4
- package/components/TextInput/index.js +21 -21
- package/components/hooks/useGetConfig.js +6 -6
- package/components/index.js +18 -18
- package/coverage/clover.xml +321 -427
- package/coverage/coverage-final.json +19 -21
- package/coverage/lcov-report/index.html +85 -115
- package/coverage/lcov-report/react/components/Accordion/index.html +1 -1
- package/coverage/lcov-report/react/components/Accordion/index.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Button/index.html +1 -1
- package/coverage/lcov-report/react/components/Button/index.js.html +1 -1
- package/coverage/lcov-report/react/components/Dropdown/index.html +1 -1
- package/coverage/lcov-report/react/components/Dropdown/index.js.html +1 -1
- package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Error/error.js.html +1 -1
- package/coverage/lcov-report/react/components/Error/index.html +1 -1
- package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Footer/footer.js.html +1 -1
- package/coverage/lcov-report/react/components/Footer/index.html +1 -1
- package/coverage/lcov-report/react/components/GovBanner/index.html +1 -1
- package/coverage/lcov-report/react/components/GovBanner/index.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +3 -3
- package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +2 -2
- package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +1 -1
- package/coverage/lcov-report/react/components/Header/header.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/hooks.js.html +1 -1
- package/coverage/lcov-report/react/components/Header/index.html +1 -1
- package/coverage/lcov-report/react/components/Header/utag-helpers.js.html +1 -1
- package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +30 -30
- package/coverage/lcov-report/react/components/Infotip/InfotipContent.jsx.html +8 -8
- package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +9 -9
- package/coverage/lcov-report/react/components/Infotip/index.html +23 -38
- package/coverage/lcov-report/react/components/Modal/LegacyModal.jsx.html +3 -3
- package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +40 -40
- package/coverage/lcov-report/react/components/Modal/index.html +32 -32
- package/coverage/lcov-report/react/components/Modal/index.jsx.html +19 -19
- package/coverage/lcov-report/react/components/NotificationBanner/CollapsedView.js.html +1 -1
- package/coverage/lcov-report/react/components/NotificationBanner/ExpandedView.js.html +1 -1
- package/coverage/lcov-report/react/components/NotificationBanner/index.html +1 -1
- package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +1 -1
- package/coverage/lcov-report/react/components/SanitizedContent/index.html +1 -1
- package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +5 -5
- package/coverage/lcov-report/react/components/Session/Session.jsx.html +382 -0
- package/coverage/lcov-report/react/components/Session/SessionDialogWrapped.jsx.html +121 -0
- package/coverage/lcov-report/react/components/Session/index.html +146 -0
- package/coverage/lcov-report/react/components/Session/index.jsx.html +94 -0
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/utils.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +25 -7
- package/coverage/lcov-report/react/components/SideNav/Details/index.html +13 -13
- package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/index.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +177 -66
- package/coverage/lcov-report/react/components/SideNav/UI/default-markup.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/UI/index.html +19 -19
- package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +1 -1
- package/coverage/lcov-report/react/components/SideNav/helpers.js.html +40 -58
- package/coverage/lcov-report/react/components/SideNav/index.html +25 -25
- package/coverage/lcov-report/react/components/SideNav/index.js.html +13 -79
- package/coverage/lcov-report/react/components/hooks/index.html +1 -1
- package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +1 -1
- package/coverage/lcov-report/react/index.html +1 -1
- package/coverage/lcov-report/react/index.js.html +3 -3
- package/coverage/lcov-report/react/lib/Chevron.jsx.html +1 -1
- package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +71 -71
- package/coverage/lcov-report/react/lib/index.html +15 -15
- package/coverage/lcov-report/react/session/index.html +41 -41
- package/coverage/lcov-report/react/session/index.js.html +1 -1
- package/coverage/lcov-report/react/session/isAuthV2.js.html +21 -21
- package/coverage/lcov-report/react/session/logout.js.html +43 -43
- package/coverage/lcov-report/react/session/refresh.js.html +5 -8
- package/coverage/lcov-report/react/session/ttl.js.html +30 -30
- package/coverage/lcov.info +510 -715
- package/dist/browser.js +1 -1
- package/dist/browser.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/package.json +3 -3
- package/styles/qppds/components/_modal.scss +45 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from
|
|
1
|
+
import React, { useState } from "react";
|
|
2
2
|
|
|
3
3
|
const GovBanner = () => {
|
|
4
4
|
const [hideContent, setHideContent] = useState(true);
|
|
@@ -11,7 +11,7 @@ const GovBanner = () => {
|
|
|
11
11
|
<div className="qpp-c-gov-banner__expand-wrap">
|
|
12
12
|
<header
|
|
13
13
|
className={`qpp-c-gov-banner__header ${
|
|
14
|
-
!hideContent ?
|
|
14
|
+
!hideContent ? "qpp-c-gov-banner__header--expanded" : ""
|
|
15
15
|
}`}
|
|
16
16
|
>
|
|
17
17
|
<div className="qpp-c-gov-banner__inner">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { useHeaderState } from
|
|
4
|
-
import { setUtagLink } from
|
|
5
|
-
import HeaderMenuItem from
|
|
6
|
-
import Session from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { useHeaderState } from "./hooks";
|
|
4
|
+
import { setUtagLink } from "./utag-helpers";
|
|
5
|
+
import HeaderMenuItem from "./HeaderMenuItem";
|
|
6
|
+
import Session from "../Session";
|
|
7
7
|
|
|
8
8
|
const HeaderAccountMenu = ({ handleClick, isLoginEnabled, isDevPre }) => {
|
|
9
9
|
const { closeMenus, RouterLink, headerContent } = useHeaderState();
|
|
@@ -26,7 +26,7 @@ const HeaderAccountMenu = ({ handleClick, isLoginEnabled, isDevPre }) => {
|
|
|
26
26
|
to="/login"
|
|
27
27
|
onClick={() => {
|
|
28
28
|
closeMenus();
|
|
29
|
-
setUtagLink(
|
|
29
|
+
setUtagLink("main navbar", "click", "/login");
|
|
30
30
|
}}
|
|
31
31
|
data-track-category="TopNav"
|
|
32
32
|
data-track-action="click"
|
|
@@ -50,7 +50,7 @@ const HeaderAccountMenu = ({ handleClick, isLoginEnabled, isDevPre }) => {
|
|
|
50
50
|
data-track-action="click"
|
|
51
51
|
data-track-label="Sign In"
|
|
52
52
|
onClick={() => {
|
|
53
|
-
setUtagLink(
|
|
53
|
+
setUtagLink("main navbar", "click", "/login");
|
|
54
54
|
}}
|
|
55
55
|
>
|
|
56
56
|
<div className="nav-title">Sign In</div>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
|
-
import HeaderLogo from
|
|
5
|
-
import NotificationBanner from
|
|
6
|
-
import GovBanner from
|
|
7
|
-
import { useHeaderState } from
|
|
4
|
+
import HeaderLogo from "./HeaderLogo";
|
|
5
|
+
import NotificationBanner from "../NotificationBanner";
|
|
6
|
+
import GovBanner from "../GovBanner";
|
|
7
|
+
import { useHeaderState } from "./hooks";
|
|
8
8
|
/**
|
|
9
9
|
* Accessibility enhancement that moves focus to an element for "Skip" links
|
|
10
10
|
* @param {Object} e - The native JS event
|
|
@@ -23,25 +23,25 @@ const HeaderContainer = ({
|
|
|
23
23
|
isIESupportPage,
|
|
24
24
|
}) => {
|
|
25
25
|
const { currentOpenMenu } = useHeaderState();
|
|
26
|
-
const cssCancelBtn = showCancelButton ?
|
|
26
|
+
const cssCancelBtn = showCancelButton ? "show-cancel-button" : "";
|
|
27
27
|
const cssMenuDropdownStatus =
|
|
28
|
-
currentOpenMenu ===
|
|
29
|
-
?
|
|
30
|
-
:
|
|
28
|
+
currentOpenMenu === ""
|
|
29
|
+
? "header-dropdown--closed"
|
|
30
|
+
: "header-dropdown--open";
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<>
|
|
34
34
|
<a
|
|
35
35
|
className="skip"
|
|
36
|
-
onClick={(e) => jumpToLink(e, `${skipToContentId ||
|
|
37
|
-
href={`#${skipToContentId ||
|
|
36
|
+
onClick={(e) => jumpToLink(e, `${skipToContentId || "mainContent"}`)}
|
|
37
|
+
href={`#${skipToContentId || "mainContent"}`}
|
|
38
38
|
>
|
|
39
39
|
Skip to content
|
|
40
40
|
</a>
|
|
41
41
|
{includeSkipToSidebar && (
|
|
42
42
|
<a
|
|
43
43
|
className="skip"
|
|
44
|
-
onClick={(e) => jumpToLink(e,
|
|
44
|
+
onClick={(e) => jumpToLink(e, "qppSidebar")}
|
|
45
45
|
href="#qppSidebar"
|
|
46
46
|
>
|
|
47
47
|
Skip to sidebar
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
|
-
import { useHeaderState } from
|
|
5
|
-
import NavigationButtonIcon from
|
|
6
|
-
import { setUtagLink } from
|
|
4
|
+
import { useHeaderState } from "./hooks";
|
|
5
|
+
import NavigationButtonIcon from "./NavigationButtonIcon";
|
|
6
|
+
import { setUtagLink } from "./utag-helpers";
|
|
7
7
|
|
|
8
8
|
const HeaderMenuButton = ({ href, name }) => {
|
|
9
9
|
const { RouterLink, closeMenus } = useHeaderState();
|
|
@@ -14,7 +14,7 @@ const HeaderMenuButton = ({ href, name }) => {
|
|
|
14
14
|
to={href}
|
|
15
15
|
onClick={() => {
|
|
16
16
|
closeMenus();
|
|
17
|
-
setUtagLink(
|
|
17
|
+
setUtagLink("main navbar", "click", href);
|
|
18
18
|
}}
|
|
19
19
|
data-track-category="TopNav"
|
|
20
20
|
data-track-action="click"
|
|
@@ -33,7 +33,7 @@ const HeaderMenuButton = ({ href, name }) => {
|
|
|
33
33
|
data-track-action="click"
|
|
34
34
|
data-track-label={name}
|
|
35
35
|
onClick={() => {
|
|
36
|
-
setUtagLink(
|
|
36
|
+
setUtagLink("main navbar", "click", href);
|
|
37
37
|
}}
|
|
38
38
|
>
|
|
39
39
|
{name}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React, { Fragment, useRef, useEffect, useState } from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React, { Fragment, useRef, useEffect, useState } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
|
-
import { useWindowWidth, useHeaderState } from
|
|
5
|
-
import HeaderMenuLink from
|
|
6
|
-
import HeaderMenuButton from
|
|
7
|
-
import HeaderMenuSignOutButton from
|
|
8
|
-
import Accordion from
|
|
9
|
-
import { Chevron } from
|
|
4
|
+
import { useWindowWidth, useHeaderState } from "./hooks";
|
|
5
|
+
import HeaderMenuLink from "./HeaderMenuLink";
|
|
6
|
+
import HeaderMenuButton from "./HeaderMenuButton";
|
|
7
|
+
import HeaderMenuSignOutButton from "./HeaderMenuSignOutButton";
|
|
8
|
+
import Accordion from "../Accordion";
|
|
9
|
+
import { Chevron } from "../../lib/Chevron.jsx";
|
|
10
10
|
|
|
11
11
|
const menuSizes = {
|
|
12
12
|
1: 315,
|
|
@@ -16,19 +16,19 @@ const menuSizes = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
const excludedClickOutClasses = [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
"menu-dropdown-toggle",
|
|
20
|
+
"nav-link",
|
|
21
|
+
"nav-link-li",
|
|
22
|
+
"dropdown-description",
|
|
23
|
+
"dropdown-title",
|
|
24
|
+
"dropdown-title-chevron-container",
|
|
25
|
+
"signout-button",
|
|
26
|
+
"submenu-section",
|
|
27
|
+
"accordion",
|
|
28
|
+
"accordion-title",
|
|
29
|
+
"accordion-left-title",
|
|
30
|
+
"header-menu-btn",
|
|
31
|
+
"btn-navigation-icon",
|
|
32
32
|
];
|
|
33
33
|
|
|
34
34
|
const HeaderMenuItem = ({
|
|
@@ -42,7 +42,7 @@ const HeaderMenuItem = ({
|
|
|
42
42
|
className,
|
|
43
43
|
}) => {
|
|
44
44
|
const [isSubMenuFullWidth, setSubMenuFullWidth] = useState(false);
|
|
45
|
-
const [openMobileSubMenu, setOpenMobileSubMenu] = useState(
|
|
45
|
+
const [openMobileSubMenu, setOpenMobileSubMenu] = useState("");
|
|
46
46
|
|
|
47
47
|
const windowWidth = useWindowWidth();
|
|
48
48
|
const menuButtonRef = useRef(null);
|
|
@@ -77,16 +77,16 @@ const HeaderMenuItem = ({
|
|
|
77
77
|
) {
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
setOpenMobileSubMenu(
|
|
80
|
+
setOpenMobileSubMenu("");
|
|
81
81
|
closeMenus();
|
|
82
82
|
};
|
|
83
|
-
document.addEventListener(
|
|
84
|
-
return () => document.removeEventListener(
|
|
83
|
+
document.addEventListener("mousedown", listener);
|
|
84
|
+
return () => document.removeEventListener("mousedown", listener);
|
|
85
85
|
}, [menuRef]);
|
|
86
86
|
|
|
87
87
|
useEffect(() => {
|
|
88
88
|
if (!isMobileMenuExpanded || !isOpen) {
|
|
89
|
-
setOpenMobileSubMenu(
|
|
89
|
+
setOpenMobileSubMenu("");
|
|
90
90
|
}
|
|
91
91
|
}, [isMobileMenuExpanded, isOpen]);
|
|
92
92
|
|
|
@@ -94,8 +94,8 @@ const HeaderMenuItem = ({
|
|
|
94
94
|
<li
|
|
95
95
|
key={`header-item-${menuIdentifier}`}
|
|
96
96
|
className={`header-item-${menuIdentifier}${
|
|
97
|
-
isSubMenuFullWidth ?
|
|
98
|
-
}${className ? ` ${className}` :
|
|
97
|
+
isSubMenuFullWidth ? " full-width-menu" : ""
|
|
98
|
+
}${className ? ` ${className}` : ""}`}
|
|
99
99
|
ref={menuRef}
|
|
100
100
|
>
|
|
101
101
|
<button
|
|
@@ -114,12 +114,12 @@ const HeaderMenuItem = ({
|
|
|
114
114
|
</div>
|
|
115
115
|
</div>
|
|
116
116
|
|
|
117
|
-
<span className={`dropdown-description ${isOpen ?
|
|
117
|
+
<span className={`dropdown-description ${isOpen ? "active" : ""}`}>
|
|
118
118
|
{subtitle}
|
|
119
119
|
</span>
|
|
120
120
|
</button>
|
|
121
121
|
<div
|
|
122
|
-
className={`nav-section${isOpen ?
|
|
122
|
+
className={`nav-section${isOpen ? " open" : ""}`}
|
|
123
123
|
id={`nav-section-${menuIdentifier}`}
|
|
124
124
|
hidden={!isOpen}
|
|
125
125
|
data-columns={numColumns}
|
|
@@ -136,7 +136,7 @@ const HeaderMenuItem = ({
|
|
|
136
136
|
)}
|
|
137
137
|
<ul>
|
|
138
138
|
{c.items.map((item) => {
|
|
139
|
-
const isSubLink = item.type ===
|
|
139
|
+
const isSubLink = item.type === "sublink";
|
|
140
140
|
const componentsByType = {
|
|
141
141
|
button: HeaderMenuButton,
|
|
142
142
|
signout: HeaderMenuSignOutButton,
|
|
@@ -150,8 +150,8 @@ const HeaderMenuItem = ({
|
|
|
150
150
|
key={`item-link-${item.name}`}
|
|
151
151
|
className={
|
|
152
152
|
isSubLink
|
|
153
|
-
?
|
|
154
|
-
:
|
|
153
|
+
? "nav-link-li sublink"
|
|
154
|
+
: "nav-link-li"
|
|
155
155
|
}
|
|
156
156
|
>
|
|
157
157
|
<SubMenuComponent
|
|
@@ -164,7 +164,7 @@ const HeaderMenuItem = ({
|
|
|
164
164
|
})}
|
|
165
165
|
</ul>
|
|
166
166
|
</li>
|
|
167
|
-
{name ===
|
|
167
|
+
{name === "MIPS" && (
|
|
168
168
|
<li
|
|
169
169
|
key={`${menuIdentifier}-mobile-${index}-${cIndex}`}
|
|
170
170
|
className="submenu-section-mips-mobile"
|
|
@@ -181,7 +181,7 @@ const HeaderMenuItem = ({
|
|
|
181
181
|
>
|
|
182
182
|
<ul>
|
|
183
183
|
{c.items.map((item) => {
|
|
184
|
-
const isSubLink = item.type ===
|
|
184
|
+
const isSubLink = item.type === "sublink";
|
|
185
185
|
const componentsByType = {
|
|
186
186
|
button: HeaderMenuButton,
|
|
187
187
|
signout: HeaderMenuSignOutButton,
|
|
@@ -194,7 +194,7 @@ const HeaderMenuItem = ({
|
|
|
194
194
|
<li
|
|
195
195
|
onClick={handleClick}
|
|
196
196
|
key={`item-link-${item.name}`}
|
|
197
|
-
className={isSubLink ?
|
|
197
|
+
className={isSubLink ? "sublink" : ""}
|
|
198
198
|
>
|
|
199
199
|
<SubMenuComponent
|
|
200
200
|
href={item.href}
|
|
@@ -230,7 +230,7 @@ HeaderMenuItem.propTypes = {
|
|
|
230
230
|
isMobileMenuExpanded: PropTypes.bool.isRequired,
|
|
231
231
|
};
|
|
232
232
|
HeaderMenuItem.defaultProps = {
|
|
233
|
-
menuName:
|
|
233
|
+
menuName: "",
|
|
234
234
|
columns: [],
|
|
235
235
|
rows: [],
|
|
236
236
|
className: null,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { submissionsUrl } from
|
|
4
|
-
import { useHeaderState } from
|
|
5
|
-
import { setUtagLink } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { submissionsUrl } from "../SideNav/helpers";
|
|
4
|
+
import { useHeaderState } from "./hooks";
|
|
5
|
+
import { setUtagLink } from "./utag-helpers";
|
|
6
6
|
|
|
7
7
|
// exclude submissions urls
|
|
8
8
|
const isNotExcluded = (href) => !href.includes(submissionsUrl);
|
|
@@ -15,7 +15,7 @@ const HeaderMenuLink = ({ href, name }) => {
|
|
|
15
15
|
to={href}
|
|
16
16
|
onClick={() => {
|
|
17
17
|
closeMenus();
|
|
18
|
-
setUtagLink(
|
|
18
|
+
setUtagLink("main navbar", "click", href);
|
|
19
19
|
}}
|
|
20
20
|
data-track-category="TopNav"
|
|
21
21
|
data-track-action="click"
|
|
@@ -34,13 +34,13 @@ const HeaderMenuLink = ({ href, name }) => {
|
|
|
34
34
|
data-track-action="click"
|
|
35
35
|
data-track-label={name}
|
|
36
36
|
onKeyDown={(e) => {
|
|
37
|
-
if (e.key ===
|
|
37
|
+
if (e.key === " " || e.code === "Space") {
|
|
38
38
|
window.location.href = window.location.origin + href;
|
|
39
|
-
setUtagLink(
|
|
39
|
+
setUtagLink("main navbar", "keydown", href);
|
|
40
40
|
}
|
|
41
41
|
}}
|
|
42
42
|
onClick={() => {
|
|
43
|
-
setUtagLink(
|
|
43
|
+
setUtagLink("main navbar", "click", href);
|
|
44
44
|
}}
|
|
45
45
|
>
|
|
46
46
|
{name}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React, { useState } from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
|
-
import { LogoutSession } from
|
|
5
|
-
import { setUtagLink } from
|
|
6
|
-
import Modal from
|
|
4
|
+
import { LogoutSession } from "../../session";
|
|
5
|
+
import { setUtagLink } from "./utag-helpers";
|
|
6
|
+
import Modal from "../Modal/index";
|
|
7
7
|
|
|
8
8
|
const useModal = () => {
|
|
9
9
|
const [open, setOpen] = useState(false);
|
|
@@ -35,17 +35,17 @@ const HeaderMenuSignOutButton = ({ name }) => {
|
|
|
35
35
|
title="Sign out"
|
|
36
36
|
onRequestClose={closeModal}
|
|
37
37
|
primary={{
|
|
38
|
-
title:
|
|
38
|
+
title: "Sign me out now",
|
|
39
39
|
onClick: () => {
|
|
40
40
|
showLogoutWarning();
|
|
41
|
-
setUtagLink(
|
|
41
|
+
setUtagLink("button", "click", "Sign me out now");
|
|
42
42
|
},
|
|
43
43
|
}}
|
|
44
44
|
secondary={{
|
|
45
|
-
title:
|
|
45
|
+
title: "Keep me signed in",
|
|
46
46
|
onClick: () => {
|
|
47
47
|
closeModal();
|
|
48
|
-
setUtagLink(
|
|
48
|
+
setUtagLink("button", "click", "Keep me signed in");
|
|
49
49
|
},
|
|
50
50
|
}}
|
|
51
51
|
>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import { CloseXIcon } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { CloseXIcon } from "../../lib/SvgComponents.jsx";
|
|
4
4
|
|
|
5
5
|
const HeaderMobileButton = ({ isMobileMenuExpanded, handleClick }) => (
|
|
6
6
|
<button
|
|
@@ -9,7 +9,7 @@ const HeaderMobileButton = ({ isMobileMenuExpanded, handleClick }) => (
|
|
|
9
9
|
data-toggle="collapse"
|
|
10
10
|
data-target="#nav-mobile"
|
|
11
11
|
aria-label="Navigation menu"
|
|
12
|
-
aria-expanded={isMobileMenuExpanded ?
|
|
12
|
+
aria-expanded={isMobileMenuExpanded ? "true" : "false"}
|
|
13
13
|
aria-controls="nav-mobile"
|
|
14
14
|
onClick={handleClick}
|
|
15
15
|
>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React, { useState, useEffect } from
|
|
2
|
-
import PropTypes from
|
|
3
|
-
import axios from
|
|
4
|
-
import HeaderAccountMenu from
|
|
5
|
-
import HeaderCancel from
|
|
6
|
-
import HeaderContainer from
|
|
7
|
-
import HeaderMenuItem from
|
|
8
|
-
import HeaderMobileButton from
|
|
9
|
-
import ImpersonatorBanner from
|
|
10
|
-
import HelpIcon from
|
|
11
|
-
import { HeaderStateProvider } from
|
|
12
|
-
import defaultContent from
|
|
1
|
+
import React, { useState, useEffect } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import axios from "axios";
|
|
4
|
+
import HeaderAccountMenu from "./HeaderAccountMenu.jsx";
|
|
5
|
+
import HeaderCancel from "./HeaderCancel.jsx";
|
|
6
|
+
import HeaderContainer from "./HeaderContainer";
|
|
7
|
+
import HeaderMenuItem from "./HeaderMenuItem";
|
|
8
|
+
import HeaderMobileButton from "./HeaderMobileButton";
|
|
9
|
+
import ImpersonatorBanner from "./ImpersonatorBanner";
|
|
10
|
+
import HelpIcon from "./HelpIcon";
|
|
11
|
+
import { HeaderStateProvider } from "./hooks";
|
|
12
|
+
import defaultContent from "./default-content.json";
|
|
13
13
|
|
|
14
14
|
const HeaderUI = ({
|
|
15
15
|
handleCancel,
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import cookie from
|
|
3
|
-
import axios from
|
|
4
|
-
import { CloseIcon } from
|
|
5
|
-
import { TextButton } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import cookie from "cookie";
|
|
3
|
+
import axios from "axios";
|
|
4
|
+
import { CloseIcon } from "../../lib/SvgComponents";
|
|
5
|
+
import { TextButton } from "../Button";
|
|
6
6
|
import {
|
|
7
7
|
deleteImpersonatedUser,
|
|
8
8
|
revertQppHasAuthsCookie,
|
|
9
9
|
revertApmPaymentCookie,
|
|
10
|
-
} from
|
|
11
|
-
import { viewingToolUrl } from
|
|
10
|
+
} from "../../session/logout";
|
|
11
|
+
import { viewingToolUrl } from "../SideNav/helpers";
|
|
12
12
|
|
|
13
13
|
const getViewType = (viewType) =>
|
|
14
14
|
({
|
|
15
|
-
username:
|
|
16
|
-
npi:
|
|
17
|
-
tin:
|
|
18
|
-
apm_id:
|
|
19
|
-
cms_id:
|
|
20
|
-
vg_id:
|
|
15
|
+
username: "HARP ID",
|
|
16
|
+
npi: "NPI",
|
|
17
|
+
tin: "TIN",
|
|
18
|
+
apm_id: "APM Entity",
|
|
19
|
+
cms_id: "Registry",
|
|
20
|
+
vg_id: "Virtual Group",
|
|
21
21
|
})[viewType];
|
|
22
22
|
|
|
23
23
|
const ImpersonatorBanner = () => {
|
|
@@ -28,14 +28,14 @@ const ImpersonatorBanner = () => {
|
|
|
28
28
|
} = cookie.parse(document.cookie);
|
|
29
29
|
|
|
30
30
|
const className = [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
].join(
|
|
31
|
+
"qpp-u-display--flex",
|
|
32
|
+
"qpp-u-justify-content--between",
|
|
33
|
+
"qpp-u-fill--gold-20",
|
|
34
|
+
"qpp-u-padding-x--40",
|
|
35
|
+
"qpp-u-padding-y--24",
|
|
36
|
+
"qpp-u-font-size--14",
|
|
37
|
+
"qpp-u-color--gray-80",
|
|
38
|
+
].join(" ");
|
|
39
39
|
|
|
40
40
|
const onClick = () => {
|
|
41
41
|
const fn = () => {
|
|
@@ -52,9 +52,9 @@ const ImpersonatorBanner = () => {
|
|
|
52
52
|
window.location.href = viewingToolUrl;
|
|
53
53
|
};
|
|
54
54
|
return axios
|
|
55
|
-
.delete(
|
|
55
|
+
.delete("/api/auth/helpdesk/view", {
|
|
56
56
|
headers: {
|
|
57
|
-
Accept:
|
|
57
|
+
Accept: "application/vnd.qpp.cms.gov.v2+json",
|
|
58
58
|
Authorization: `Bearer ${token}`,
|
|
59
59
|
},
|
|
60
60
|
})
|
|
@@ -66,7 +66,7 @@ const ImpersonatorBanner = () => {
|
|
|
66
66
|
user && (
|
|
67
67
|
<div className={className}>
|
|
68
68
|
<div>
|
|
69
|
-
VIEW ONLY | You are currently viewing {getViewType(viewType)}:{
|
|
69
|
+
VIEW ONLY | You are currently viewing {getViewType(viewType)}:{" "}
|
|
70
70
|
<strong>{user}</strong>
|
|
71
71
|
</div>
|
|
72
72
|
<TextButton onClick={onClick} className="qpp-u-color--gray-80">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { createContext, useState, useEffect, useContext } from
|
|
2
|
-
import PropTypes from
|
|
1
|
+
import React, { createContext, useState, useEffect, useContext } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
3
|
|
|
4
4
|
export function useWindowWidth() {
|
|
5
5
|
const [windowSize, setWindowSize] = useState(undefined);
|
|
@@ -7,9 +7,9 @@ export function useWindowWidth() {
|
|
|
7
7
|
function handleResize() {
|
|
8
8
|
setWindowSize(window.innerWidth);
|
|
9
9
|
}
|
|
10
|
-
window.addEventListener(
|
|
10
|
+
window.addEventListener("resize", handleResize);
|
|
11
11
|
handleResize();
|
|
12
|
-
return () => window.removeEventListener(
|
|
12
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
13
13
|
}, []);
|
|
14
14
|
return windowSize;
|
|
15
15
|
}
|
|
@@ -21,16 +21,16 @@ export const HeaderStateProvider = ({
|
|
|
21
21
|
RouterLink,
|
|
22
22
|
headerContent, // allow header content from api request available to all child components
|
|
23
23
|
}) => {
|
|
24
|
-
const [currentOpenMenu, setCurrentOpenMenu] = useState(
|
|
24
|
+
const [currentOpenMenu, setCurrentOpenMenu] = useState("");
|
|
25
25
|
|
|
26
26
|
const handleToggleMenu = (name) => {
|
|
27
27
|
if (currentOpenMenu === name) {
|
|
28
|
-
return setCurrentOpenMenu(
|
|
28
|
+
return setCurrentOpenMenu("");
|
|
29
29
|
}
|
|
30
30
|
return setCurrentOpenMenu(name);
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const closeMenus = () => setCurrentOpenMenu(
|
|
33
|
+
const closeMenus = () => setCurrentOpenMenu("");
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
36
|
<HeaderStateContext.Provider
|
|
@@ -60,7 +60,7 @@ HeaderStateProvider.defaultProps = {
|
|
|
60
60
|
export const useHeaderState = () => {
|
|
61
61
|
const context = useContext(HeaderStateContext);
|
|
62
62
|
if (context === undefined) {
|
|
63
|
-
throw new Error(
|
|
63
|
+
throw new Error("useHeaderState must be used within a HeaderStateProvider");
|
|
64
64
|
}
|
|
65
65
|
return context;
|
|
66
66
|
};
|