qpp-style 9.14.0 → 9.14.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/components/DropdownButton/DropdownButton.stories.js +137 -0
- package/components/DropdownButton/index.js +148 -0
- package/components/Footer/FooterUI.jsx +40 -59
- package/coverage/clover.xml +133 -114
- package/coverage/coverage-final.json +7 -7
- package/coverage/lcov-report/index.html +39 -40
- package/coverage/lcov-report/react/components/Accordion/index.html +2 -3
- package/coverage/lcov-report/react/components/Accordion/index.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Button/index.html +2 -3
- package/coverage/lcov-report/react/components/Button/index.js.html +2 -3
- package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Error/error.js.html +2 -3
- package/coverage/lcov-report/react/components/Error/index.html +2 -3
- package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +50 -6
- package/coverage/lcov-report/react/components/Footer/LegacyFooterUI.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Footer/footer.js.html +2 -3
- package/coverage/lcov-report/react/components/Footer/index.html +2 -3
- package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +2 -3
- package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +39 -13
- package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +2 -3
- package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +2 -3
- package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +2 -3
- package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +6 -4
- package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +77 -21
- package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Header/header.js.html +2 -3
- package/coverage/lcov-report/react/components/Header/hooks.js.html +2 -3
- package/coverage/lcov-report/react/components/Header/index.html +30 -31
- package/coverage/lcov-report/react/components/Header/utag-helpers.js.html +2 -3
- package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Infotip/index.html +2 -3
- package/coverage/lcov-report/react/components/Infotip/index.js.html +2 -3
- package/coverage/lcov-report/react/components/Modal/LegacyModal.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Modal/index.html +2 -3
- package/coverage/lcov-report/react/components/Modal/index.jsx.html +2 -3
- package/coverage/lcov-report/react/components/NotificationBanner/index.html +2 -3
- package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +2 -3
- package/coverage/lcov-report/react/components/SanitizedContent/index.html +2 -3
- package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SessionDialog/index.html +2 -3
- package/coverage/lcov-report/react/components/SessionDialog/sessionDialog.js.html +2 -3
- package/coverage/lcov-report/react/components/SessionDialogUI.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Chart/ScoreChart.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Chart/index.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Chart/index.js.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +109 -14
- package/coverage/lcov-report/react/components/SideNav/Content/LevelTwoContent.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Content/index.html +19 -20
- package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Details/index.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Links/index.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +9 -4
- package/coverage/lcov-report/react/components/SideNav/UI/index.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/helpers.js.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/index.html +2 -3
- package/coverage/lcov-report/react/components/SideNav/index.js.html +2 -3
- package/coverage/lcov-report/react/components/Tooltip/Tooltip.jsx.html +2 -3
- package/coverage/lcov-report/react/components/Tooltip/index.html +2 -3
- package/coverage/lcov-report/react/components/Tooltip/index.js.html +2 -3
- package/coverage/lcov-report/react/components/Tooltip/position.js.html +2 -3
- package/coverage/lcov-report/react/components/hooks/index.html +2 -3
- package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +2 -3
- package/coverage/lcov-report/react/components/index.html +2 -3
- package/coverage/lcov-report/react/index.html +2 -3
- package/coverage/lcov-report/react/index.js.html +2 -3
- package/coverage/lcov-report/react/lib/Chevron.jsx.html +2 -3
- package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +2 -3
- package/coverage/lcov-report/react/lib/index.html +2 -3
- package/coverage/lcov-report/react/lib/svg-definitions.svg.html +2 -3
- package/coverage/lcov-report/react/session/index.html +21 -22
- package/coverage/lcov-report/react/session/index.js.html +2 -3
- package/coverage/lcov-report/react/session/logout.js.html +75 -13
- package/coverage/lcov-report/react/session/refresh.js.html +2 -3
- package/coverage/lcov-report/react/session/ttl.js.html +2 -3
- package/coverage/lcov.info +298 -240
- 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/images/icons/svg/file-download.svg +1 -0
- package/package.json +1 -1
- package/styles/qppds/components/_button.scss +11 -2
- package/styles/qppds/components/_circular-loader.scss +47 -0
- package/styles/qppds/components/_dropdown-menu.scss +119 -0
- package/styles/qppds/components/index.scss +2 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import SvgIcon from '@material-ui/core/SvgIcon';
|
|
3
|
+
import DropdownButton from './index';
|
|
4
|
+
import { withKnobs, boolean } from '@storybook/addon-knobs';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'DropdownButton',
|
|
8
|
+
component: DropdownButton,
|
|
9
|
+
decorators: [withKnobs],
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// mat-ui v4 doesn't include this "FileDownload" icon, but mat-ui v5 does
|
|
13
|
+
// whenever we update to v5, we could replace this svg with the one from npm
|
|
14
|
+
const DownloadIcon = (...props) => (
|
|
15
|
+
<SvgIcon {...props}>
|
|
16
|
+
<path d="M18,15v3H6v-3H4v3c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2v-3H18z M17,11l-1.41-1.41L13,12.17V4h-2v8.17L8.41,9.59L7,11l5,5 L17,11z" />
|
|
17
|
+
</SvgIcon>
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export const BasicExample = () => (
|
|
21
|
+
<div className="qpp-u-padding--48">
|
|
22
|
+
<DropdownButton
|
|
23
|
+
menuId="example-menu-1"
|
|
24
|
+
ariaLabel="aria label example"
|
|
25
|
+
buttonLabel="Test"
|
|
26
|
+
options={[
|
|
27
|
+
{
|
|
28
|
+
value: 'option 1',
|
|
29
|
+
},
|
|
30
|
+
{ value: 'option 2', name: 'Name of Option 2' },
|
|
31
|
+
]}
|
|
32
|
+
loading={boolean('loading', false)}
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
/*
|
|
38
|
+
Dropdown menu headers were removed from designs for now. We may revisit this
|
|
39
|
+
in the future so we're leaving this here until we decide on design.
|
|
40
|
+
*/
|
|
41
|
+
// export const WithHeader = () => (
|
|
42
|
+
// <div className="qpp-u-padding--48">
|
|
43
|
+
// <DropdownButton
|
|
44
|
+
// menuId="example-menu-2"
|
|
45
|
+
// ariaLabel="aria label example"
|
|
46
|
+
// buttonLabel="Test"
|
|
47
|
+
// options={[
|
|
48
|
+
// {
|
|
49
|
+
// value: 'option 1',
|
|
50
|
+
// },
|
|
51
|
+
// { value: 'option 2', name: 'Name of Option 2' },
|
|
52
|
+
// ]}
|
|
53
|
+
// header="Header"
|
|
54
|
+
// />
|
|
55
|
+
// </div>
|
|
56
|
+
// );
|
|
57
|
+
|
|
58
|
+
export const Loading = () => (
|
|
59
|
+
<div className="qpp-u-padding--48">
|
|
60
|
+
<DropdownButton
|
|
61
|
+
menuId="example-menu-3"
|
|
62
|
+
ariaLabel="aria label example"
|
|
63
|
+
buttonLabel="Test"
|
|
64
|
+
options={[
|
|
65
|
+
{
|
|
66
|
+
value: 'option 1',
|
|
67
|
+
},
|
|
68
|
+
{ value: 'option 2', name: 'Name of Option 2' },
|
|
69
|
+
]}
|
|
70
|
+
loading
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
export const MaxHeight = () => (
|
|
76
|
+
<div className="qpp-u-padding--48">
|
|
77
|
+
<DropdownButton
|
|
78
|
+
menuId="example-menu-3"
|
|
79
|
+
ariaLabel="aria label example"
|
|
80
|
+
buttonLabel="Test"
|
|
81
|
+
options={[
|
|
82
|
+
{ value: 'option 1' },
|
|
83
|
+
{ value: 'option 2' },
|
|
84
|
+
{ value: 'option 3' },
|
|
85
|
+
{ value: 'option 4' },
|
|
86
|
+
{ value: 'option 5' },
|
|
87
|
+
{ value: 'option 6' },
|
|
88
|
+
{ value: 'option 7' },
|
|
89
|
+
{ value: 'option 8' },
|
|
90
|
+
{ value: 'option 9' },
|
|
91
|
+
]}
|
|
92
|
+
loading={boolean('loading', false)}
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
export const MaxWidth = () => (
|
|
98
|
+
<div className="qpp-u-padding--48">
|
|
99
|
+
<DropdownButton
|
|
100
|
+
menuId="example-menu-1"
|
|
101
|
+
ariaLabel="aria label example"
|
|
102
|
+
buttonLabel="Test"
|
|
103
|
+
options={[
|
|
104
|
+
{ value: 'option 1' },
|
|
105
|
+
{
|
|
106
|
+
value: 'option 2',
|
|
107
|
+
name: 'very long item text 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24',
|
|
108
|
+
},
|
|
109
|
+
]}
|
|
110
|
+
loading={boolean('loading', false)}
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
export const ItemsWithIcons = () => (
|
|
116
|
+
<div className="qpp-u-padding--48">
|
|
117
|
+
<DropdownButton
|
|
118
|
+
menuId="example-menu-1"
|
|
119
|
+
ariaLabel="aria label example"
|
|
120
|
+
buttonLabel="Test"
|
|
121
|
+
options={[
|
|
122
|
+
{
|
|
123
|
+
value: 'option 1',
|
|
124
|
+
Icon: DownloadIcon,
|
|
125
|
+
'aria-roledescription': 'Download file',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
value: 'option 2',
|
|
129
|
+
name: 'very long item text 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24',
|
|
130
|
+
Icon: DownloadIcon,
|
|
131
|
+
'aria-roledescription': 'Download file',
|
|
132
|
+
},
|
|
133
|
+
]}
|
|
134
|
+
loading={boolean('loading', false)}
|
|
135
|
+
/>
|
|
136
|
+
</div>
|
|
137
|
+
);
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import MuiMenu from '@material-ui/core/Menu';
|
|
4
|
+
import MuiMenuItem from '@material-ui/core/MenuItem';
|
|
5
|
+
import MuiProgressCircle from '@material-ui/core/CircularProgress';
|
|
6
|
+
import ExpandMore from '@material-ui/icons/ExpandMore';
|
|
7
|
+
import ExpandLess from '@material-ui/icons/ExpandLess';
|
|
8
|
+
import Button, { TextButton } from '../Button';
|
|
9
|
+
|
|
10
|
+
const ITEM_HEIGHT = 48;
|
|
11
|
+
|
|
12
|
+
const DropdownButton = ({
|
|
13
|
+
text = false,
|
|
14
|
+
loading = false,
|
|
15
|
+
options = [],
|
|
16
|
+
menuId,
|
|
17
|
+
buttonLabel,
|
|
18
|
+
header,
|
|
19
|
+
children,
|
|
20
|
+
...buttonProps
|
|
21
|
+
}) => {
|
|
22
|
+
const Btn = text ? TextButton : Button;
|
|
23
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
24
|
+
const open = Boolean(anchorEl);
|
|
25
|
+
const handleClick = (event) => {
|
|
26
|
+
setAnchorEl(event.currentTarget);
|
|
27
|
+
};
|
|
28
|
+
const handleClose = () => {
|
|
29
|
+
setAnchorEl(null);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<>
|
|
34
|
+
<Btn
|
|
35
|
+
aria-haspopup="true"
|
|
36
|
+
aria-controls={menuId}
|
|
37
|
+
onClick={handleClick}
|
|
38
|
+
{...buttonProps}
|
|
39
|
+
>
|
|
40
|
+
{buttonLabel}{' '}
|
|
41
|
+
{!anchorEl && (
|
|
42
|
+
<ExpandMore classes={{ root: 'qpp-icon-mat qpp-icon-inline--lg' }} />
|
|
43
|
+
)}
|
|
44
|
+
{anchorEl && (
|
|
45
|
+
<ExpandLess classes={{ root: 'qpp-icon-mat qpp-icon-inline--lg' }} />
|
|
46
|
+
)}
|
|
47
|
+
</Btn>
|
|
48
|
+
<MuiMenu
|
|
49
|
+
id={menuId}
|
|
50
|
+
keepMounted
|
|
51
|
+
open={open}
|
|
52
|
+
anchorEl={anchorEl}
|
|
53
|
+
onClose={handleClose}
|
|
54
|
+
getContentAnchorEl={null}
|
|
55
|
+
anchorOrigin={{
|
|
56
|
+
vertical: 'bottom',
|
|
57
|
+
}}
|
|
58
|
+
className="qpp-c-dropdown-menu"
|
|
59
|
+
classes={{
|
|
60
|
+
paper: 'qpp-c-dropdown-menu__box',
|
|
61
|
+
list: 'qpp-c-dropdown-menu__list',
|
|
62
|
+
}}
|
|
63
|
+
MenuListProps={{
|
|
64
|
+
['aria-labelledby']: header ? `${menuId}-header` : null,
|
|
65
|
+
}}
|
|
66
|
+
PaperProps={{
|
|
67
|
+
style: {
|
|
68
|
+
maxHeight: ITEM_HEIGHT * 5.5,
|
|
69
|
+
maxWidth: '400px',
|
|
70
|
+
},
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
{header && (
|
|
74
|
+
<MuiMenuItem
|
|
75
|
+
id={`${menuId}-header`}
|
|
76
|
+
onClick={(e) => {
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
e.stopPropagation();
|
|
79
|
+
}}
|
|
80
|
+
classes={{
|
|
81
|
+
root: 'qpp-c-dropdown-menu__item qpp-c-dropdown-menu__item--header',
|
|
82
|
+
}}
|
|
83
|
+
disabled
|
|
84
|
+
aria-hidden
|
|
85
|
+
role="presentation"
|
|
86
|
+
disableRipple
|
|
87
|
+
>
|
|
88
|
+
{header}
|
|
89
|
+
</MuiMenuItem>
|
|
90
|
+
)}
|
|
91
|
+
{loading && (
|
|
92
|
+
<MuiMenuItem
|
|
93
|
+
onClick={(e) => {
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
e.stopPropagation();
|
|
96
|
+
}}
|
|
97
|
+
classes={{
|
|
98
|
+
root: 'qpp-c-dropdown-menu__item qpp-c-dropdown-menu__item--loading',
|
|
99
|
+
}}
|
|
100
|
+
disableRipple
|
|
101
|
+
disabled
|
|
102
|
+
>
|
|
103
|
+
<MuiProgressCircle
|
|
104
|
+
size="1em"
|
|
105
|
+
color="inherit"
|
|
106
|
+
classes={{ root: 'qpp-c-dropdown-menu__spinner' }}
|
|
107
|
+
/>{' '}
|
|
108
|
+
<span role="status">Loading...</span>
|
|
109
|
+
</MuiMenuItem>
|
|
110
|
+
)}
|
|
111
|
+
{!loading &&
|
|
112
|
+
options.map(({ disabled, name, value, Icon, ...itemProps }) => (
|
|
113
|
+
<MuiMenuItem
|
|
114
|
+
disabled={disabled}
|
|
115
|
+
key={value}
|
|
116
|
+
value={value}
|
|
117
|
+
onClick={handleClose}
|
|
118
|
+
classes={{ root: 'qpp-c-dropdown-menu__item' }}
|
|
119
|
+
disableRipple
|
|
120
|
+
{...itemProps}
|
|
121
|
+
>
|
|
122
|
+
{Icon && (
|
|
123
|
+
<div className="qpp-c-dropdown-menu__icon">
|
|
124
|
+
<Icon classes={{ root: 'qpp-icon-mat' }} />
|
|
125
|
+
</div>
|
|
126
|
+
)}
|
|
127
|
+
<span>{name || value}</span>
|
|
128
|
+
</MuiMenuItem>
|
|
129
|
+
))}
|
|
130
|
+
</MuiMenu>
|
|
131
|
+
</>
|
|
132
|
+
);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
DropdownButton.propTypes = {
|
|
136
|
+
menuId: PropTypes.string.isRequired,
|
|
137
|
+
text: PropTypes.bool,
|
|
138
|
+
buttonLabel: PropTypes.string,
|
|
139
|
+
loading: PropTypes.bool,
|
|
140
|
+
options: PropTypes.arrayOf(PropTypes.object),
|
|
141
|
+
header: PropTypes.string,
|
|
142
|
+
children: PropTypes.oneOfType([
|
|
143
|
+
PropTypes.node,
|
|
144
|
+
PropTypes.arrayOf(PropTypes.node),
|
|
145
|
+
]),
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export default DropdownButton;
|
|
@@ -1,63 +1,40 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import axios from 'axios';
|
|
4
3
|
import OpenInNewIcon from '@material-ui/icons/OpenInNew';
|
|
5
4
|
|
|
6
5
|
import InfoTip from '../Infotip/Infotip';
|
|
7
6
|
import LegacyFooterUI from './LegacyFooterUI';
|
|
8
7
|
import Subscribe from './Subscribe';
|
|
9
8
|
import SocialLinks from './SocialLinks';
|
|
9
|
+
import useGetConfig from '../hooks/useGetConfig';
|
|
10
10
|
|
|
11
11
|
const infoTipLabel =
|
|
12
12
|
'When dialing 711, you will automatically be connected to a TRS Communications Assistant who will relay your conversation to the help desk agent with strict confidentiality.';
|
|
13
13
|
|
|
14
|
-
const FooterUI = (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const FooterUI = ({
|
|
15
|
+
isNewFooter,
|
|
16
|
+
isIESupportPage,
|
|
17
|
+
showHcdResearch,
|
|
18
|
+
buildVersion,
|
|
19
|
+
isFullWidth,
|
|
20
|
+
}) => {
|
|
21
|
+
const signUpNowLink = showHcdResearch
|
|
18
22
|
? '/about/hcd-research'
|
|
19
23
|
: '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.';
|
|
20
|
-
|
|
24
|
+
|
|
25
|
+
const result = useGetConfig({
|
|
26
|
+
timeout: 5,
|
|
27
|
+
url: '/config/footer',
|
|
28
|
+
localStorageName: 'qpp_footer',
|
|
29
|
+
});
|
|
30
|
+
const content = (result?.content || [
|
|
31
|
+
{ listServ: false, showCcsqLink: false },
|
|
32
|
+
])[0];
|
|
21
33
|
|
|
22
34
|
const setLink = (link) => {
|
|
23
35
|
return isIESupportPage ? '/' : link;
|
|
24
36
|
};
|
|
25
37
|
|
|
26
|
-
// The footer content is populated with the following priority order:
|
|
27
|
-
// 1. Use the footer content in localStorage if it's there
|
|
28
|
-
// 2. If not, make a call to get it from the QPPFE endpoint. Hydrate the localStorage item with the response.
|
|
29
|
-
// 3. If the call fails, use the default value
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
const storageContent = JSON.parse(
|
|
32
|
-
localStorage.getItem('qpp_footer_listServ')
|
|
33
|
-
);
|
|
34
|
-
if (
|
|
35
|
-
storageContent?.content &&
|
|
36
|
-
new Date().valueOf() < storageContent.expiration
|
|
37
|
-
) {
|
|
38
|
-
setListServ(storageContent.listServ);
|
|
39
|
-
} else {
|
|
40
|
-
const origin = window.location.origin;
|
|
41
|
-
axios
|
|
42
|
-
.get(
|
|
43
|
-
!origin.includes('localhost')
|
|
44
|
-
? `${origin}/config/footer`
|
|
45
|
-
: 'https://qpp.cms.gov/config/footer'
|
|
46
|
-
)
|
|
47
|
-
.then(({ data: { data = {} } }) => {
|
|
48
|
-
localStorage.setItem(
|
|
49
|
-
'qpp_footer_listServ',
|
|
50
|
-
JSON.stringify({
|
|
51
|
-
listServ: data.listServ,
|
|
52
|
-
})
|
|
53
|
-
);
|
|
54
|
-
setListServ(data.listServ);
|
|
55
|
-
})
|
|
56
|
-
.catch((e) => {
|
|
57
|
-
setListServ(false);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}, []);
|
|
61
38
|
if (isNewFooter) {
|
|
62
39
|
return (
|
|
63
40
|
<>
|
|
@@ -77,7 +54,7 @@ const FooterUI = (props) => {
|
|
|
77
54
|
)}
|
|
78
55
|
<footer className="global-footer">
|
|
79
56
|
<div className="build-version" id="build-version">
|
|
80
|
-
{
|
|
57
|
+
{buildVersion}
|
|
81
58
|
</div>
|
|
82
59
|
|
|
83
60
|
<div className="responsive-container">
|
|
@@ -166,25 +143,29 @@ const FooterUI = (props) => {
|
|
|
166
143
|
</a>
|
|
167
144
|
</p>
|
|
168
145
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
146
|
+
{content?.showCcsqLink && (
|
|
147
|
+
<>
|
|
148
|
+
<p className="contact-title">QPP Service Center:</p>
|
|
149
|
+
<a
|
|
150
|
+
href="https://cmsqualitysupport.servicenowservices.com/ccsq_support_central"
|
|
151
|
+
aria-label="CCSQ Support Central"
|
|
152
|
+
className="email-link"
|
|
153
|
+
target="__blank"
|
|
154
|
+
rel="noopener noreferrer"
|
|
155
|
+
>
|
|
156
|
+
<strong>
|
|
157
|
+
Create or Track a QPP Service Center Ticket
|
|
158
|
+
</strong>
|
|
159
|
+
<OpenInNewIcon classes={{ root: 'ccsq-link-icon' }} />
|
|
160
|
+
</a>
|
|
161
|
+
</>
|
|
162
|
+
)}
|
|
182
163
|
</div>
|
|
183
164
|
<div className="footer-social-newsletter">
|
|
184
165
|
<p className="sub-title">Stay Connected</p>
|
|
185
166
|
<SocialLinks />
|
|
186
167
|
<p className="sub-title">
|
|
187
|
-
{listServ
|
|
168
|
+
{content?.listServ
|
|
188
169
|
? 'Sign Up for the QPP Listserv'
|
|
189
170
|
: 'Sign Up for the QPP Newsletter'}
|
|
190
171
|
</p>
|
|
@@ -266,8 +247,8 @@ const FooterUI = (props) => {
|
|
|
266
247
|
}
|
|
267
248
|
return (
|
|
268
249
|
<LegacyFooterUI
|
|
269
|
-
buildVersion={
|
|
270
|
-
isFullWidth={
|
|
250
|
+
buildVersion={buildVersion}
|
|
251
|
+
isFullWidth={isFullWidth}
|
|
271
252
|
signUpNowLink={signUpNowLink}
|
|
272
253
|
/>
|
|
273
254
|
);
|