qpp-style 1.0.0-cc.76 → 1.0.0-cc.77
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/components/Header/HeaderMenuItem.jsx +10 -1
- package/components/Header/HeaderUI.jsx +1 -2
- package/components/SideNav/Content/LevelOneContent.jsx +3 -9
- package/components/SideNav/UI/default-content.json +0 -4
- package/dist/browser.js +1 -1
- package/dist/browser.js.LICENSE.txt +0 -17
- package/dist/browser.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +0 -17
- 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 +1 -1
- package/session/logout.js +2 -11
- package/components/Header/ImpersonatorBanner.jsx +0 -55
|
@@ -33,6 +33,7 @@ const excludedClickOutClasses = [
|
|
|
33
33
|
|
|
34
34
|
const HeaderMenuItem = ({
|
|
35
35
|
handleClick,
|
|
36
|
+
isMobileMenuExpanded,
|
|
36
37
|
columns,
|
|
37
38
|
menuName,
|
|
38
39
|
rows,
|
|
@@ -76,12 +77,19 @@ const HeaderMenuItem = ({
|
|
|
76
77
|
) {
|
|
77
78
|
return;
|
|
78
79
|
}
|
|
80
|
+
setOpenMobileSubMenu('')
|
|
79
81
|
closeMenus();
|
|
80
82
|
};
|
|
81
83
|
document.addEventListener('mousedown', listener);
|
|
82
84
|
return () => document.removeEventListener('mousedown', listener);
|
|
83
85
|
}, [menuRef]);
|
|
84
86
|
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
if (!isMobileMenuExpanded || !isOpen){
|
|
89
|
+
setOpenMobileSubMenu('')
|
|
90
|
+
}
|
|
91
|
+
}, [isMobileMenuExpanded, isOpen])
|
|
92
|
+
|
|
85
93
|
return (
|
|
86
94
|
<li
|
|
87
95
|
key={`header-item-${menuIdentifier}`}
|
|
@@ -162,7 +170,7 @@ const HeaderMenuItem = ({
|
|
|
162
170
|
>
|
|
163
171
|
<Accordion
|
|
164
172
|
title={c.heading}
|
|
165
|
-
isOpen={openMobileSubMenu === c.heading}
|
|
173
|
+
isOpen={isMobileMenuExpanded && openMobileSubMenu === c.heading}
|
|
166
174
|
>
|
|
167
175
|
<ul>
|
|
168
176
|
{c.items.map((item) => {
|
|
@@ -212,6 +220,7 @@ HeaderMenuItem.propTypes = {
|
|
|
212
220
|
subtitle: PropTypes.string.isRequired,
|
|
213
221
|
className: PropTypes.string,
|
|
214
222
|
handleClick: PropTypes.func.isRequired,
|
|
223
|
+
isMobileMenuExpanded: PropTypes.bool.isRequired,
|
|
215
224
|
};
|
|
216
225
|
HeaderMenuItem.defaultProps = {
|
|
217
226
|
menuName: '',
|
|
@@ -6,7 +6,6 @@ import HeaderCancel from './HeaderCancel.jsx';
|
|
|
6
6
|
import HeaderContainer from './HeaderContainer';
|
|
7
7
|
import HeaderMenuItem from './HeaderMenuItem';
|
|
8
8
|
import HeaderMobileButton from './HeaderMobileButton';
|
|
9
|
-
import ImpersonatorBanner from './ImpersonatorBanner';
|
|
10
9
|
import HelpIcon from './HelpIcon';
|
|
11
10
|
import defaultHeaderContent from './default-content.json';
|
|
12
11
|
import { HeaderStateProvider } from './hooks';
|
|
@@ -111,6 +110,7 @@ const HeaderUI = ({
|
|
|
111
110
|
handleClick={() => {
|
|
112
111
|
setIsMobileMenuExpanded(!isMobileMenuExpanded);
|
|
113
112
|
}}
|
|
113
|
+
isMobileMenuExpanded={isMobileMenuExpanded}
|
|
114
114
|
key={header.name}
|
|
115
115
|
{...header}
|
|
116
116
|
/>
|
|
@@ -127,7 +127,6 @@ const HeaderUI = ({
|
|
|
127
127
|
</ul>
|
|
128
128
|
</nav>
|
|
129
129
|
</HeaderContainer>
|
|
130
|
-
<ImpersonatorBanner />
|
|
131
130
|
</HeaderStateProvider>
|
|
132
131
|
);
|
|
133
132
|
};
|
|
@@ -59,7 +59,6 @@ const LevelOneContent = ({
|
|
|
59
59
|
qpp_ehr_authorized,
|
|
60
60
|
qpp_has_non_registry_authorizations,
|
|
61
61
|
qpp_auth_token,
|
|
62
|
-
qpp_can_impersonate,
|
|
63
62
|
} = cookie.parse(document.cookie);
|
|
64
63
|
|
|
65
64
|
let name = '';
|
|
@@ -68,7 +67,6 @@ const LevelOneContent = ({
|
|
|
68
67
|
name = `${firstName} ${lastName}`;
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
const canImpersonate = qpp_can_impersonate === 'true';
|
|
72
70
|
const hasAuthorizations = qpp_has_authorizations === 'true';
|
|
73
71
|
const hasApmPayments = user_has_apm_payments === 'true';
|
|
74
72
|
const isDevPre = qpp_is_dev_pre === 'true';
|
|
@@ -87,7 +85,6 @@ const LevelOneContent = ({
|
|
|
87
85
|
[physicianCompareUrl]: hasNonRegistryAuthorizations,
|
|
88
86
|
[reportsPortalUrl]: hasAuthorizations,
|
|
89
87
|
[facilityBasedPreviewBaseUrl]: hasAuthorizations,
|
|
90
|
-
'/user/impersonate': canImpersonate,
|
|
91
88
|
|
|
92
89
|
// dev pre
|
|
93
90
|
'/user/applications': ehrAuthorized,
|
|
@@ -112,13 +109,10 @@ const LevelOneContent = ({
|
|
|
112
109
|
};
|
|
113
110
|
|
|
114
111
|
const { pathname, hash } = window.location;
|
|
115
|
-
const filteredListOfLinks = (listOfLinks || []).filter((sublink) => {
|
|
116
|
-
return !(sublink.url in urlConditionMap && !urlConditionMap[sublink.url]);
|
|
117
|
-
});
|
|
118
112
|
if (
|
|
119
|
-
|
|
113
|
+
listOfLinks &&
|
|
120
114
|
(pathname === url ||
|
|
121
|
-
|
|
115
|
+
listOfLinks.some(
|
|
122
116
|
(sublink) =>
|
|
123
117
|
pathname === sublink.url || `${pathname}${hash}` === sublink.url
|
|
124
118
|
))
|
|
@@ -127,7 +121,7 @@ const LevelOneContent = ({
|
|
|
127
121
|
<NavLinkDrawer
|
|
128
122
|
key={`nav-drawer-${url}-${label}`}
|
|
129
123
|
leftIcon={Icon}
|
|
130
|
-
listOfLinks={
|
|
124
|
+
listOfLinks={listOfLinks}
|
|
131
125
|
isExpanded={isExpanded}
|
|
132
126
|
staticDrawer={false}
|
|
133
127
|
openByDefault
|
|
@@ -42,10 +42,6 @@
|
|
|
42
42
|
"url": "/user/manage-access",
|
|
43
43
|
"label": "Manage Access",
|
|
44
44
|
"listOfLinks": [
|
|
45
|
-
{
|
|
46
|
-
"url": "/user/impersonate",
|
|
47
|
-
"label": "QPP User Impersonation"
|
|
48
|
-
},
|
|
49
45
|
{
|
|
50
46
|
"url": "/user/self-nomination/#/landing",
|
|
51
47
|
"label": "Registry/QCDR Self-Nomination",
|