qpp-style 1.0.0-cc.72 → 1.0.0-cc.76
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 +13 -19
- package/components/Breadcrumb/Breadcrumb.stories.js +6 -10
- package/components/Button/Button.stories.js +2 -0
- package/components/CalloutBox/CalloutBox.stories.js +2 -0
- package/components/Card/Card.stories.js +2 -0
- package/components/Dropdown/Dropdown.stories.js +2 -0
- package/components/Footer/Footer.stories.js +10 -7
- package/components/Footer/FooterUI.jsx +122 -108
- package/components/Header/Header.stories.js +20 -16
- package/components/Header/HeaderContainer.jsx +4 -1
- package/components/Header/HeaderUI.jsx +5 -0
- package/components/Header/ImpersonatorBanner.jsx +5 -5
- package/components/Header/header.js +2 -0
- package/components/Infotip/Infotip.stories.js +5 -5
- package/components/Modal/Modal.stories.js +30 -28
- package/components/NotificationBanner/NotificationBanner.stories.js +10 -10
- package/components/Search/Search.stories.js +2 -0
- package/components/Search/index.js +2 -2
- package/components/SideNav/Content/LevelOneContent.jsx +6 -3
- package/components/SideNav/Links/NavLinkDrawer.jsx +15 -1
- package/components/SideNav/SideNav.stories.js +185 -104
- package/components/SideNav/UI/default-content.json +5 -2
- package/components/SideNav/helpers.js +2 -2
- package/components/Tabs/Tabs.stories.js +2 -0
- package/components/TextInput/TextInput.stories.js +2 -0
- package/dist/browser.js +1 -1
- package/dist/browser.js.LICENSE.txt +17 -0
- package/dist/browser.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +17 -0
- package/dist/index.js.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/images/icons/svg/arrow-down.svg +1 -1
- package/images/icons/svg/arrow-download.svg +1 -1
- package/images/icons/svg/arrow-right.svg +1 -1
- package/images/icons/svg/calendar.svg +1 -1
- package/images/icons/svg/download.svg +1 -1
- package/images/icons/svg/external.svg +1 -1
- package/images/icons/svg/file-upload.svg +1 -1
- package/images/icons/svg/tooltip-question.svg +1 -1
- package/images/icons/svg/trash.svg +1 -1
- package/images/icons/svg/upload.svg +1 -1
- package/package.json +35 -36
- package/session/logout.js +11 -2
- package/styles/qppds/base/_icon.scss +2 -0
- package/styles/qppds/base/_typography.scss +54 -46
- package/styles/qppds/base/index.scss +1 -6
- package/styles/qppds/components/_breadcrumbs.scss +16 -5
- package/styles/qppds/components/_link.scss +2 -2
- package/styles/qppds/components/_modal.scss +22 -0
- package/styles/qppds/components/_search.scss +3 -1
- package/styles/qppds/components/_tabs.scss +1 -1
- package/styles/qppds/components/sidebar/_links.scss +4 -1
- package/styles/qppds/settings/mixins/_index.scss +1 -0
- package/styles/qppds/settings/mixins/_type.scss +65 -0
- package/styles/qppds/utilities/_height.scss +38 -0
- package/styles/qppds/utilities/_width.scss +35 -0
- package/styles/qppds/utilities/index.scss +1 -0
- package/webpack.config.js +18 -20
- package/webpack.config.react.js +1 -0
package/.storybook/main.js
CHANGED
|
@@ -2,9 +2,6 @@ const path = require('path');
|
|
|
2
2
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
|
-
core: {
|
|
6
|
-
builder: 'webpack5',
|
|
7
|
-
},
|
|
8
5
|
stories: [
|
|
9
6
|
'../components/**/*.stories.@(js|jsx|mdx)',
|
|
10
7
|
'../lib/**/*.stories.@(js|jsx|mdx)',
|
|
@@ -13,30 +10,28 @@ module.exports = {
|
|
|
13
10
|
'@storybook/addon-actions',
|
|
14
11
|
'@storybook/addon-links',
|
|
15
12
|
'@storybook/addon-storysource',
|
|
13
|
+
'@storybook/addon-knobs',
|
|
16
14
|
'@storybook/addon-a11y',
|
|
17
15
|
'@storybook/addon-docs',
|
|
18
16
|
'@storybook/addon-backgrounds',
|
|
19
17
|
'@storybook/addon-viewport',
|
|
20
18
|
'@storybook/addon-postcss',
|
|
21
|
-
'@storybook/addon-controls',
|
|
22
19
|
],
|
|
23
20
|
webpackFinal: async (config) => {
|
|
24
21
|
// do mutation to the config
|
|
25
22
|
|
|
26
23
|
config.plugins.push(
|
|
27
|
-
new CopyWebpackPlugin(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
],
|
|
39
|
-
})
|
|
24
|
+
new CopyWebpackPlugin([
|
|
25
|
+
{
|
|
26
|
+
from: path.join(__dirname, '..', '..', 'shared', 'fonts/'),
|
|
27
|
+
to: 'fonts/',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
from: path.join(__dirname, '..', '..', 'shared', 'images/'),
|
|
31
|
+
to: 'images/',
|
|
32
|
+
force: true,
|
|
33
|
+
},
|
|
34
|
+
])
|
|
40
35
|
);
|
|
41
36
|
|
|
42
37
|
config.module.rules.push({
|
|
@@ -86,8 +81,7 @@ module.exports = {
|
|
|
86
81
|
|
|
87
82
|
if (staticAssetLoader) {
|
|
88
83
|
// remove svg matching from storybook's default static asset loader
|
|
89
|
-
staticAssetLoader.test =
|
|
90
|
-
/\.(ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/;
|
|
84
|
+
staticAssetLoader.test = /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/;
|
|
91
85
|
}
|
|
92
86
|
|
|
93
87
|
return config;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Breadcrumb from './index';
|
|
3
|
+
import { withKnobs, boolean } from '@storybook/addon-knobs';
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: 'Breadcrumb',
|
|
6
7
|
component: Breadcrumb,
|
|
8
|
+
decorators: [withKnobs],
|
|
7
9
|
};
|
|
8
10
|
|
|
9
|
-
export const ExampleLightBreadcrumb = (
|
|
11
|
+
export const ExampleLightBreadcrumb = () => (
|
|
10
12
|
<div className="qppds qpp-u-padding--16 qpp-u-fill--blue-80">
|
|
11
13
|
<Breadcrumb
|
|
12
|
-
{
|
|
14
|
+
newBreadcrumb={boolean('newBreadcrumb', true)}
|
|
13
15
|
crumbs={[
|
|
14
16
|
{
|
|
15
17
|
url: '/',
|
|
@@ -29,14 +31,11 @@ export const ExampleLightBreadcrumb = (args) => (
|
|
|
29
31
|
);
|
|
30
32
|
|
|
31
33
|
ExampleLightBreadcrumb.storyName = 'Light';
|
|
32
|
-
ExampleLightBreadcrumb.args = {
|
|
33
|
-
newBreadcrumb: true,
|
|
34
|
-
}
|
|
35
34
|
|
|
36
|
-
export const ExampleDarkBreadcrumb = (
|
|
35
|
+
export const ExampleDarkBreadcrumb = () => (
|
|
37
36
|
<div className="qppds qpp-u-padding--16">
|
|
38
37
|
<Breadcrumb
|
|
39
|
-
{
|
|
38
|
+
newBreadcrumb={boolean('newBreadcrumb', true)}
|
|
40
39
|
dark
|
|
41
40
|
crumbs={[
|
|
42
41
|
{
|
|
@@ -57,6 +56,3 @@ export const ExampleDarkBreadcrumb = (args) => (
|
|
|
57
56
|
);
|
|
58
57
|
|
|
59
58
|
ExampleDarkBreadcrumb.storyName = 'Dark';
|
|
60
|
-
ExampleDarkBreadcrumb.args = {
|
|
61
|
-
newBreadcrumb: true,
|
|
62
|
-
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { withKnobs } from '@storybook/addon-knobs';
|
|
3
4
|
import FeatherIcon from 'feather-icons-react';
|
|
4
5
|
|
|
5
6
|
import Button, { TextButton } from './index';
|
|
@@ -7,6 +8,7 @@ import Button, { TextButton } from './index';
|
|
|
7
8
|
export default {
|
|
8
9
|
title: 'Button',
|
|
9
10
|
component: Button,
|
|
11
|
+
decorators: [withKnobs],
|
|
10
12
|
};
|
|
11
13
|
|
|
12
14
|
const Container = ({ className = '', children }) => (
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
+
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
3
|
|
|
3
4
|
import CalloutBox from './index';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
title: 'CalloutBox',
|
|
7
8
|
component: CalloutBox,
|
|
9
|
+
decorators: [withKnobs],
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export const Default = () => {
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Footer from './FooterUI';
|
|
3
|
+
import { withKnobs, boolean, text } from '@storybook/addon-knobs';
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: 'Footer',
|
|
6
7
|
component: Footer,
|
|
8
|
+
decorators: [withKnobs],
|
|
7
9
|
};
|
|
8
10
|
|
|
9
|
-
export const ExampleFooter = (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
export const ExampleFooter = () => (
|
|
12
|
+
<Footer
|
|
13
|
+
isFullWidth={boolean('isFullWidth', false)}
|
|
14
|
+
buildVersion={text('buildVersion', 'BUILD VERSION')}
|
|
15
|
+
isNewFooter={boolean('isNewFooter', false)}
|
|
16
|
+
showHcdResearch={boolean('showHcdResearch', false)}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
16
19
|
|
|
17
20
|
ExampleFooter.storyName = 'example Footer';
|
|
@@ -12,11 +12,16 @@ const infoTipLabel =
|
|
|
12
12
|
|
|
13
13
|
const FooterUI = (props) => {
|
|
14
14
|
const isNewFooter = props.isNewFooter;
|
|
15
|
+
const isIESupportPage = props.isIESupportPage;
|
|
15
16
|
const signUpNowLink = props.showHcdResearch
|
|
16
17
|
? '/about/hcd-research'
|
|
17
18
|
: 'mailto:QPPUserResearch@cms.hhs.gov?subject=Sign up for feedback sessions&body=Please let us know your role and how many Tax Identification Numbers (TINs) you represent. Don’t send us your actual TINs, that is confidential information that should not be shared with this email address. If you do not represent a practice, let us know what work you do in connection to QPP.';
|
|
18
19
|
const [listServ, setListServ] = useState(false);
|
|
19
20
|
|
|
21
|
+
const setLink = (link) => {
|
|
22
|
+
return isIESupportPage ? '/' : link;
|
|
23
|
+
};
|
|
24
|
+
|
|
20
25
|
// The footer content is populated with the following priority order:
|
|
21
26
|
// 1. Use the footer content in localStorage if it's there
|
|
22
27
|
// 2. If not, make a call to get it from the QPPFE endpoint. Hydrate the localStorage item with the response.
|
|
@@ -55,123 +60,131 @@ const FooterUI = (props) => {
|
|
|
55
60
|
if (isNewFooter) {
|
|
56
61
|
return (
|
|
57
62
|
<>
|
|
58
|
-
|
|
59
|
-
<div className="
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
{!isIESupportPage && (
|
|
64
|
+
<div className="feedback-session-sign-up">
|
|
65
|
+
<div className="responsive-container">
|
|
66
|
+
<hr />
|
|
67
|
+
<p>
|
|
68
|
+
<strong>Help shape the future of QPP.</strong> Participate in a
|
|
69
|
+
user feedback session.{' '}
|
|
70
|
+
<a className="email-note-link" href={signUpNowLink}>
|
|
71
|
+
Sign up now
|
|
72
|
+
</a>
|
|
73
|
+
</p>
|
|
74
|
+
</div>
|
|
68
75
|
</div>
|
|
69
|
-
|
|
76
|
+
)}
|
|
70
77
|
<footer className="global-footer">
|
|
71
78
|
<div className="build-version" id="build-version">
|
|
72
79
|
{props.buildVersion}
|
|
73
80
|
</div>
|
|
74
81
|
|
|
75
82
|
<div className="responsive-container">
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
83
|
+
<>
|
|
84
|
+
{!isIESupportPage && (
|
|
85
|
+
<div className="global-footer-container">
|
|
86
|
+
<div className="footer-resources">
|
|
87
|
+
<p className="sub-title">Resources</p>
|
|
88
|
+
<ul>
|
|
89
|
+
<li>
|
|
90
|
+
<a
|
|
91
|
+
href="/about/resource-library"
|
|
92
|
+
aria-label="Resource Library"
|
|
93
|
+
data-track-category="FooterNav"
|
|
94
|
+
data-track-action="OpenEducationAndTools"
|
|
95
|
+
data-track-label="Education and Tools"
|
|
96
|
+
>
|
|
97
|
+
Resource Library
|
|
98
|
+
</a>
|
|
99
|
+
</li>
|
|
100
|
+
<li>
|
|
101
|
+
<a
|
|
102
|
+
href="/resources/help-and-support"
|
|
103
|
+
aria-label="Help and Support"
|
|
104
|
+
data-track-category="FooterNav"
|
|
105
|
+
data-track-action="OpenHelpAndSupport"
|
|
106
|
+
data-track-label="Help and Support"
|
|
107
|
+
>
|
|
108
|
+
Help and Support
|
|
109
|
+
</a>
|
|
110
|
+
</li>
|
|
111
|
+
<li>
|
|
112
|
+
<a
|
|
113
|
+
href="/about/small-underserved-rural-practices"
|
|
114
|
+
aria-label="Support for Small Practices"
|
|
115
|
+
data-track-category="FooterNav"
|
|
116
|
+
data-track-action="OpenSupportSmallPractices"
|
|
117
|
+
data-track-label="Support for Small Practices"
|
|
118
|
+
>
|
|
119
|
+
Support for Small Practices
|
|
120
|
+
</a>
|
|
121
|
+
</li>
|
|
122
|
+
<li>
|
|
123
|
+
<a
|
|
124
|
+
href="/developers"
|
|
125
|
+
aria-label="Developer Tools"
|
|
126
|
+
data-track-category="FooterNav"
|
|
127
|
+
data-track-action="OpenDeveloperTools"
|
|
128
|
+
data-track-label="Quality Payment Program"
|
|
129
|
+
>
|
|
130
|
+
Developer Tools
|
|
131
|
+
</a>
|
|
132
|
+
</li>
|
|
133
|
+
<li>
|
|
134
|
+
<a
|
|
135
|
+
href="/glossary"
|
|
136
|
+
aria-label="Glossary"
|
|
137
|
+
data-track-category="FooterNav"
|
|
138
|
+
data-track-action="OpenGlossary"
|
|
139
|
+
data-track-label="Glossary"
|
|
140
|
+
>
|
|
141
|
+
Glossary
|
|
142
|
+
</a>
|
|
143
|
+
</li>
|
|
144
|
+
</ul>
|
|
145
|
+
</div>
|
|
146
|
+
<div className="footer-contact-cms">
|
|
147
|
+
<p className="sub-title">Contact CMS</p>
|
|
148
|
+
<p className="contact-title">By Phone:</p>
|
|
149
|
+
<p>Monday - Friday 8 a.m - 8 p.m ET</p>
|
|
150
|
+
<p>
|
|
151
|
+
1-866-288-8292 (TRS: 711)
|
|
152
|
+
<span className="footer-trs-infotip">
|
|
153
|
+
<InfoTip label={infoTipLabel} />
|
|
154
|
+
</span>
|
|
155
|
+
</p>
|
|
156
|
+
|
|
157
|
+
<p className="contact-title">By Email:</p>
|
|
158
|
+
<p>
|
|
159
|
+
<a
|
|
160
|
+
aria-label="QPP@cms.hhs.gov"
|
|
161
|
+
href="mailto:QPP@cms.hhs.gov"
|
|
162
|
+
className="email-link"
|
|
163
|
+
>
|
|
164
|
+
QPP@cms.hhs.gov
|
|
165
|
+
</a>
|
|
166
|
+
</p>
|
|
167
|
+
</div>
|
|
168
|
+
<div className="footer-social-newsletter">
|
|
169
|
+
<p className="sub-title">Stay Connected</p>
|
|
170
|
+
<SocialLinks />
|
|
171
|
+
<p className="sub-title">
|
|
172
|
+
{listServ
|
|
173
|
+
? 'Sign Up for the QPP Listserv'
|
|
174
|
+
: 'Sign Up for the QPP Newsletter'}
|
|
175
|
+
</p>
|
|
176
|
+
<Subscribe />
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
)}
|
|
180
|
+
<hr />
|
|
181
|
+
</>
|
|
182
|
+
|
|
170
183
|
<div className="other-links">
|
|
171
184
|
<ul className="small">
|
|
172
185
|
<li>
|
|
173
186
|
<a
|
|
174
|
-
href=
|
|
187
|
+
href={setLink('/privacy')}
|
|
175
188
|
aria-label="Notice of Privacy and Disclaimer"
|
|
176
189
|
data-track-category="FooterNav"
|
|
177
190
|
data-track-action="OpenPrivacyDisclaimer"
|
|
@@ -183,7 +196,7 @@ const FooterUI = (props) => {
|
|
|
183
196
|
<li className="divider"></li>{' '}
|
|
184
197
|
<li>
|
|
185
198
|
<a
|
|
186
|
-
href=
|
|
199
|
+
href={setLink('/accessibility')}
|
|
187
200
|
aria-label="Accessibility"
|
|
188
201
|
data-track-category="FooterNav"
|
|
189
202
|
data-track-action="OpenAccessibility"
|
|
@@ -199,7 +212,7 @@ const FooterUI = (props) => {
|
|
|
199
212
|
className="adobe-link"
|
|
200
213
|
rel="noopener noreferrer"
|
|
201
214
|
target="_blank"
|
|
202
|
-
href=
|
|
215
|
+
href={setLink('https://get.adobe.com/reader')}
|
|
203
216
|
data-track-category="FooterNav"
|
|
204
217
|
data-track-action="DownloadAdobeReader"
|
|
205
218
|
data-track-label="AdobeReader"
|
|
@@ -249,6 +262,7 @@ FooterUI.propTypes = {
|
|
|
249
262
|
buildVersion: PropTypes.string,
|
|
250
263
|
isFullWidth: PropTypes.bool,
|
|
251
264
|
isNewFooter: PropTypes.bool,
|
|
265
|
+
isIESupportPage: PropTypes.bool,
|
|
252
266
|
showHcdResearch: PropTypes.bool,
|
|
253
267
|
};
|
|
254
268
|
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Header from './HeaderUI';
|
|
3
|
+
import { withKnobs, boolean, text, number } from '@storybook/addon-knobs';
|
|
3
4
|
import { action } from '@storybook/addon-actions';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
title: 'Header',
|
|
7
8
|
component: Header,
|
|
9
|
+
decorators: [withKnobs],
|
|
8
10
|
};
|
|
9
11
|
|
|
10
|
-
export const Example = (
|
|
12
|
+
export const Example = () => (
|
|
11
13
|
<div id="qpp-nav-header">
|
|
12
|
-
<Header
|
|
14
|
+
<Header
|
|
15
|
+
isLoginEnabled={boolean('isLoginEnabled', true)}
|
|
16
|
+
skipToContentId={text('skipToContentId', '')}
|
|
17
|
+
includeSkipToSidebar={boolean('includeSkipToSidebar', false)}
|
|
18
|
+
showFacilityBasedPreviewLink={boolean(
|
|
19
|
+
'showFacilityBasedPreviewLink',
|
|
20
|
+
false
|
|
21
|
+
)}
|
|
22
|
+
showCancelButton={boolean('showCancelButton', false)}
|
|
23
|
+
handleCancel={action('handleCancel')}
|
|
24
|
+
showPhysicianCompareLink={boolean('showPhysicianCompareLink', false)}
|
|
25
|
+
performanceYear={number('performanceYear', 2019)}
|
|
26
|
+
feedbackPerformanceYear={text('feedbackPerformanceYear', '')}
|
|
27
|
+
fbpPerformanceYear={text('fbpPerformanceYear', '')}
|
|
28
|
+
showCovidLink={boolean('showCovidLink', false)}
|
|
29
|
+
isDevPre={boolean('isDevPre', false)}
|
|
30
|
+
/>
|
|
13
31
|
</div>
|
|
14
32
|
);
|
|
15
|
-
Example.args = {
|
|
16
|
-
isLoginEnabled: true,
|
|
17
|
-
skipToContentId: '',
|
|
18
|
-
includeSkipToSidebar: false,
|
|
19
|
-
showFacilityBasedPreviewLink: false,
|
|
20
|
-
showCancelButton: false,
|
|
21
|
-
handleCancel: () => action('handleCancel'),
|
|
22
|
-
showPhysicianCompareLink: false,
|
|
23
|
-
performanceYear: 2019,
|
|
24
|
-
feedbackPerformanceYear: '',
|
|
25
|
-
fbpPerformanceYear: '',
|
|
26
|
-
showCovidLink: false,
|
|
27
|
-
isDevPre: false,
|
|
28
|
-
};
|
|
@@ -19,6 +19,7 @@ const HeaderContainer = ({
|
|
|
19
19
|
includeSkipToSidebar,
|
|
20
20
|
showCancelButton,
|
|
21
21
|
skipToContentId,
|
|
22
|
+
isIESupportPage,
|
|
22
23
|
}) => (
|
|
23
24
|
<>
|
|
24
25
|
<a
|
|
@@ -37,7 +38,7 @@ const HeaderContainer = ({
|
|
|
37
38
|
Skip to sidebar
|
|
38
39
|
</a>
|
|
39
40
|
)}
|
|
40
|
-
<NotificationBanner />
|
|
41
|
+
{!isIESupportPage && <NotificationBanner />}
|
|
41
42
|
<header id="top" className={showCancelButton ? 'show-cancel-button' : ''}>
|
|
42
43
|
<HeaderLogo />
|
|
43
44
|
{children}
|
|
@@ -50,11 +51,13 @@ HeaderContainer.propTypes = {
|
|
|
50
51
|
includeSkipToSidebar: PropTypes.bool,
|
|
51
52
|
showCancelButton: PropTypes.bool,
|
|
52
53
|
skipToContentId: PropTypes.string,
|
|
54
|
+
isIESupportPage: PropTypes.bool,
|
|
53
55
|
};
|
|
54
56
|
HeaderContainer.defaultProps = {
|
|
55
57
|
includeSkipToSidebar: false,
|
|
56
58
|
showCancelButton: false,
|
|
57
59
|
skipToContentId: null,
|
|
60
|
+
isIESupportPage: false,
|
|
58
61
|
};
|
|
59
62
|
|
|
60
63
|
export default HeaderContainer;
|
|
@@ -25,6 +25,7 @@ const HeaderUI = ({
|
|
|
25
25
|
showFacilityBasedPreviewLink,
|
|
26
26
|
skipToContentId,
|
|
27
27
|
RouterLink,
|
|
28
|
+
isIESupportPage,
|
|
28
29
|
}) => {
|
|
29
30
|
const [isMobileMenuExpanded, setIsMobileMenuExpanded] = useState(false);
|
|
30
31
|
|
|
@@ -73,6 +74,7 @@ const HeaderUI = ({
|
|
|
73
74
|
return (
|
|
74
75
|
<HeaderStateProvider RouterLink={RouterLink}>
|
|
75
76
|
<HeaderContainer
|
|
77
|
+
isIESupportPage={isIESupportPage}
|
|
76
78
|
skipToContentId={skipToContentId}
|
|
77
79
|
includeSkipToSidebar={includeSkipToSidebar}
|
|
78
80
|
>
|
|
@@ -93,6 +95,7 @@ const HeaderUI = ({
|
|
|
93
95
|
return (
|
|
94
96
|
<HeaderStateProvider RouterLink={RouterLink}>
|
|
95
97
|
<HeaderContainer
|
|
98
|
+
isIESupportPage={isIESupportPage}
|
|
96
99
|
skipToContentId={skipToContentId}
|
|
97
100
|
includeSkipToSidebar={includeSkipToSidebar}
|
|
98
101
|
>
|
|
@@ -142,6 +145,7 @@ HeaderUI.propTypes = {
|
|
|
142
145
|
showFacilityBasedPreviewLink: PropTypes.bool,
|
|
143
146
|
skipToContentId: PropTypes.string,
|
|
144
147
|
RouterLink: PropTypes.func,
|
|
148
|
+
isIESupportPage: PropTypes.bool,
|
|
145
149
|
};
|
|
146
150
|
HeaderUI.defaultProps = {
|
|
147
151
|
fbpPerformanceYear: null,
|
|
@@ -156,6 +160,7 @@ HeaderUI.defaultProps = {
|
|
|
156
160
|
showFacilityBasedPreviewLink: false,
|
|
157
161
|
skipToContentId: null,
|
|
158
162
|
RouterLink: null,
|
|
163
|
+
isIESupportPage: false,
|
|
159
164
|
};
|
|
160
165
|
|
|
161
166
|
export default HeaderUI;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cookie from 'cookie';
|
|
3
|
-
import FeatherIcon from 'feather-icons-react';
|
|
4
3
|
import axios from 'axios';
|
|
4
|
+
import CloseIcon from '@material-ui/icons/Close';
|
|
5
5
|
|
|
6
6
|
import { TextButton } from '../Button';
|
|
7
|
+
import { deleteImpersonatedUser } from '../../session/logout';
|
|
7
8
|
|
|
8
9
|
const ImpersonatorBanner = () => {
|
|
9
10
|
const { qpp_auth_token: token = null, qpp_impersonated_user: user = null } =
|
|
@@ -21,14 +22,13 @@ const ImpersonatorBanner = () => {
|
|
|
21
22
|
|
|
22
23
|
const onClick = () => {
|
|
23
24
|
const fn = () => {
|
|
24
|
-
|
|
25
|
-
'qpp_impersonated_user=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
|
|
25
|
+
deleteImpersonatedUser({ qpp_impersonated_user: user });
|
|
26
26
|
window.location.reload();
|
|
27
27
|
};
|
|
28
28
|
return axios
|
|
29
29
|
.delete('/api/auth/users/impersonate', {
|
|
30
30
|
headers: {
|
|
31
|
-
Accept: 'application/vnd.qpp.cms.gov.
|
|
31
|
+
Accept: 'application/vnd.qpp.cms.gov.v1+json',
|
|
32
32
|
Authorization: `Bearer ${token}`,
|
|
33
33
|
},
|
|
34
34
|
})
|
|
@@ -45,7 +45,7 @@ const ImpersonatorBanner = () => {
|
|
|
45
45
|
</div>
|
|
46
46
|
<TextButton onClick={onClick} className="qpp-u-color--gray-80">
|
|
47
47
|
Exit Impersonation Mode
|
|
48
|
-
<
|
|
48
|
+
<CloseIcon />
|
|
49
49
|
</TextButton>
|
|
50
50
|
</div>
|
|
51
51
|
)
|
|
@@ -13,6 +13,7 @@ export default class Header {
|
|
|
13
13
|
* @param {Boolean} options.includeSkipToSidebar
|
|
14
14
|
* @param {Boolean} options.showCancelButton
|
|
15
15
|
* @param {Boolean} options.showCovidLink
|
|
16
|
+
* @param {Boolean} options.isIESupportPage
|
|
16
17
|
* @param {HTMLElement} options.rootElement - Elem inside which to render
|
|
17
18
|
*/
|
|
18
19
|
constructor(options) {
|
|
@@ -31,6 +32,7 @@ export default class Header {
|
|
|
31
32
|
showMaqi={options.showMaqi}
|
|
32
33
|
isDevPre={options.isDevPre}
|
|
33
34
|
content={options.content}
|
|
35
|
+
isIESupportPage={options.isIESupportPage}
|
|
34
36
|
/>,
|
|
35
37
|
options.rootElement
|
|
36
38
|
);
|