qpp-style 0.0.9 → 0.0.10

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.
Files changed (456) hide show
  1. package/.eslintrc.js +28 -28
  2. package/.husky/pre-commit +5 -0
  3. package/README.md +45 -0
  4. package/components/Accordion/index.jsx +35 -43
  5. package/components/Alert/index.js +53 -0
  6. package/components/Breadcrumb/index.js +4 -4
  7. package/components/Button/index.js +17 -6
  8. package/components/CalloutBox/index.js +109 -0
  9. package/components/Card/index.js +137 -0
  10. package/components/Details/DetailsIcons.js +50 -0
  11. package/components/Details/index.js +53 -0
  12. package/components/Dropdown/index.js +85 -0
  13. package/components/DropdownButton/Menu.js +25 -0
  14. package/components/DropdownButton/MenuButton.js +41 -0
  15. package/components/DropdownButton/MenuItem.js +25 -0
  16. package/components/DropdownButton/MenuItemLink.js +27 -0
  17. package/components/Error/Collapsible.jsx +2 -2
  18. package/components/Footer/FooterUI.jsx +175 -177
  19. package/components/Footer/footer.js +2 -12
  20. package/components/GovBanner/index.js +117 -0
  21. package/components/Header/HeaderAccountMenu.jsx +49 -75
  22. package/components/Header/HeaderContainer.jsx +46 -34
  23. package/components/Header/HeaderLogo.jsx +40 -17
  24. package/components/Header/HeaderMenuButton.js +38 -12
  25. package/components/Header/HeaderMenuItem.jsx +204 -64
  26. package/components/Header/HeaderMenuLink.js +46 -10
  27. package/components/Header/HeaderMenuSignOutButton.js +46 -10
  28. package/components/Header/HeaderMobileButton.js +15 -6
  29. package/components/Header/HeaderUI.jsx +118 -117
  30. package/components/Header/HelpIcon.jsx +7 -5
  31. package/components/Header/ImpersonatorBanner.jsx +81 -0
  32. package/components/Header/header.js +2 -0
  33. package/components/Header/hooks.js +53 -1
  34. package/components/Header/utag-helpers.js +9 -0
  35. package/components/Infotip/Infotip.jsx +6 -10
  36. package/components/Infotip/InfotipContent.jsx +46 -0
  37. package/components/Infotip/InfotipIcon.jsx +3 -3
  38. package/components/Link/index.js +61 -0
  39. package/components/Modal/Modal.jsx +53 -40
  40. package/components/Modal/index.jsx +11 -11
  41. package/components/NotificationBanner/CollapsedView.js +39 -0
  42. package/components/NotificationBanner/ExpandedView.js +45 -0
  43. package/components/NotificationBanner/index.js +219 -30
  44. package/components/Search/index.js +98 -0
  45. package/components/SessionDialog/sessionDialog.js +26 -0
  46. package/components/SessionDialogUI.jsx +34 -26
  47. package/components/SideNav/AnimationGroup/AnimationGroup.jsx +9 -2
  48. package/components/SideNav/Chart/ScoreChart.jsx +1 -1
  49. package/components/SideNav/Chart/__tests__/ScoreChart.test.js +3 -12
  50. package/components/SideNav/Chart/__tests__/__snapshots__/ScoreChart.test.js.snap +144 -35
  51. package/components/SideNav/Chart/index.js +1 -1
  52. package/components/SideNav/Content/LevelOneContent.jsx +145 -255
  53. package/components/SideNav/Content/LevelTwoContent.jsx +12 -10
  54. package/components/SideNav/Content/SelectRole/index.js +77 -0
  55. package/components/SideNav/Content/SelectRole/utils.js +140 -0
  56. package/components/SideNav/Details/PracticeDetails.jsx +4 -0
  57. package/components/SideNav/Links/CmsSwitchLink.jsx +1 -1
  58. package/components/SideNav/Links/NavLinkContainer.jsx +29 -34
  59. package/components/SideNav/Links/NavLinkDrawer.jsx +100 -17
  60. package/components/SideNav/Links/NavLinkInline.jsx +7 -2
  61. package/components/SideNav/SideNav.md +28 -27
  62. package/components/SideNav/UI/SideNavUI.jsx +122 -129
  63. package/components/SideNav/UI/default-content.json +117 -0
  64. package/components/SideNav/helpers.js +316 -4
  65. package/components/Tabs/TabPanel.js +5 -0
  66. package/components/Tabs/Tabs.js +73 -0
  67. package/components/TextInput/index.js +137 -0
  68. package/components/hooks/useGetConfig.js +75 -0
  69. package/components/index.js +103 -9
  70. package/coverage/clover.xml +1465 -41
  71. package/coverage/coverage-final.json +72 -1
  72. package/coverage/lcov-report/block-navigation.js +8 -0
  73. package/coverage/lcov-report/components/Accordion/index.html +26 -21
  74. package/coverage/lcov-report/components/Accordion/index.jsx.html +106 -131
  75. package/coverage/lcov-report/{SideNav/Chart → components/Button}/index.html +29 -24
  76. package/coverage/lcov-report/{Error/Collapsible.jsx.html → components/Button/index.js.html} +125 -114
  77. package/coverage/lcov-report/components/Error/Collapsible.jsx.html +92 -87
  78. package/coverage/lcov-report/components/Error/ErrorUI.jsx.html +32 -33
  79. package/coverage/lcov-report/components/Error/index.html +11 -6
  80. package/coverage/lcov-report/components/Footer/FooterUI.jsx.html +200 -189
  81. package/coverage/lcov-report/components/Footer/SocialLinks.jsx.html +24 -61
  82. package/coverage/lcov-report/components/Footer/Subscribe.jsx.html +18 -13
  83. package/coverage/lcov-report/components/Footer/index.html +35 -45
  84. package/coverage/lcov-report/components/{InfoModal → GovBanner}/index.html +27 -22
  85. package/coverage/lcov-report/components/{InfoModal/index.jsx.html → GovBanner/index.js.html} +157 -122
  86. package/coverage/lcov-report/components/Header/HeaderAccountMenu.jsx.html +93 -520
  87. package/coverage/lcov-report/components/Header/HeaderCancel.jsx.html +19 -23
  88. package/coverage/lcov-report/components/Header/HeaderContainer.jsx.html +280 -0
  89. package/coverage/lcov-report/components/{SideNav/Links/NavLinkContainer.jsx.html → Header/HeaderLogo.jsx.html} +78 -67
  90. package/coverage/lcov-report/components/{SideNav/Links/NavItemInline.jsx.html → Header/HeaderMenuButton.js.html} +71 -78
  91. package/coverage/lcov-report/components/{SideNav/Links/NavLinkDrawer.jsx.html → Header/HeaderMenuItem.jsx.html} +291 -268
  92. package/coverage/lcov-report/components/Header/HeaderMenuLink.js.html +253 -0
  93. package/coverage/lcov-report/components/Header/HeaderMenuSignOutButton.js.html +271 -0
  94. package/coverage/lcov-report/components/{SideNav/Links/NavLinkToggle.jsx.html → Header/HeaderMobileButton.js.html} +64 -47
  95. package/coverage/lcov-report/components/Header/HeaderUI.jsx.html +176 -756
  96. package/coverage/lcov-report/components/Header/HelpIcon.jsx.html +181 -0
  97. package/coverage/lcov-report/{Accordion/index.jsx.html → components/Header/ImpersonatorBanner.jsx.html} +109 -167
  98. package/coverage/lcov-report/components/Header/NavigationButtonIcon.jsx.html +24 -19
  99. package/coverage/lcov-report/components/Header/hooks.js.html +283 -0
  100. package/coverage/lcov-report/components/Header/index.html +203 -33
  101. package/coverage/lcov-report/components/{SideNav/Links/index.js.html → Header/utag-helpers.js.html} +35 -42
  102. package/coverage/lcov-report/components/Infotip/Infotip.jsx.html +53 -48
  103. package/coverage/lcov-report/components/Infotip/InfotipIcon.jsx.html +37 -32
  104. package/coverage/lcov-report/components/Infotip/index.html +8 -3
  105. package/coverage/lcov-report/components/Infotip/index.js.html +8 -3
  106. package/coverage/lcov-report/components/Modal/LegacyModal.jsx.html +301 -0
  107. package/coverage/lcov-report/{HeaderUI.jsx.html → components/Modal/Modal.jsx.html} +169 -257
  108. package/coverage/lcov-report/components/Modal/index.html +146 -0
  109. package/coverage/lcov-report/components/{SideNav/Details/IndividualDetails.jsx.html → Modal/index.jsx.html} +50 -42
  110. package/coverage/lcov-report/components/NotificationBanner/CollapsedView.js.html +202 -0
  111. package/coverage/lcov-report/components/NotificationBanner/ExpandedView.js.html +220 -0
  112. package/coverage/lcov-report/components/NotificationBanner/index.html +58 -23
  113. package/coverage/lcov-report/components/{SideNav/Content/LevelTwoContent.jsx.html → NotificationBanner/index.js.html} +292 -272
  114. package/coverage/lcov-report/components/SanitizedContent/index.html +8 -3
  115. package/coverage/lcov-report/components/SanitizedContent/index.jsx.html +475 -50
  116. package/coverage/lcov-report/components/SessionDialogUI.jsx.html +248 -255
  117. package/coverage/lcov-report/components/SideNav/Chart/ScoreChart.jsx.html +272 -408
  118. package/coverage/lcov-report/components/SideNav/Chart/index.html +28 -38
  119. package/coverage/lcov-report/components/SideNav/Content/SelectRole/index.html +116 -0
  120. package/coverage/lcov-report/components/SideNav/Content/SelectRole/utils.js.html +505 -0
  121. package/coverage/lcov-report/components/SideNav/helpers.js.html +987 -46
  122. package/coverage/lcov-report/components/SideNav/index.html +24 -19
  123. package/coverage/lcov-report/components/Tooltip/Tooltip.jsx.html +70 -65
  124. package/coverage/lcov-report/components/Tooltip/index.html +8 -3
  125. package/coverage/lcov-report/components/Tooltip/index.js.html +8 -3
  126. package/coverage/lcov-report/components/Tooltip/position.js.html +57 -64
  127. package/coverage/lcov-report/components/hooks/index.html +116 -0
  128. package/coverage/lcov-report/components/hooks/useGetConfig.js.html +310 -0
  129. package/coverage/lcov-report/components/index.html +10 -5
  130. package/coverage/lcov-report/index.html +401 -21
  131. package/coverage/lcov-report/{Error/ErrorUI.jsx.html → lib/Chevron.jsx.html} +44 -42
  132. package/coverage/lcov-report/lib/SvgComponents.jsx.html +1840 -0
  133. package/coverage/lcov-report/lib/index.html +34 -14
  134. package/coverage/lcov-report/react/components/Accordion/index.html +26 -21
  135. package/coverage/lcov-report/react/components/Accordion/index.jsx.html +67 -86
  136. package/coverage/lcov-report/react/components/{FlashNotification → Button}/index.html +23 -33
  137. package/coverage/lcov-report/{components/SideNav/Links/NavLinkInline.jsx.html → react/components/Button/index.js.html} +119 -120
  138. package/coverage/lcov-report/react/components/{Tabs → Dropdown}/index.html +23 -33
  139. package/coverage/lcov-report/react/components/{InfoModal/index.jsx.html → Dropdown/index.js.html} +102 -154
  140. package/coverage/lcov-report/react/components/Error/Collapsible.jsx.html +26 -21
  141. package/coverage/lcov-report/react/components/Error/ErrorUI.jsx.html +11 -6
  142. package/coverage/lcov-report/react/components/Error/error.js.html +8 -3
  143. package/coverage/lcov-report/react/components/Error/index.html +11 -6
  144. package/coverage/lcov-report/react/components/Footer/FooterUI.jsx.html +196 -194
  145. package/coverage/lcov-report/react/components/Footer/LegacyFooterUI.jsx.html +9 -4
  146. package/coverage/lcov-report/react/components/Footer/SocialLinks.jsx.html +18 -13
  147. package/coverage/lcov-report/react/components/Footer/Subscribe.jsx.html +18 -13
  148. package/coverage/lcov-report/react/components/Footer/footer.js.html +12 -37
  149. package/coverage/lcov-report/react/components/Footer/index.html +35 -45
  150. package/coverage/lcov-report/react/components/{InfoModal → GovBanner}/index.html +27 -22
  151. package/coverage/lcov-report/react/components/{Tabs/TabsUI.jsx.html → GovBanner/index.js.html} +146 -153
  152. package/coverage/lcov-report/react/components/Header/HeaderAccountMenu.jsx.html +81 -154
  153. package/coverage/lcov-report/react/components/Header/HeaderCancel.jsx.html +15 -10
  154. package/coverage/lcov-report/react/components/Header/HeaderContainer.jsx.html +91 -50
  155. package/coverage/lcov-report/react/components/Header/HeaderLogo.jsx.html +105 -31
  156. package/coverage/lcov-report/react/components/Header/HeaderMenuButton.js.html +109 -26
  157. package/coverage/lcov-report/react/components/Header/HeaderMenuItem.jsx.html +510 -85
  158. package/coverage/lcov-report/react/components/Header/HeaderMenuLink.js.html +137 -24
  159. package/coverage/lcov-report/react/components/Header/HeaderMenuSignOutButton.js.html +134 -21
  160. package/coverage/lcov-report/react/components/Header/HeaderMobileButton.js.html +56 -24
  161. package/coverage/lcov-report/react/components/Header/HeaderUI.jsx.html +172 -179
  162. package/coverage/lcov-report/react/components/Header/HelpIcon.jsx.html +30 -19
  163. package/coverage/lcov-report/react/components/Header/ImpersonatorBanner.jsx.html +331 -0
  164. package/coverage/lcov-report/react/components/Header/NavigationButtonIcon.jsx.html +9 -4
  165. package/coverage/lcov-report/react/components/Header/header.js.html +15 -4
  166. package/coverage/lcov-report/react/components/Header/hooks.js.html +187 -26
  167. package/coverage/lcov-report/react/components/Header/index.html +157 -122
  168. package/coverage/lcov-report/react/components/{Spinner/index.js.html → Header/utag-helpers.js.html} +26 -21
  169. package/coverage/lcov-report/react/components/Infotip/Infotip.jsx.html +12 -7
  170. package/coverage/lcov-report/react/components/{Tabs/tabs.js.html → Infotip/InfotipContent.jsx.html} +83 -48
  171. package/coverage/lcov-report/react/components/Infotip/InfotipIcon.jsx.html +12 -7
  172. package/coverage/lcov-report/react/components/Infotip/index.html +8 -3
  173. package/coverage/lcov-report/react/components/Infotip/index.js.html +8 -3
  174. package/coverage/lcov-report/react/components/{FlashNotification/FlashNotificationUI.jsx.html → Modal/LegacyModal.jsx.html} +89 -84
  175. package/coverage/lcov-report/react/components/Modal/Modal.jsx.html +505 -0
  176. package/coverage/lcov-report/react/components/Modal/index.html +52 -17
  177. package/coverage/lcov-report/react/components/Modal/index.jsx.html +38 -201
  178. package/coverage/lcov-report/{components/SideNav/Links/CmsSwitchLink.jsx.html → react/components/NotificationBanner/CollapsedView.js.html} +52 -50
  179. package/coverage/lcov-report/{components/SideNav/Details/PracticeDetails.jsx.html → react/components/NotificationBanner/ExpandedView.js.html} +74 -57
  180. package/coverage/lcov-report/react/components/NotificationBanner/index.html +56 -21
  181. package/coverage/lcov-report/react/components/NotificationBanner/index.js.html +615 -43
  182. package/coverage/lcov-report/react/components/SanitizedContent/index.html +8 -3
  183. package/coverage/lcov-report/react/components/SanitizedContent/index.jsx.html +12 -7
  184. package/coverage/lcov-report/react/components/{Spinner → SessionDialog}/index.html +11 -6
  185. package/coverage/lcov-report/react/components/{FlashNotification/index.js.html → SessionDialog/sessionDialog.js.html} +35 -42
  186. package/coverage/lcov-report/react/components/SessionDialogUI.jsx.html +80 -51
  187. package/coverage/lcov-report/react/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +38 -12
  188. package/coverage/lcov-report/react/components/SideNav/AnimationGroup/index.html +18 -13
  189. package/coverage/lcov-report/react/components/SideNav/Chart/ScoreChart.jsx.html +67 -56
  190. package/coverage/lcov-report/react/components/SideNav/Chart/index.html +26 -21
  191. package/coverage/lcov-report/react/components/SideNav/Chart/index.js.html +9 -4
  192. package/coverage/lcov-report/react/components/SideNav/Content/LevelOneContent.jsx.html +189 -514
  193. package/coverage/lcov-report/react/components/SideNav/Content/LevelTwoContent.jsx.html +28 -17
  194. package/coverage/lcov-report/{components/SideNav/Details → react/components/SideNav/Content/SelectRole}/index.html +42 -52
  195. package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/index.js.html +316 -0
  196. package/coverage/lcov-report/react/components/SideNav/Content/SelectRole/utils.js.html +505 -0
  197. package/coverage/lcov-report/react/components/SideNav/Content/index.html +32 -27
  198. package/coverage/lcov-report/react/components/SideNav/Content/index.js.html +8 -3
  199. package/coverage/lcov-report/react/components/SideNav/Details/IndividualDetails.jsx.html +10 -5
  200. package/coverage/lcov-report/react/components/SideNav/Details/PracticeDetails.jsx.html +26 -9
  201. package/coverage/lcov-report/react/components/SideNav/Details/index.html +23 -18
  202. package/coverage/lcov-report/react/components/SideNav/Details/index.js.html +8 -3
  203. package/coverage/lcov-report/react/components/SideNav/Links/CmsSwitchLink.jsx.html +9 -4
  204. package/coverage/lcov-report/react/components/SideNav/Links/NavItemInline.jsx.html +8 -3
  205. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkContainer.jsx.html +54 -64
  206. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkDrawer.jsx.html +281 -27
  207. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkInline.jsx.html +66 -46
  208. package/coverage/lcov-report/react/components/SideNav/Links/NavLinkToggle.jsx.html +8 -3
  209. package/coverage/lcov-report/react/components/SideNav/Links/index.html +44 -39
  210. package/coverage/lcov-report/react/components/SideNav/Links/index.js.html +8 -3
  211. package/coverage/lcov-report/react/components/SideNav/UI/SideNavUI.jsx.html +165 -181
  212. package/coverage/lcov-report/react/components/SideNav/UI/index.html +28 -23
  213. package/coverage/lcov-report/react/components/SideNav/UI/index.js.html +8 -3
  214. package/coverage/lcov-report/react/components/SideNav/helpers.js.html +967 -26
  215. package/coverage/lcov-report/react/components/SideNav/index.html +27 -22
  216. package/coverage/lcov-report/react/components/SideNav/index.js.html +8 -3
  217. package/coverage/lcov-report/react/components/Tooltip/Tooltip.jsx.html +20 -15
  218. package/coverage/lcov-report/react/components/Tooltip/index.html +8 -3
  219. package/coverage/lcov-report/react/components/Tooltip/index.js.html +8 -3
  220. package/coverage/lcov-report/react/components/Tooltip/position.js.html +22 -17
  221. package/coverage/lcov-report/{components/SideNav/AnimationGroup → react/components/hooks}/index.html +29 -24
  222. package/coverage/lcov-report/react/components/hooks/useGetConfig.js.html +310 -0
  223. package/coverage/lcov-report/react/components/index.html +10 -5
  224. package/coverage/lcov-report/react/index.html +20 -15
  225. package/coverage/lcov-report/react/index.js.html +29 -9
  226. package/coverage/lcov-report/react/lib/Chevron.jsx.html +181 -0
  227. package/coverage/lcov-report/react/lib/SvgComponents.jsx.html +221 -132
  228. package/coverage/lcov-report/react/lib/index.html +32 -27
  229. package/coverage/lcov-report/react/lib/svg-definitions.svg.html +8 -3
  230. package/coverage/lcov-report/react/session/index.html +32 -27
  231. package/coverage/lcov-report/react/session/index.js.html +8 -3
  232. package/coverage/lcov-report/react/session/logout.js.html +122 -18
  233. package/coverage/lcov-report/react/session/refresh.js.html +12 -7
  234. package/coverage/lcov-report/react/session/ttl.js.html +9 -4
  235. package/coverage/lcov-report/session/index.html +50 -45
  236. package/coverage/lcov-report/session/index.js.html +8 -3
  237. package/coverage/lcov-report/session/logout.js.html +144 -49
  238. package/coverage/lcov-report/session/refresh.js.html +41 -36
  239. package/coverage/lcov-report/session/ttl.js.html +34 -29
  240. package/coverage/lcov-report/sorter.js +26 -0
  241. package/coverage/lcov.info +3189 -46
  242. package/dist/browser.js +1 -1
  243. package/dist/browser.js.LICENSE.txt +1 -7
  244. package/dist/browser.js.map +1 -1
  245. package/dist/index.js +1 -1
  246. package/dist/index.js.LICENSE.txt +1 -7
  247. package/dist/index.js.map +1 -1
  248. package/dist/react/index.js +1 -1
  249. package/dist/react/index.js.LICENSE.txt +16 -16
  250. package/dist/react/index.js.map +1 -1
  251. package/fonts/PublicSans-Black.ttf +0 -0
  252. package/fonts/PublicSans-BlackItalic.ttf +0 -0
  253. package/fonts/PublicSans-Bold.ttf +0 -0
  254. package/fonts/PublicSans-BoldItalic.ttf +0 -0
  255. package/fonts/PublicSans-ExtraBold.ttf +0 -0
  256. package/fonts/PublicSans-ExtraBoldItalic.ttf +0 -0
  257. package/fonts/PublicSans-ExtraLight.ttf +0 -0
  258. package/fonts/PublicSans-ExtraLightItalic.ttf +0 -0
  259. package/fonts/PublicSans-Italic.ttf +0 -0
  260. package/fonts/PublicSans-Light.ttf +0 -0
  261. package/fonts/PublicSans-LightItalic.ttf +0 -0
  262. package/fonts/PublicSans-Medium.ttf +0 -0
  263. package/fonts/PublicSans-MediumItalic.ttf +0 -0
  264. package/fonts/PublicSans-Regular.ttf +0 -0
  265. package/fonts/PublicSans-SemiBold.ttf +0 -0
  266. package/fonts/PublicSans-SemiBoldItalic.ttf +0 -0
  267. package/fonts/PublicSans-Thin.ttf +0 -0
  268. package/fonts/PublicSans-ThinItalic.ttf +0 -0
  269. package/images/icon-dot-gov.svg +1 -0
  270. package/images/icon-https.svg +1 -0
  271. package/images/icons/close-x.svg +6 -0
  272. package/images/icons/svg/arrow-down.svg +3 -0
  273. package/images/icons/svg/arrow-download.svg +1 -0
  274. package/images/icons/svg/arrow-right.svg +1 -0
  275. package/images/icons/svg/arrow-up.svg +3 -0
  276. package/images/icons/svg/block.svg +5 -0
  277. package/images/icons/svg/calendar.svg +1 -0
  278. package/images/icons/svg/check-circle.svg +5 -0
  279. package/images/icons/svg/checkmark.svg +7 -0
  280. package/images/icons/svg/chevron-down.svg +11 -0
  281. package/images/icons/svg/chevron-left.svg +12 -0
  282. package/images/icons/svg/chevron-right.svg +12 -0
  283. package/images/icons/svg/chevron-up.svg +12 -0
  284. package/images/icons/svg/clipboard.svg +1 -0
  285. package/images/icons/svg/close.svg +1 -0
  286. package/images/icons/svg/divide.svg +13 -0
  287. package/images/icons/svg/doctors-and-clinicians-preview.svg +10 -0
  288. package/images/icons/svg/download.svg +1 -0
  289. package/images/icons/svg/dropdown-arrow.svg +1 -0
  290. package/images/icons/svg/equals.svg +13 -0
  291. package/images/icons/svg/exclamation.svg +11 -0
  292. package/images/icons/svg/external.svg +1 -0
  293. package/images/icons/svg/file-download.svg +1 -0
  294. package/images/icons/svg/file-upload.svg +1 -0
  295. package/images/icons/svg/info.svg +20 -0
  296. package/images/icons/svg/manage-user-access.svg +8 -0
  297. package/images/icons/svg/multiply.svg +12 -0
  298. package/images/icons/svg/performance-feedback.svg +1 -0
  299. package/images/icons/svg/plus.svg +12 -0
  300. package/images/icons/svg/preview.svg +17 -0
  301. package/images/icons/svg/print.svg +1 -0
  302. package/images/icons/svg/registration.svg +8 -0
  303. package/images/icons/svg/reporting.svg +17 -0
  304. package/images/icons/svg/save-disk.svg +5 -0
  305. package/images/icons/svg/search.svg +1 -0
  306. package/images/icons/svg/subtract.svg +15 -0
  307. package/images/icons/svg/targeted-review.svg +15 -0
  308. package/images/icons/svg/tooltip-question.svg +1 -0
  309. package/images/icons/svg/trash.svg +1 -0
  310. package/images/icons/svg/upload.svg +1 -0
  311. package/images/us_flag_small.png +0 -0
  312. package/index.js +5 -0
  313. package/jest.config.js +139 -132
  314. package/lib/Chevron.jsx +32 -0
  315. package/lib/SvgComponents.jsx +197 -49
  316. package/package.json +60 -78
  317. package/session/logout.js +35 -2
  318. package/styles/_global.scss +63 -62
  319. package/styles/_main.scss +6 -0
  320. package/styles/_qpp-style.scss +0 -3
  321. package/styles/components/_accordion.scss +249 -246
  322. package/styles/components/_autocomplete.scss +0 -3
  323. package/styles/components/_spinner.scss +0 -2
  324. package/styles/components/_tables.scss +77 -67
  325. package/styles/components/_text.scss +102 -102
  326. package/styles/components/_variables.scss +12 -12
  327. package/styles/qppds/base/_backgrounds.scss +1 -6
  328. package/styles/qppds/base/_fonts.scss +24 -0
  329. package/styles/qppds/base/_icon.scss +31 -0
  330. package/styles/qppds/base/_layout.scss +5 -0
  331. package/styles/qppds/base/_typography.scss +77 -43
  332. package/styles/qppds/base/index.scss +3 -6
  333. package/styles/qppds/components/_alert.scss +101 -0
  334. package/styles/qppds/components/_breadcrumbs.scss +42 -10
  335. package/styles/qppds/components/_button.scss +38 -12
  336. package/styles/qppds/components/_card.scss +175 -0
  337. package/styles/qppds/components/_checkbox.scss +199 -0
  338. package/styles/qppds/components/_circular-loader.scss +47 -0
  339. package/styles/qppds/components/_details.scss +90 -0
  340. package/styles/qppds/components/_dropdown-menu.scss +125 -0
  341. package/styles/qppds/components/_dropdown.scss +5 -0
  342. package/styles/qppds/components/_footer.scss +606 -0
  343. package/styles/qppds/components/_gov-banner.scss +344 -0
  344. package/styles/{components → qppds/components}/_header.scss +460 -24
  345. package/styles/qppds/components/_link.scss +32 -9
  346. package/styles/qppds/components/_modal.scss +61 -21
  347. package/styles/qppds/components/_page-header.scss +65 -2
  348. package/styles/qppds/components/_pagination.scss +227 -0
  349. package/styles/qppds/components/_process-list.scss +104 -0
  350. package/styles/qppds/components/_radio-button.scss +184 -0
  351. package/styles/qppds/components/_search.scss +118 -0
  352. package/styles/{components → qppds/components}/_sidebar.scss +2 -0
  353. package/styles/qppds/components/_step-indicator.scss +190 -0
  354. package/styles/qppds/components/_table.scss +157 -0
  355. package/styles/qppds/components/_tabs.scss +197 -0
  356. package/styles/qppds/components/_text-input.scss +60 -0
  357. package/styles/qppds/components/index.scss +18 -0
  358. package/styles/{components → qppds/components}/sidebar/_links.scss +48 -1
  359. package/styles/qppds/components/sidebar/_select-role-dropdown.scss +21 -0
  360. package/styles/{components → qppds/components}/sidebar/_sidebar-animation.scss +4 -0
  361. package/styles/qppds/components/sidebar/_sidebar.scss +146 -0
  362. package/styles/qppds/settings/_functions.scss +3 -1
  363. package/styles/qppds/settings/mixins/_borders.scss +6 -0
  364. package/styles/qppds/settings/mixins/_focus.scss +7 -1
  365. package/styles/qppds/settings/mixins/_icons.scss +39 -4
  366. package/styles/qppds/settings/mixins/_index.scss +3 -0
  367. package/styles/qppds/settings/mixins/_layout.scss +46 -7
  368. package/styles/qppds/settings/mixins/_table.scss +91 -0
  369. package/styles/qppds/settings/mixins/_type.scss +89 -0
  370. package/styles/qppds/settings/variables/_color.scss +47 -1
  371. package/styles/qppds/settings/variables/_index.scss +2 -1
  372. package/styles/qppds/settings/variables/_layout.scss +34 -9
  373. package/styles/qppds/settings/variables/_type.scss +41 -0
  374. package/styles/qppds/settings/variables/_z-index.scss +8 -0
  375. package/styles/qppds/utilities/_background-color.scss +4 -0
  376. package/styles/qppds/utilities/_color.scss +24 -0
  377. package/styles/qppds/utilities/{_display-visability.scss → _display-visibility.scss} +8 -0
  378. package/styles/qppds/utilities/_flexbox.scss +113 -0
  379. package/styles/qppds/utilities/_font-family.scss +4 -0
  380. package/styles/qppds/utilities/_gap.scss +38 -0
  381. package/styles/qppds/utilities/_height.scss +79 -0
  382. package/styles/qppds/utilities/_list-style.scss +18 -0
  383. package/styles/qppds/utilities/_position.scss +24 -0
  384. package/styles/qppds/utilities/_text-align.scss +40 -0
  385. package/styles/qppds/utilities/_text-transform.scss +7 -0
  386. package/styles/qppds/utilities/_truncate.scss +5 -5
  387. package/styles/qppds/utilities/_vertical-align.scss +72 -0
  388. package/styles/qppds/utilities/_width.scss +38 -1
  389. package/styles/qppds/utilities/index.scss +8 -2
  390. package/svgo.config.js +14 -0
  391. package/test/components/Accordion.test.js +4 -13
  392. package/test/components/ErrorUI.test.js +10 -46
  393. package/test/components/FooterUI.test.js +0 -30
  394. package/test/components/HeaderUI.test.js +32 -40
  395. package/test/components/Infotip.test.js +18 -12
  396. package/test/components/SessionDialogUI.test.js +55 -70
  397. package/test-setup.js +0 -8
  398. package/webpack.config.js +29 -39
  399. package/webpack.config.react.js +7 -18
  400. package/.storybook/.babelrc +0 -4
  401. package/.storybook/main.js +0 -88
  402. package/.storybook/preview-head.html +0 -9
  403. package/.storybook/preview.js +0 -5
  404. package/Session.vim +0 -83
  405. package/components/Accordion/Accordion.stories.js +0 -20
  406. package/components/Breadcrumb/Breadcrumb.stories.js +0 -58
  407. package/components/Button/Button.stories.js +0 -125
  408. package/components/Footer/Footer.stories.js +0 -20
  409. package/components/Footer/LegacyFooterUI.jsx +0 -194
  410. package/components/Header/Header.stories.js +0 -32
  411. package/components/InfoModal/InfoModal.stories.js +0 -98
  412. package/components/InfoModal/index.jsx +0 -104
  413. package/components/Infotip/Infotip.stories.js +0 -50
  414. package/components/Modal/Modal.stories.js +0 -159
  415. package/components/NotificationBanner/NotificationBanner.stories.js +0 -22
  416. package/components/NotificationBanner/NotificationBannerUI.jsx +0 -282
  417. package/components/SideNav/SideNav.stories.js +0 -397
  418. package/components/Spinner/index.js +0 -9
  419. package/components/Tabs/TabsUI.jsx +0 -118
  420. package/components/Tabs/tabs.js +0 -36
  421. package/components/Tooltip/Tooltip.jsx +0 -88
  422. package/components/Tooltip/Tooltip.stories.js +0 -80
  423. package/components/Tooltip/index.js +0 -3
  424. package/components/Tooltip/position.js +0 -68
  425. package/components/UnwrappedSpinner/index.js +0 -8
  426. package/components/UnwrappedTabs/TabPanelUI.jsx +0 -16
  427. package/components/UnwrappedTabs/TabsUI.jsx +0 -82
  428. package/coverage/lcov-report/Accordion/index.html +0 -111
  429. package/coverage/lcov-report/Error/index.html +0 -126
  430. package/coverage/lcov-report/ScoreChart.jsx.html +0 -1025
  431. package/coverage/lcov-report/SideNav/Chart/ScoreChart.jsx.html +0 -1025
  432. package/coverage/lcov-report/components/Footer/LegacyFooterUI.jsx.html +0 -668
  433. package/coverage/lcov-report/components/NotificationBanner/NotificationBannerUI.jsx.html +0 -1010
  434. package/coverage/lcov-report/components/SideNav/AnimationGroup/AnimationGroup.jsx.html +0 -131
  435. package/coverage/lcov-report/components/SideNav/Chart/index.js.html +0 -89
  436. package/coverage/lcov-report/components/SideNav/Content/LevelOneContent.jsx.html +0 -1007
  437. package/coverage/lcov-report/components/SideNav/Content/index.html +0 -141
  438. package/coverage/lcov-report/components/SideNav/Content/index.js.html +0 -92
  439. package/coverage/lcov-report/components/SideNav/Details/index.js.html +0 -92
  440. package/coverage/lcov-report/components/SideNav/Links/index.html +0 -201
  441. package/coverage/lcov-report/components/SideNav/UI/SideNavUI.jsx.html +0 -1298
  442. package/coverage/lcov-report/components/SideNav/UI/index.html +0 -126
  443. package/coverage/lcov-report/components/SideNav/UI/index.js.html +0 -89
  444. package/coverage/lcov-report/lib/svg-definitions.svg.html +0 -1319
  445. package/coverage/lcov-report/react/components/NotificationBanner/NotificationBannerUI.jsx.html +0 -926
  446. package/styles/components/_footer.scss +0 -593
  447. package/styles/components/_header_backup.scss +0 -574
  448. package/styles/components/sidebar/_sidebar.scss +0 -141
  449. package/test/components/Tooltip.test.js +0 -147
  450. package/test/components/__snapshots__/Accordion.test.js.snap +0 -11439
  451. package/test/components/__snapshots__/HeaderUI.test.js.snap +0 -3
  452. /package/styles/{components → qppds/components}/sidebar/_animations.scss +0 -0
  453. /package/styles/{components → qppds/components}/sidebar/_cms.scss +0 -0
  454. /package/styles/{components → qppds/components}/sidebar/_details.scss +0 -0
  455. /package/styles/{components → qppds/components}/sidebar/_sidebar-tooltip.scss +0 -0
  456. /package/styles/{components → qppds/components}/sidebar/project-specific/_wi.scss +0 -0
@@ -30,7 +30,7 @@
30
30
 
31
31
 
32
32
  <div class='fl pad1y space-right2'>
33
- <span class="strong">67.86% </span>
33
+ <span class="strong">67.85% </span>
34
34
  <span class="quiet">Branches</span>
35
35
  <span class='fraction'>19/28</span>
36
36
  </div>
@@ -54,6 +54,12 @@
54
54
  <p class="quiet">
55
55
  Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
56
56
  </p>
57
+ <template id="filterTemplate">
58
+ <div class="quiet">
59
+ Filter:
60
+ <input oninput="onInput()" type="search" id="fileSearch">
61
+ </div>
62
+ </template>
57
63
  </div>
58
64
  <div class='status-line medium'></div>
59
65
  <pre><table class="coverage">
@@ -318,11 +324,8 @@
318
324
  <a name='L259'></a><a href='#L259'>259</a>
319
325
  <a name='L260'></a><a href='#L260'>260</a>
320
326
  <a name='L261'></a><a href='#L261'>261</a>
321
- <a name='L262'></a><a href='#L262'>262</a>
322
- <a name='L263'></a><a href='#L263'>263</a>
323
- <a name='L264'></a><a href='#L264'>264</a>
324
- <a name='L265'></a><a href='#L265'>265</a>
325
- <a name='L266'></a><a href='#L266'>266</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
327
+ <a name='L262'></a><a href='#L262'>262</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
328
+ <span class="cline-any cline-neutral">&nbsp;</span>
326
329
  <span class="cline-any cline-neutral">&nbsp;</span>
327
330
  <span class="cline-any cline-neutral">&nbsp;</span>
328
331
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -340,31 +343,31 @@
340
343
  <span class="cline-any cline-neutral">&nbsp;</span>
341
344
  <span class="cline-any cline-neutral">&nbsp;</span>
342
345
  <span class="cline-any cline-neutral">&nbsp;</span>
343
- <span class="cline-any cline-yes">20x</span>
346
+ <span class="cline-any cline-yes">19x</span>
344
347
  <span class="cline-any cline-neutral">&nbsp;</span>
345
- <span class="cline-any cline-yes">20x</span>
346
- <span class="cline-any cline-yes">20x</span>
347
- <span class="cline-any cline-yes">20x</span>
348
- <span class="cline-any cline-yes">20x</span>
349
- <span class="cline-any cline-yes">20x</span>
350
- <span class="cline-any cline-yes">20x</span>
351
- <span class="cline-any cline-yes">20x</span>
352
- <span class="cline-any cline-yes">20x</span>
353
- <span class="cline-any cline-yes">20x</span>
354
- <span class="cline-any cline-yes">20x</span>
348
+ <span class="cline-any cline-yes">19x</span>
349
+ <span class="cline-any cline-yes">19x</span>
350
+ <span class="cline-any cline-yes">19x</span>
351
+ <span class="cline-any cline-yes">19x</span>
352
+ <span class="cline-any cline-yes">19x</span>
353
+ <span class="cline-any cline-yes">19x</span>
354
+ <span class="cline-any cline-yes">19x</span>
355
+ <span class="cline-any cline-yes">19x</span>
356
+ <span class="cline-any cline-yes">19x</span>
357
+ <span class="cline-any cline-yes">19x</span>
355
358
  <span class="cline-any cline-neutral">&nbsp;</span>
356
- <span class="cline-any cline-yes">20x</span>
359
+ <span class="cline-any cline-yes">19x</span>
357
360
  <span class="cline-any cline-yes">8x</span>
358
361
  <span class="cline-any cline-neutral">&nbsp;</span>
359
362
  <span class="cline-any cline-neutral">&nbsp;</span>
360
363
  <span class="cline-any cline-neutral">&nbsp;</span>
361
364
  <span class="cline-any cline-neutral">&nbsp;</span>
362
- <span class="cline-any cline-yes">12x</span>
365
+ <span class="cline-any cline-yes">11x</span>
363
366
  <span class="cline-any cline-neutral">&nbsp;</span>
364
367
  <span class="cline-any cline-neutral">&nbsp;</span>
365
368
  <span class="cline-any cline-neutral">&nbsp;</span>
366
369
  <span class="cline-any cline-neutral">&nbsp;</span>
367
- <span class="cline-any cline-yes">12x</span>
370
+ <span class="cline-any cline-yes">11x</span>
368
371
  <span class="cline-any cline-neutral">&nbsp;</span>
369
372
  <span class="cline-any cline-neutral">&nbsp;</span>
370
373
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -380,9 +383,6 @@
380
383
  <span class="cline-any cline-neutral">&nbsp;</span>
381
384
  <span class="cline-any cline-neutral">&nbsp;</span>
382
385
  <span class="cline-any cline-neutral">&nbsp;</span>
383
- <span class="cline-any cline-neutral">&nbsp;</span>
384
- <span class="cline-any cline-neutral">&nbsp;</span>
385
- <span class="cline-any cline-neutral">&nbsp;</span>
386
386
  <span class="cline-any cline-yes">1x</span>
387
387
  <span class="cline-any cline-yes">1x</span>
388
388
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -407,9 +407,6 @@
407
407
  <span class="cline-any cline-yes">78x</span>
408
408
  <span class="cline-any cline-neutral">&nbsp;</span>
409
409
  <span class="cline-any cline-yes">78x</span>
410
- <span class="cline-any cline-neutral">&nbsp;</span>
411
- <span class="cline-any cline-neutral">&nbsp;</span>
412
- <span class="cline-any cline-neutral">&nbsp;</span>
413
410
  <span class="cline-any cline-yes">76x</span>
414
411
  <span class="cline-any cline-neutral">&nbsp;</span>
415
412
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -428,9 +425,6 @@
428
425
  <span class="cline-any cline-no">&nbsp;</span>
429
426
  <span class="cline-any cline-neutral">&nbsp;</span>
430
427
  <span class="cline-any cline-no">&nbsp;</span>
431
- <span class="cline-any cline-neutral">&nbsp;</span>
432
- <span class="cline-any cline-neutral">&nbsp;</span>
433
- <span class="cline-any cline-neutral">&nbsp;</span>
434
428
  <span class="cline-any cline-no">&nbsp;</span>
435
429
  <span class="cline-any cline-neutral">&nbsp;</span>
436
430
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -446,9 +440,9 @@
446
440
  <span class="cline-any cline-neutral">&nbsp;</span>
447
441
  <span class="cline-any cline-neutral">&nbsp;</span>
448
442
  <span class="cline-any cline-neutral">&nbsp;</span>
449
- <span class="cline-any cline-yes">15x</span>
443
+ <span class="cline-any cline-yes">14x</span>
450
444
  <span class="cline-any cline-neutral">&nbsp;</span>
451
- <span class="cline-any cline-yes">15x</span>
445
+ <span class="cline-any cline-yes">14x</span>
452
446
  <span class="cline-any cline-neutral">&nbsp;</span>
453
447
  <span class="cline-any cline-neutral">&nbsp;</span>
454
448
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -462,9 +456,6 @@
462
456
  <span class="cline-any cline-neutral">&nbsp;</span>
463
457
  <span class="cline-any cline-yes">5x</span>
464
458
  <span class="cline-any cline-neutral">&nbsp;</span>
465
- <span class="cline-any cline-neutral">&nbsp;</span>
466
- <span class="cline-any cline-neutral">&nbsp;</span>
467
- <span class="cline-any cline-neutral">&nbsp;</span>
468
459
  <span class="cline-any cline-yes">5x</span>
469
460
  <span class="cline-any cline-neutral">&nbsp;</span>
470
461
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -540,11 +531,18 @@
540
531
  <span class="cline-any cline-neutral">&nbsp;</span>
541
532
  <span class="cline-any cline-neutral">&nbsp;</span>
542
533
  <span class="cline-any cline-neutral">&nbsp;</span>
534
+ <span class="cline-any cline-yes">22x</span>
535
+ <span class="cline-any cline-neutral">&nbsp;</span>
536
+ <span class="cline-any cline-neutral">&nbsp;</span>
537
+ <span class="cline-any cline-neutral">&nbsp;</span>
538
+ <span class="cline-any cline-neutral">&nbsp;</span>
539
+ <span class="cline-any cline-neutral">&nbsp;</span>
540
+ <span class="cline-any cline-neutral">&nbsp;</span>
541
+ <span class="cline-any cline-neutral">&nbsp;</span>
543
542
  <span class="cline-any cline-neutral">&nbsp;</span>
544
543
  <span class="cline-any cline-neutral">&nbsp;</span>
545
544
  <span class="cline-any cline-neutral">&nbsp;</span>
546
545
  <span class="cline-any cline-neutral">&nbsp;</span>
547
- <span class="cline-any cline-yes">23x</span>
548
546
  <span class="cline-any cline-neutral">&nbsp;</span>
549
547
  <span class="cline-any cline-neutral">&nbsp;</span>
550
548
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -588,11 +586,12 @@
588
586
  <span class="cline-any cline-neutral">&nbsp;</span>
589
587
  <span class="cline-any cline-neutral">&nbsp;</span>
590
588
  <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import React, { Component } from 'react';
591
- import InfoModal from './InfoModal';
592
589
  import PropTypes from 'prop-types';
593
590
  import cookie from 'cookie';
594
591
  import retry from 'retry';
595
592
  import jwtDecode from 'jwt-decode';
593
+ &nbsp;
594
+ import Modal from './Modal';
596
595
  import RefreshSession from '../session/refresh';
597
596
  import LogoutSession from '../session/logout';
598
597
  import fetchTtl from '../session/ttl';
@@ -600,257 +599,252 @@ import fetchTtl from '../session/ttl';
600
599
  const fetchTtlIntervalMs = 60000;
601
600
  &nbsp;
602
601
  export default class SessionDialogUI extends Component {
603
- /**
604
- * Create a SessionDialogUI component.
605
- * @param {object} props - Configuration options. See SessionDialog for more
606
- */
607
- constructor(props) {
608
- super(props);
602
+ /**
603
+ * Create a SessionDialogUI component.
604
+ * @param {object} props - Configuration options. See SessionDialog for more
605
+ */
606
+ constructor(props) {
607
+ super(props);
609
608
  &nbsp;
610
- this.handleOpenModal = this.handleOpenModal.bind(this);
611
- this.handleCloseModal = this.handleCloseModal.bind(this);
612
- this.refreshSession = this.refreshSession.bind(this);
613
- this.signOut = this.signOut.bind(this);
614
- this.startTimer = this.startTimer.bind(this);
615
- this.shouldShowDialog = this.shouldShowDialog.bind(this);
616
- this.shouldSignOut = this.shouldSignOut.bind(this);
617
- this.minutesUntil = this.minutesUntil.bind(this);
618
- this.checkExpiry = this.checkExpiry.bind(this);
619
- this.onInterval = this.onInterval.bind(this);
609
+ this.handleOpenModal = this.handleOpenModal.bind(this);
610
+ this.handleCloseModal = this.handleCloseModal.bind(this);
611
+ this.refreshSession = this.refreshSession.bind(this);
612
+ this.signOut = this.signOut.bind(this);
613
+ this.startTimer = this.startTimer.bind(this);
614
+ this.shouldShowDialog = this.shouldShowDialog.bind(this);
615
+ this.shouldSignOut = this.shouldSignOut.bind(this);
616
+ this.minutesUntil = this.minutesUntil.bind(this);
617
+ this.checkExpiry = this.checkExpiry.bind(this);
618
+ this.onInterval = this.onInterval.bind(this);
620
619
  &nbsp;
621
- if (props.showImmediate === true) {
622
- this.state = {
623
- showModal: true,
624
- showError: false
625
- };
626
- } else {
627
- this.state = {
628
- showModal: false,
629
- showError: false
630
- };
620
+ if (props.showImmediate === true) {
621
+ this.state = {
622
+ showModal: true,
623
+ showError: false,
624
+ };
625
+ } else {
626
+ this.state = {
627
+ showModal: false,
628
+ showError: false,
629
+ };
631
630
  &nbsp;
632
- this.startTimer();
633
- }
631
+ this.startTimer();
634
632
  }
633
+ }
635
634
  &nbsp;
636
- /**
637
- * Extracts the token exp value as a JavaScript date.
638
- * @param {Object} cookies - An object representation of the cookie store
639
- * @returns {(date|null)} The token expiration date, if found
640
- */
641
- getTokenExpiry(cookies) {
642
- let expiry = null;
643
- &nbsp;
644
- if (
645
- cookies.hasOwnProperty('qpp_auth_token') &amp;&amp;
646
- cookies.qpp_auth_token
647
- ) {
648
- // See https://tools.ietf.org/html/rfc7519
649
- // `exp` is a NumericDate representing "seconds since the epoch"
650
- // and it needs to be milliseconds to get a JavaScript date from it.
651
- const { exp } = jwtDecode(cookies.qpp_auth_token);
652
- expiry = new Date(exp * 1000);
653
- }
635
+ /**
636
+ * Extracts the token exp value as a JavaScript date.
637
+ * @param {Object} cookies - An object representation of the cookie store
638
+ * @returns {(date|null)} The token expiration date, if found
639
+ */
640
+ getTokenExpiry(cookies) {
641
+ let expiry = null;
654
642
  &nbsp;
655
- return expiry;
643
+ if (cookies.hasOwnProperty('qpp_auth_token') &amp;&amp; cookies.qpp_auth_token) {
644
+ // See https://tools.ietf.org/html/rfc7519
645
+ // `exp` is a NumericDate representing "seconds since the epoch"
646
+ // and it needs to be milliseconds to get a JavaScript date from it.
647
+ const { exp } = jwtDecode(cookies.qpp_auth_token);
648
+ expiry = new Date(exp * 1000);
656
649
  }
657
650
  &nbsp;
658
- <span class="fstat-no" title="function not covered" > ch</span>eckExpiry(expiry) {
659
- <span class="cstat-no" title="statement not covered" > if (expiry) {</span>
660
- <span class="cstat-no" title="statement not covered" > if (this.shouldShowDialog(expiry)) {</span>
661
- <span class="cstat-no" title="statement not covered" > this.handleOpenModal();</span>
662
- } else <span class="cstat-no" title="statement not covered" >if (this.shouldSignOut(expiry)) {</span>
663
- <span class="cstat-no" title="statement not covered" > this.signOut();</span>
664
- <span class="cstat-no" title="statement not covered" > clearInterval(this.warningInterval);</span>
665
- }
666
- } else {
667
- <span class="cstat-no" title="statement not covered" > clearInterval(this.warningInterval);</span>
668
- }
651
+ return expiry;
652
+ }
653
+ &nbsp;
654
+ <span class="fstat-no" title="function not covered" > ch</span>eckExpiry(expiry) {
655
+ <span class="cstat-no" title="statement not covered" > if (expiry) {</span>
656
+ <span class="cstat-no" title="statement not covered" > if (this.shouldShowDialog(expiry)) {</span>
657
+ <span class="cstat-no" title="statement not covered" > this.handleOpenModal();</span>
658
+ } else <span class="cstat-no" title="statement not covered" >if (this.shouldSignOut(expiry)) {</span>
659
+ <span class="cstat-no" title="statement not covered" > this.signOut();</span>
660
+ <span class="cstat-no" title="statement not covered" > clearInterval(this.warningInterval);</span>
661
+ }
662
+ } else {
663
+ <span class="cstat-no" title="statement not covered" > clearInterval(this.warningInterval);</span>
669
664
  }
665
+ }
670
666
  &nbsp;
671
- onInterval() {
672
- const cookies = cookie.parse(document.cookie);
667
+ onInterval() {
668
+ const cookies = cookie.parse(document.cookie);
673
669
  &nbsp;
674
- if (
675
- cookies.hasOwnProperty('qpp_auth_token') &amp;&amp;
676
- cookies.qpp_auth_token
677
- ) {
678
- const operation = retry.operation({
679
- retries: 5,
680
- factor: 1,
681
- minTimeout: 1000,
682
- maxTimeout: 1000
683
- });
670
+ if (cookies.hasOwnProperty('qpp_auth_token') &amp;&amp; cookies.qpp_auth_token) {
671
+ const operation = retry.operation({
672
+ retries: 5,
673
+ factor: 1,
674
+ minTimeout: 1000,
675
+ maxTimeout: 1000,
676
+ });
684
677
  &nbsp;
685
- operation.attempt(() =&gt; {
686
- fetchTtl(cookies.qpp_auth_token)
687
- .then(this.checkExpiry)
688
- .catch(<span class="fstat-no" title="function not covered" >er</span>ror =&gt; {
689
- <span class="cstat-no" title="statement not covered" > if (operation.retry(error)) {</span>
690
- // try again before giving up
691
- <span class="cstat-no" title="statement not covered" > return;</span>
692
- }
693
- <span class="cstat-no" title="statement not covered" > clearInterval(this.warningInterval);</span>
694
- // sign an inactive user out
695
- <span class="cstat-no" title="statement not covered" > this.forceTimeoutHandle = setTimeout(</span>
696
- this.signOut,
697
- 120 * 1000
698
- );
699
- <span class="cstat-no" title="statement not covered" > this.setState({</span>
700
- showModal: false,
701
- showError: true
702
- });
703
- });
678
+ operation.attempt(() =&gt; {
679
+ fetchTtl(cookies.qpp_auth_token)
680
+ .then(this.checkExpiry)
681
+ .catch(<span class="fstat-no" title="function not covered" >(e</span>rror) =&gt; {
682
+ <span class="cstat-no" title="statement not covered" > if (operation.retry(error)) {</span>
683
+ // try again before giving up
684
+ <span class="cstat-no" title="statement not covered" > return;</span>
685
+ }
686
+ <span class="cstat-no" title="statement not covered" > clearInterval(this.warningInterval);</span>
687
+ // sign an inactive user out
688
+ <span class="cstat-no" title="statement not covered" > this.forceTimeoutHandle = setTimeout(this.signOut, 120 * 1000);</span>
689
+ <span class="cstat-no" title="statement not covered" > this.setState({</span>
690
+ showModal: false,
691
+ showError: true,
704
692
  });
705
- }
693
+ });
694
+ });
706
695
  }
696
+ }
707
697
  &nbsp;
708
- /**
709
- * Checks whether the user is within a specified number of minutes before
710
- * their session token expires. If so, show a warning dialog. If the
711
- * expiration has been reached, sign the user out.
712
- */
713
- startTimer() {
714
- clearInterval(this.warningInterval);
698
+ /**
699
+ * Checks whether the user is within a specified number of minutes before
700
+ * their session token expires. If so, show a warning dialog. If the
701
+ * expiration has been reached, sign the user out.
702
+ */
703
+ startTimer() {
704
+ clearInterval(this.warningInterval);
715
705
  &nbsp;
716
- this.warningInterval = setInterval(this.onInterval, fetchTtlIntervalMs);
717
- }
706
+ this.warningInterval = setInterval(this.onInterval, fetchTtlIntervalMs);
707
+ }
718
708
  &nbsp;
719
- /**
720
- * Returns whether the current time is within the timeout range of expiry.
721
- * @param {date|number} expiry - Expiration date to check against
722
- * @returns {boolean}
723
- */
724
- shouldShowDialog(expiry) {
725
- if (typeof expiry === 'number') {
726
- const minutesLeft = expiry / 60;
709
+ /**
710
+ * Returns whether the current time is within the timeout range of expiry.
711
+ * @param {date|number} expiry - Expiration date to check against
712
+ * @returns {boolean}
713
+ */
714
+ shouldShowDialog(expiry) {
715
+ if (typeof expiry === 'number') {
716
+ const minutesLeft = expiry / 60;
727
717
  &nbsp;
728
- return (
729
- !this.state.showModal &amp;&amp;
730
- minutesLeft &lt;= this.props.warningTimeout
731
- );
732
- } else {
733
- return (
734
- !this.state.showModal &amp;&amp;
735
- this.minutesUntil(expiry) &lt;= this.props.warningTimeout
736
- );
737
- }
718
+ return !this.state.showModal &amp;&amp; minutesLeft &lt;= this.props.warningTimeout;
719
+ } else {
720
+ return (
721
+ !this.state.showModal &amp;&amp;
722
+ this.minutesUntil(expiry) &lt;= this.props.warningTimeout
723
+ );
738
724
  }
725
+ }
739
726
  &nbsp;
740
- /**
741
- * Returns whether the current time has reached the expiration date.
742
- * @param {date|number} expiry - Expiration date to check against
743
- * @returns {boolean}
744
- */
745
- shouldSignOut(expiry) {
746
- if (typeof expiry === 'number') {
747
- return expiry &lt;= 1;
748
- } else {
749
- return this.minutesUntil(expiry) &lt;= 0;
750
- }
727
+ /**
728
+ * Returns whether the current time has reached the expiration date.
729
+ * @param {date|number} expiry - Expiration date to check against
730
+ * @returns {boolean}
731
+ */
732
+ shouldSignOut(expiry) {
733
+ if (typeof expiry === 'number') {
734
+ return expiry &lt;= 1;
735
+ } else {
736
+ return this.minutesUntil(expiry) &lt;= 0;
751
737
  }
738
+ }
752
739
  &nbsp;
753
- /**
754
- * Returns number of minutes until the expiration date.
755
- * @param {date} expiry - Expiration date to check against
756
- * @returns {number}
757
- */
758
- minutesUntil(expiry) {
759
- return (expiry - new Date().getTime()) / 60000;
760
- }
740
+ /**
741
+ * Returns number of minutes until the expiration date.
742
+ * @param {date} expiry - Expiration date to check against
743
+ * @returns {number}
744
+ */
745
+ minutesUntil(expiry) {
746
+ return (expiry - new Date().getTime()) / 60000;
747
+ }
761
748
  &nbsp;
762
- /**
763
- * Sets the modal state to visible.
764
- */
765
- handleOpenModal() {
766
- this.setState({
767
- showModal: true,
768
- showError: false
769
- });
770
- }
749
+ /**
750
+ * Sets the modal state to visible.
751
+ */
752
+ handleOpenModal() {
753
+ this.setState({
754
+ showModal: true,
755
+ showError: false,
756
+ });
757
+ }
771
758
  &nbsp;
772
- /**
773
- * Sets the modal state to hidden.
774
- */
775
- handleCloseModal() {
776
- this.setState({
777
- showModal: false,
778
- showError: false
779
- });
780
- }
759
+ /**
760
+ * Sets the modal state to hidden.
761
+ */
762
+ handleCloseModal() {
763
+ this.setState({
764
+ showModal: false,
765
+ showError: false,
766
+ });
767
+ }
781
768
  &nbsp;
782
- /**
783
- * Handles the user requesting their session be extended.
784
- */
785
- refreshSession() {
786
- RefreshSession({
787
- window,
788
- onSuccess: () =&gt; {
789
- this.startTimer();
790
- }
791
- });
769
+ /**
770
+ * Handles the user requesting their session be extended.
771
+ */
772
+ refreshSession() {
773
+ RefreshSession({
774
+ window,
775
+ onSuccess: () =&gt; {
776
+ this.startTimer();
777
+ },
778
+ });
792
779
  &nbsp;
793
- this.handleCloseModal();
794
- }
780
+ this.handleCloseModal();
781
+ }
795
782
  &nbsp;
796
- /**
797
- * Handles the user requesting their session be ended.
798
- */
799
- signOut() {
800
- <span class="missing-if-branch" title="if path not taken" >I</span>if (this.forceTimeoutHandle) {
801
- <span class="cstat-no" title="statement not covered" > clearTimeout(this.forceTimeoutHandle);</span>
802
- }
803
- LogoutSession(window);
804
- this.handleCloseModal();
783
+ /**
784
+ * Handles the user requesting their session be ended.
785
+ */
786
+ signOut() {
787
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (this.forceTimeoutHandle) {
788
+ <span class="cstat-no" title="statement not covered" > clearTimeout(this.forceTimeoutHandle);</span>
805
789
  }
790
+ LogoutSession(window);
791
+ this.handleCloseModal();
792
+ }
806
793
  &nbsp;
807
- /**
808
- * Renders a ReactModal component.
809
- * See: https://reactcommunity.org/react-modal/
810
- */
811
- render() {
812
- return (
813
- &lt;React.Fragment&gt;
814
- &lt;InfoModal
815
- appElement={this.props.appElement}
816
- isOpen={this.state.showModal}
817
- primaryAction="Keep me signed in"
818
- primaryCallback={this.refreshSession}
819
- secondaryAction="Sign me out now"
820
- secondaryCallback={this.signOut}
821
- onRequestClose={this.handleCloseModal}
822
- closeXAction={this.handleCloseModal}
823
- titleText="You will be signed out within two minutes"
824
- bodyText={`You have been inactive for thirty minutes. For
825
- your security, we will sign you out automatically.`}
826
- /&gt;
827
- &lt;InfoModal
828
- appElement={this.props.appElement}
829
- isOpen={this.state.showError}
830
- primaryAction="Sign out"
831
- primaryCallback={this.signOut}
832
- onRequestClose={this.signOut}
833
- closeXAction={this.signOut}
834
- titleText="Technical Difficulties"
835
- bodyText={`We're experiencing technical difficulties. Please log in again
836
- to continue. For your security, we will sign you out automatically within
837
- two minutes.`}
838
- /&gt;
839
- &lt;/React.Fragment&gt;
840
- );
841
- }
794
+ render() {
795
+ return (
796
+ &lt;React.Fragment&gt;
797
+ &lt;Modal
798
+ useDesignSystem
799
+ title="You will be signed out within two minutes"
800
+ isOpen={this.state.showModal}
801
+ primary={{
802
+ title: 'Keep me signed in',
803
+ onClick: this.refreshSession,
804
+ }}
805
+ secondary={{
806
+ title: 'Sign me out now',
807
+ onClick: this.signOut,
808
+ }}
809
+ onRequestClose={this.handleCloseModal}
810
+ &gt;
811
+ &lt;p&gt;
812
+ You have been inactive for thirty minutes. For your security, we
813
+ will sign you out automatically.
814
+ &lt;/p&gt;
815
+ &lt;/Modal&gt;
816
+ &nbsp;
817
+ &lt;Modal
818
+ useDesignSystem
819
+ title="Technical Difficulties"
820
+ isOpen={this.state.showError}
821
+ primary={{
822
+ title: 'Sign Out',
823
+ onClick: this.signOut,
824
+ }}
825
+ onRequestClose={this.signOut}
826
+ &gt;
827
+ &lt;p&gt;
828
+ We’re experiencing technical difficulties. Please log in again to
829
+ continue. For your security, we will sign you out automatically
830
+ within two minutes.
831
+ &lt;/p&gt;
832
+ &lt;/Modal&gt;
833
+ &lt;/React.Fragment&gt;
834
+ );
835
+ }
842
836
  }
843
837
  &nbsp;
844
838
  SessionDialogUI.propTypes = {
845
- showImmediate: PropTypes.bool,
846
- warningTimeout: PropTypes.number,
847
- appElement: PropTypes.string
839
+ showImmediate: PropTypes.bool,
840
+ warningTimeout: PropTypes.number,
841
+ appElement: PropTypes.string,
848
842
  };
849
843
  &nbsp;
850
844
  SessionDialogUI.defaultProps = {
851
- showImmediate: false,
852
- warningTimeout: 2,
853
- appElement: undefined
845
+ showImmediate: false,
846
+ warningTimeout: 2,
847
+ appElement: undefined,
854
848
  };
855
849
  &nbsp;</pre></td></tr></table></pre>
856
850
 
@@ -858,10 +852,9 @@ SessionDialogUI.defaultProps = {
858
852
  </div><!-- /wrapper -->
859
853
  <div class='footer quiet pad2 space-top1 center small'>
860
854
  Code coverage generated by
861
- <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
862
- at Tue Aug 04 2020 16:59:07 GMT-0700 (Pacific Daylight Time)
855
+ <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
856
+ at Thu Feb 02 2023 11:23:00 GMT-0800 (Pacific Standard Time)
863
857
  </div>
864
- </div>
865
858
  <script src="../prettify.js"></script>
866
859
  <script>
867
860
  window.onload = function () {