supernav-test 2.2.17 → 2.2.18

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 (220) hide show
  1. package/dist/App.css +38 -0
  2. package/dist/App.test.js +8 -6
  3. package/dist/LsacContainer.js +25 -10
  4. package/dist/components/lsac-supernavbar/AuthWrapper.js +92 -44
  5. package/dist/components/lsac-supernavbar/LsacSidebar.js +40 -27
  6. package/dist/components/lsac-supernavbar/Store.js +20 -10
  7. package/dist/components/lsac-supernavbar/actions/AuthActions.js +23 -16
  8. package/dist/components/lsac-supernavbar/actions/SidebarActions.js +75 -61
  9. package/dist/components/lsac-supernavbar/components/Sidebar.js +308 -184
  10. package/dist/components/lsac-supernavbar/components/SidebarForm.js +18 -5
  11. package/dist/components/lsac-supernavbar/components/SidebarMainLink.js +118 -54
  12. package/dist/components/lsac-supernavbar/components/SidebarOption.js +19 -5
  13. package/dist/components/lsac-supernavbar/components/SidebarSubMenu.js +147 -61
  14. package/dist/components/lsac-supernavbar/components/SidebarTab.js +65 -46
  15. package/dist/components/lsac-supernavbar/components/Topnav.js +160 -63
  16. package/dist/components/lsac-supernavbar/components/sidebar_submenus/CategorizedSubmenu.js +100 -53
  17. package/dist/components/lsac-supernavbar/components/sidebar_submenus/Marketplace.js +16 -4
  18. package/dist/components/lsac-supernavbar/constants/SidebarConstants.js +13 -8
  19. package/dist/components/lsac-supernavbar/constants/UtilityConstants.js +24 -13
  20. package/dist/components/lsac-supernavbar/interfaces/Models.js +13 -8
  21. package/dist/components/lsac-supernavbar/interfaces/Redux.js +4 -1
  22. package/dist/components/lsac-supernavbar/reducers/AuthReducer.js +37 -15
  23. package/dist/components/lsac-supernavbar/reducers/RootReducer.js +17 -8
  24. package/dist/components/lsac-supernavbar/reducers/SidebarReducer.js +92 -45
  25. package/dist/components/lsac-supernavbar/resources/icomoon-library.json +1 -1
  26. package/dist/components/lsac-supernavbar/static/images/close-hamburger-icon.svg +6 -0
  27. package/dist/components/lsac-supernavbar/static/images/hamburger-icon.svg +7 -0
  28. package/dist/components/lsac-supernavbar/static/images/icon-user.svg +7 -0
  29. package/dist/components/lsac-supernavbar/static/images/saama_logo.png +0 -0
  30. package/dist/components/lsac-supernavbar/static/images/saama_logo.svg +26 -0
  31. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/caret_down.svg +6 -0
  32. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/caret_left.svg +6 -0
  33. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/caret_right.svg +6 -0
  34. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/caret_up.svg +6 -0
  35. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/glyph1_comprehend.svg +6 -0
  36. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/management_icon.svg +12 -0
  37. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/marketplace_icon.svg +9 -0
  38. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/my_apps.svg +8 -0
  39. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/rbqm-triangle.svg +31 -0
  40. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/rightIcon.svg +8 -0
  41. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/space_comprehend.svg +6 -0
  42. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/triangle-exclamation.svg +9 -0
  43. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E$A32_comprehend.svg +6 -0
  44. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E$A36_comprehend.svg +6 -0
  45. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E0$A1_comprehend.svg +6 -0
  46. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E0$E$B_comprehend.svg +6 -0
  47. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E0$F0_comprehend.svg +6 -0
  48. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E00$B_comprehend.svg +7 -0
  49. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E00$D_comprehend.svg +6 -0
  50. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E002_comprehend.svg +6 -0
  51. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E070_comprehend.svg +8 -0
  52. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E086_comprehend.svg +6 -0
  53. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E092_comprehend.svg +7 -0
  54. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E1$B$A_comprehend.svg +8 -0
  55. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E1$B$F_comprehend.svg +6 -0
  56. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E1$B5_comprehend.svg +6 -0
  57. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E1$C8_comprehend.svg +6 -0
  58. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E1$D$C_comprehend.svg +8 -0
  59. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E1$D$F_comprehend.svg +8 -0
  60. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E1$D5_comprehend.svg +7 -0
  61. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E1$D6_comprehend.svg +7 -0
  62. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E1$D9_comprehend.svg +7 -0
  63. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E1$F$E_comprehend.svg +7 -0
  64. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E1$F7_comprehend.svg +7 -0
  65. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E10$C_comprehend.svg +7 -0
  66. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E10$D_comprehend.svg +7 -0
  67. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E10$E_comprehend.svg +7 -0
  68. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E10$F_comprehend.svg +7 -0
  69. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E101_comprehend.svg +8 -0
  70. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E110_comprehend.svg +7 -0
  71. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E115_comprehend.svg +8 -0
  72. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E123_comprehend.svg +6 -0
  73. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E138_comprehend.svg +8 -0
  74. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E14$B_comprehend.svg +6 -0
  75. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E150_comprehend.svg +7 -0
  76. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E185_comprehend.svg +7 -0
  77. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E186_comprehend.svg +8 -0
  78. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E187_comprehend.svg +8 -0
  79. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E2$A7_comprehend.svg +8 -0
  80. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E2$A9_comprehend.svg +6 -0
  81. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E2$B7_comprehend.svg +7 -0
  82. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E2$C$F_comprehend.svg +8 -0
  83. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E2$D$C_comprehend.svg +7 -0
  84. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E2$D$D_comprehend.svg +8 -0
  85. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E2$F$F_comprehend.svg +6 -0
  86. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E20$B_comprehend.svg +10 -0
  87. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E201_comprehend.svg +6 -0
  88. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E204_comprehend.svg +7 -0
  89. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E23$A_comprehend.svg +9 -0
  90. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E250_comprehend.svg +7 -0
  91. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E279_comprehend.svg +9 -0
  92. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E28$E_comprehend.svg +6 -0
  93. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E29$C_comprehend.svg +6 -0
  94. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E3$A7_comprehend.svg +7 -0
  95. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E3$A8_comprehend.svg +7 -0
  96. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E3$B3_comprehend.svg +6 -0
  97. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E3$D3_comprehend.svg +7 -0
  98. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E3$D4_comprehend.svg +7 -0
  99. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E3$D7_comprehend.svg +7 -0
  100. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E301_comprehend.svg +6 -0
  101. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E35$A_comprehend.svg +9 -0
  102. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E35$E_comprehend.svg +8 -0
  103. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E36$E_comprehend.svg +7 -0
  104. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E362_comprehend.svg +8 -0
  105. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E37$A_comprehend.svg +6 -0
  106. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E370_comprehend.svg +6 -0
  107. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E4$E2_comprehend.svg +11 -0
  108. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E4$E4_comprehend.svg +7 -0
  109. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E4$E5_comprehend.svg +7 -0
  110. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E4$E7_comprehend.svg +8 -0
  111. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E418_comprehend.svg +6 -0
  112. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E42$E_comprehend.svg +6 -0
  113. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E42$F_comprehend.svg +6 -0
  114. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E43$A_comprehend.svg +7 -0
  115. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E43$B_comprehend.svg +6 -0
  116. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E430_comprehend.svg +6 -0
  117. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E431_comprehend.svg +6 -0
  118. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E445_comprehend.svg +6 -0
  119. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E465_comprehend.svg +7 -0
  120. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E475_comprehend.svg +6 -0
  121. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E481_comprehend.svg +6 -0
  122. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E60$A_comprehend.svg +6 -0
  123. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E60$B_comprehend.svg +8 -0
  124. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E60$C_comprehend.svg +6 -0
  125. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E60$D_comprehend.svg +6 -0
  126. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E60$E_comprehend.svg +6 -0
  127. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E60$F_comprehend.svg +9 -0
  128. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E600_comprehend.svg +6 -0
  129. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E601_comprehend.svg +6 -0
  130. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E602_comprehend.svg +6 -0
  131. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E603_comprehend.svg +6 -0
  132. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E604_comprehend.svg +6 -0
  133. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E605_comprehend.svg +6 -0
  134. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E606_comprehend.svg +6 -0
  135. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E607_comprehend.svg +6 -0
  136. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E608_comprehend.svg +6 -0
  137. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E609_comprehend.svg +6 -0
  138. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E61$A_comprehend.svg +8 -0
  139. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E61$B_comprehend.svg +6 -0
  140. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E61$C_comprehend.svg +9 -0
  141. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E61$F_comprehend.svg +8 -0
  142. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E610_comprehend.svg +6 -0
  143. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E611_comprehend.svg +8 -0
  144. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E612_comprehend.svg +7 -0
  145. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E613_comprehend.svg +12 -0
  146. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E614_comprehend.svg +6 -0
  147. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E615_comprehend.svg +8 -0
  148. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E616_comprehend.svg +8 -0
  149. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E617_comprehend.svg +8 -0
  150. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E618_comprehend.svg +7 -0
  151. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E619_comprehend.svg +6 -0
  152. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E620_comprehend.svg +6 -0
  153. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E621_comprehend.svg +6 -0
  154. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E622_comprehend.svg +6 -0
  155. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E623_comprehend.svg +6 -0
  156. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E624_comprehend.svg +6 -0
  157. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E625_comprehend.svg +6 -0
  158. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E626_comprehend.svg +6 -0
  159. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E90$A_comprehend.svg +12 -0
  160. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E90$B_comprehend.svg +6 -0
  161. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E90$C_comprehend.svg +9 -0
  162. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E90$D_comprehend.svg +14 -0
  163. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E90$E_comprehend.svg +10 -0
  164. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E90$F_comprehend.svg +9 -0
  165. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E900_comprehend.svg +7 -0
  166. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E901_comprehend.svg +6 -0
  167. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E902_comprehend.svg +6 -0
  168. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E903_comprehend.svg +6 -0
  169. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E904_comprehend.svg +6 -0
  170. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E905_comprehend.svg +12 -0
  171. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E907_comprehend.svg +7 -0
  172. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E908_comprehend.svg +16 -0
  173. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E909_comprehend.svg +7 -0
  174. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E91$A_comprehend.svg +7 -0
  175. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E91$C_comprehend.svg +9 -0
  176. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E91$E_comprehend.svg +12 -0
  177. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E91$F_comprehend.svg +16 -0
  178. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E910_comprehend.svg +6 -0
  179. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E911_comprehend.svg +12 -0
  180. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E912_comprehend.svg +11 -0
  181. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E913_comprehend.svg +8 -0
  182. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E914_comprehend.svg +11 -0
  183. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E915_comprehend.svg +8 -0
  184. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E917_comprehend.svg +34 -0
  185. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E918_comprehend.svg +7 -0
  186. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E919_comprehend.svg +6 -0
  187. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E920_comprehend.svg +11 -0
  188. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E921_comprehend.svg +12 -0
  189. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni$E93$D_comprehend.svg +13 -0
  190. package/dist/components/lsac-supernavbar/static/images/sidebar-icons/uni0001_comprehend.svg +6 -0
  191. package/dist/components/lsac-supernavbar/stylesheets/LsacSidebar.css +73 -0
  192. package/dist/components/lsac-supernavbar/stylesheets/font-face.scss +12 -0
  193. package/dist/components/lsac-supernavbar/stylesheets/font-sizer.scss +4 -0
  194. package/dist/components/lsac-supernavbar/stylesheets/fontIcons.css +540 -0
  195. package/dist/components/lsac-supernavbar/stylesheets/fonts/ProximaNovaReg.eot +0 -0
  196. package/dist/components/lsac-supernavbar/stylesheets/fonts/ProximaNovaReg.svg +3521 -0
  197. package/dist/components/lsac-supernavbar/stylesheets/fonts/ProximaNovaReg.ttf +0 -0
  198. package/dist/components/lsac-supernavbar/stylesheets/fonts/ProximaNovaReg.woff +0 -0
  199. package/dist/components/lsac-supernavbar/stylesheets/fonts/ProximaNovaReg.woff2 +0 -0
  200. package/dist/components/lsac-supernavbar/stylesheets/fonts/comprehend.eot +0 -0
  201. package/dist/components/lsac-supernavbar/stylesheets/fonts/comprehend.svg +190 -0
  202. package/dist/components/lsac-supernavbar/stylesheets/fonts/comprehend.ttf +0 -0
  203. package/dist/components/lsac-supernavbar/stylesheets/fonts/comprehend.woff +0 -0
  204. package/dist/components/lsac-supernavbar/stylesheets/form.scss +16 -0
  205. package/dist/components/lsac-supernavbar/stylesheets/sidebar-main-link.scss +72 -0
  206. package/dist/components/lsac-supernavbar/stylesheets/sidebar.scss +222 -0
  207. package/dist/components/lsac-supernavbar/stylesheets/study-filter.scss +358 -0
  208. package/dist/components/lsac-supernavbar/stylesheets/topnav.scss +371 -0
  209. package/dist/components/lsac-supernavbar/test/App.test.js +25 -19
  210. package/dist/components/lsac-supernavbar/util/SubmenuUtil.js +200 -104
  211. package/dist/components/lsac-supernavbar/util/Util.js +49 -22
  212. package/dist/index.css +13 -0
  213. package/dist/index.js +17 -12
  214. package/dist/logo.svg +1 -0
  215. package/dist/react-app-env.d.js +2 -0
  216. package/dist/reportWebVitals.js +31 -30
  217. package/dist/setupTests.js +2 -6
  218. package/package.json +3 -2
  219. package/dist/caf68d0a64d31f733320266312e3a2ca.svg +0 -1
  220. package/dist/index.html +0 -1
@@ -1,193 +1,317 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
13
7
  });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- const react_1 = require("react");
26
- const jsx_runtime_1 = require("react/jsx-runtime");
27
- const react_2 = __importStar(require("react"));
28
- const react_redux_1 = require("react-redux");
29
- const classnames_1 = __importDefault(require("classnames"));
30
- const SidebarForm_1 = __importDefault(require("./SidebarForm"));
31
- const SidebarActions_1 = require("../actions/SidebarActions");
32
- const SidebarMainLink_1 = __importDefault(require("./SidebarMainLink"));
33
- const SidebarSubMenu_1 = __importDefault(require("./SidebarSubMenu"));
34
- const SidebarConstants_1 = require("../constants/SidebarConstants");
35
- const UtilityConstants_1 = require("../constants/UtilityConstants");
36
- const Models_1 = require("../interfaces/Models");
37
- // icon imports
38
- const icomoon_library_json_1 = __importDefault(require("../resources/icomoon-library.json"));
39
- const icomoon_react_1 = __importDefault(require("icomoon-react"));
40
- const styles = require('../stylesheets/sidebar.scss');
8
+ exports.default = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _reactRedux = require("react-redux");
13
+
14
+ var _classnames = _interopRequireDefault(require("classnames"));
15
+
16
+ var _SidebarForm = _interopRequireDefault(require("./SidebarForm"));
17
+
18
+ var _SidebarActions = require("../actions/SidebarActions");
19
+
20
+ var _SidebarMainLink = _interopRequireDefault(require("./SidebarMainLink"));
21
+
22
+ var _SidebarSubMenu = _interopRequireDefault(require("./SidebarSubMenu"));
23
+
24
+ var _SidebarConstants = require("../constants/SidebarConstants");
25
+
26
+ var _UtilityConstants = require("../constants/UtilityConstants");
27
+
28
+ var _Models = require("../interfaces/Models");
29
+
30
+ var _icomoonLibrary = _interopRequireDefault(require("../resources/icomoon-library.json"));
31
+
32
+ var _icomoonReact = _interopRequireDefault(require("icomoon-react"));
33
+
34
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
+
36
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
+
38
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
+
40
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
41
+
42
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
43
+
44
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
45
+
46
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
47
+
48
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
49
+
50
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
51
+
52
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
+
54
+ var styles = require('../stylesheets/sidebar.scss');
55
+
41
56
  // TODO - get proper icons
42
- const SidebarMainLinks = [
43
- {
44
- id: SidebarConstants_1.SidebarMenuTypes.Home,
45
- label: 'My Home',
46
- icon: ((0, jsx_runtime_1.jsx)(icomoon_react_1.default, { iconSet: icomoon_library_json_1.default, icon: "home" }, void 0)),
47
- onClick: () => console.log('My Home'),
48
- subMenu: false,
49
- },
50
- {
51
- id: SidebarConstants_1.SidebarMenuTypes.MyApps,
52
- label: 'My Apps',
53
- icon: ((0, jsx_runtime_1.jsx)(icomoon_react_1.default, { iconSet: icomoon_library_json_1.default, icon: "my-apps" }, void 0)),
54
- onClick: () => console.log('My Apps'),
55
- subMenu: false,
56
- },
57
- {
58
- id: SidebarConstants_1.SidebarMenuTypes.Management,
59
- label: 'Administration',
60
- icon: ((0, jsx_runtime_1.jsx)(icomoon_react_1.default, { iconSet: icomoon_library_json_1.default, icon: "marketplace-administration" }, void 0)),
61
- onClick: () => console.log('Management'),
62
- subMenu: false,
63
- },
64
- {
65
- id: SidebarConstants_1.SidebarMenuTypes.Marketplace,
66
- label: 'Marketplace',
67
- icon: ((0, jsx_runtime_1.jsx)(icomoon_react_1.default, { iconSet: icomoon_library_json_1.default, icon: "marketplace" }, void 0)),
68
- onClick: () => console.log('Marketplace'),
69
- subMenu: false,
70
- },
71
- {
72
- id: SidebarConstants_1.SidebarMenuTypes.Collaboration,
73
- label: 'Collaboration',
74
- icon: ((0, jsx_runtime_1.jsx)(icomoon_react_1.default, { iconSet: icomoon_library_json_1.default, icon: "collboration" }, void 0)),
75
- onClick: () => console.log('Collaboration'),
76
- subMenu: false,
77
- },
78
- {
79
- id: SidebarConstants_1.SidebarMenuTypes.Engagement,
80
- label: 'Engagement',
81
- icon: ((0, jsx_runtime_1.jsx)(icomoon_react_1.default, { iconSet: icomoon_library_json_1.default, icon: "engagement" }, void 0)),
82
- onClick: () => console.log('Engagement'),
83
- subMenu: false,
84
- }
85
- ];
57
+ var SidebarMainLinks = [{
58
+ id: _SidebarConstants.SidebarMenuTypes.Home,
59
+ label: 'My Home',
60
+ icon: /*#__PURE__*/_react.default.createElement(_icomoonReact.default, {
61
+ iconSet: _icomoonLibrary.default,
62
+ icon: "home"
63
+ }),
64
+ onClick: function onClick() {
65
+ return console.log('My Home');
66
+ },
67
+ subMenu: false
68
+ }, {
69
+ id: _SidebarConstants.SidebarMenuTypes.MyApps,
70
+ label: 'My Apps',
71
+ icon: /*#__PURE__*/_react.default.createElement(_icomoonReact.default, {
72
+ iconSet: _icomoonLibrary.default,
73
+ icon: "my-apps"
74
+ }),
75
+ onClick: function onClick() {
76
+ return console.log('My Apps');
77
+ },
78
+ subMenu: false
79
+ }, {
80
+ id: _SidebarConstants.SidebarMenuTypes.Management,
81
+ label: 'Administration',
82
+ icon: /*#__PURE__*/_react.default.createElement(_icomoonReact.default, {
83
+ iconSet: _icomoonLibrary.default,
84
+ icon: "marketplace-administration"
85
+ }),
86
+ onClick: function onClick() {
87
+ return console.log('Management');
88
+ },
89
+ subMenu: false
90
+ }, {
91
+ id: _SidebarConstants.SidebarMenuTypes.Marketplace,
92
+ label: 'Marketplace',
93
+ icon: /*#__PURE__*/_react.default.createElement(_icomoonReact.default, {
94
+ iconSet: _icomoonLibrary.default,
95
+ icon: "marketplace"
96
+ }),
97
+ onClick: function onClick() {
98
+ return console.log('Marketplace');
99
+ },
100
+ subMenu: false
101
+ }, {
102
+ id: _SidebarConstants.SidebarMenuTypes.Collaboration,
103
+ label: 'Collaboration',
104
+ icon: /*#__PURE__*/_react.default.createElement(_icomoonReact.default, {
105
+ iconSet: _icomoonLibrary.default,
106
+ icon: "collboration"
107
+ }),
108
+ onClick: function onClick() {
109
+ return console.log('Collaboration');
110
+ },
111
+ subMenu: false
112
+ }, {
113
+ id: _SidebarConstants.SidebarMenuTypes.Engagement,
114
+ label: 'Engagement',
115
+ icon: /*#__PURE__*/_react.default.createElement(_icomoonReact.default, {
116
+ iconSet: _icomoonLibrary.default,
117
+ icon: "engagement"
118
+ }),
119
+ onClick: function onClick() {
120
+ return console.log('Engagement');
121
+ },
122
+ subMenu: false
123
+ }];
124
+
86
125
  function Sidebar(props) {
87
- const { appContext, topNavHeight, sidebarDisplayMode, sidebarOptions } = props;
88
- const reduxDispatch = (0, react_redux_1.useDispatch)();
89
- const expanded = (0, react_redux_1.useSelector)((state) => sidebarDisplayMode === UtilityConstants_1.SidebarDisplayModes.ALL ? true : state.sidebar.expanded);
90
- const isMinimal = (0, react_redux_1.useSelector)((state) => state.sidebar.isMinimal);
91
- const topNavToggleref = (0, react_redux_1.useSelector)((state) => state.sidebar.topnavToggleref);
92
- const selectedOption = mapContextToAppsId();
93
- function mapContextToAppsId() {
94
- let selectedSidebarOption = SidebarConstants_1.SidebarMenuTypes.MyApps;
95
- if (appContext === 'management') {
96
- selectedSidebarOption = SidebarConstants_1.SidebarMenuTypes.Management;
97
- }
98
- else if (appContext === 'marketplace') {
99
- selectedSidebarOption = SidebarConstants_1.SidebarMenuTypes.Marketplace;
100
- }
101
- else if (appContext === 'collaboration') {
102
- selectedSidebarOption = SidebarConstants_1.SidebarMenuTypes.Collaboration;
103
- }
104
- else if (appContext === 'home') {
105
- selectedSidebarOption = SidebarConstants_1.SidebarMenuTypes.Home;
126
+ var appContext = props.appContext,
127
+ topNavHeight = props.topNavHeight,
128
+ sidebarDisplayMode = props.sidebarDisplayMode,
129
+ sidebarOptions = props.sidebarOptions;
130
+ var reduxDispatch = (0, _reactRedux.useDispatch)();
131
+ var expanded = (0, _reactRedux.useSelector)(function (state) {
132
+ return sidebarDisplayMode === _UtilityConstants.SidebarDisplayModes.ALL ? true : state.sidebar.expanded;
133
+ });
134
+ var isMinimal = (0, _reactRedux.useSelector)(function (state) {
135
+ return state.sidebar.isMinimal;
136
+ });
137
+ var topNavToggleref = (0, _reactRedux.useSelector)(function (state) {
138
+ return state.sidebar.topnavToggleref;
139
+ });
140
+ var selectedOption = mapContextToAppsId();
141
+
142
+ function mapContextToAppsId() {
143
+ var selectedSidebarOption = _SidebarConstants.SidebarMenuTypes.MyApps;
144
+
145
+ if (appContext === 'management') {
146
+ selectedSidebarOption = _SidebarConstants.SidebarMenuTypes.Management;
147
+ } else if (appContext === 'marketplace') {
148
+ selectedSidebarOption = _SidebarConstants.SidebarMenuTypes.Marketplace;
149
+ } else if (appContext === 'collaboration') {
150
+ selectedSidebarOption = _SidebarConstants.SidebarMenuTypes.Collaboration;
151
+ } else if (appContext === 'home') {
152
+ selectedSidebarOption = _SidebarConstants.SidebarMenuTypes.Home;
153
+ }
154
+
155
+ return selectedSidebarOption;
156
+ } // When component is loaded fetch the userInfo's available applications
157
+
158
+
159
+ (0, _react.useEffect)(function () {
160
+ var selectedSidebarOption = mapContextToAppsId();
161
+ reduxDispatch((0, _SidebarActions.SetMinimalSidebar)(sidebarDisplayMode === _UtilityConstants.SidebarDisplayModes.MINIMAL));
162
+ reduxDispatch((0, _SidebarActions.SetSelectedSidebarOption)(selectedSidebarOption));
163
+ }, [reduxDispatch, appContext]); //when sidebar is loaded attach listener to detect clicks external to it
164
+
165
+ function useExternalClickListener(ref) {
166
+ (0, _react.useEffect)(function () {
167
+ function handleClickOutside(event) {
168
+ var eventPath = event.composedPath();
169
+
170
+ if (ref.current && !(eventPath.includes(ref.current) || eventPath.includes(topNavToggleref.current)) && expanded === true) {
171
+ reduxDispatch((0, _SidebarActions.SetExpandSidebar)(false));
106
172
  }
107
- return selectedSidebarOption;
173
+ } // Bind the event listener
174
+
175
+
176
+ document.addEventListener("mousedown", handleClickOutside);
177
+ return function () {
178
+ // Unbind the event listener on clean up
179
+ document.removeEventListener("mousedown", handleClickOutside);
180
+ };
181
+ }, [ref, topNavToggleref, expanded]);
182
+ }
183
+
184
+ var _useState = (0, _react.useState)(false),
185
+ _useState2 = _slicedToArray(_useState, 2),
186
+ showForm = _useState2[0],
187
+ setShowForm = _useState2[1];
188
+
189
+ var formDisplay = showForm ? /*#__PURE__*/_react.default.createElement(_SidebarForm.default, null) : '';
190
+
191
+ function CheckManagementAndMarketplaceAccess() {
192
+ var apps = (0, _reactRedux.useSelector)(function (state) {
193
+ var _state$auth$userInfo;
194
+
195
+ return ((_state$auth$userInfo = state.auth.userInfo) === null || _state$auth$userInfo === void 0 ? void 0 : _state$auth$userInfo.applications) || new Array();
196
+ });
197
+ var appCategories = apps.filter(function (e) {
198
+ return e.attributes !== undefined;
199
+ }).filter(function (e) {
200
+ return e.attributes['category'] !== undefined;
201
+ }).filter(function (d) {
202
+ return Object.keys(d.attributes).length > 0;
203
+ }).map(function (app) {
204
+ return app.attributes['category'].toLowerCase();
205
+ });
206
+ var appCategoriesForSubApps = apps.filter(function (e) {
207
+ return e.attributes !== undefined;
208
+ }).filter(function (e) {
209
+ return e.attributes['category'] !== undefined;
210
+ }).map(function (app) {
211
+ return app.attributes['category'].toLowerCase();
212
+ });
213
+ var appCategorySubAppsCount = appCategoriesForSubApps.reduce(function (object, element) {
214
+ object[element] = ++object[element] || 1;
215
+ return object;
216
+ }, {});
217
+
218
+ if (appCategorySubAppsCount['my_apps'] >= 1) {
219
+ var index = SidebarMainLinks.findIndex(function (e) {
220
+ return e.id === 'my_apps';
221
+ });
222
+ SidebarMainLinks[index].subMenu = true;
108
223
  }
109
- // When component is loaded fetch the userInfo's available applications
110
- (0, react_2.useEffect)(() => {
111
- let selectedSidebarOption = mapContextToAppsId();
112
- reduxDispatch((0, SidebarActions_1.SetMinimalSidebar)(sidebarDisplayMode === UtilityConstants_1.SidebarDisplayModes.MINIMAL));
113
- reduxDispatch((0, SidebarActions_1.SetSelectedSidebarOption)(selectedSidebarOption));
114
- }, [reduxDispatch, appContext]);
115
- //when sidebar is loaded attach listener to detect clicks external to it
116
- function useExternalClickListener(ref) {
117
- (0, react_2.useEffect)(() => {
118
- function handleClickOutside(event) {
119
- let eventPath = event.composedPath();
120
- if (ref.current && !(eventPath.includes(ref.current) || eventPath.includes(topNavToggleref.current)) && expanded === true) {
121
- reduxDispatch((0, SidebarActions_1.SetExpandSidebar)(false));
122
- }
123
- }
124
- // Bind the event listener
125
- document.addEventListener("mousedown", handleClickOutside);
126
- return () => {
127
- // Unbind the event listener on clean up
128
- document.removeEventListener("mousedown", handleClickOutside);
129
- };
130
- }, [ref, topNavToggleref, expanded]);
224
+
225
+ if (appCategorySubAppsCount['management'] >= 1) {
226
+ var _index = SidebarMainLinks.findIndex(function (e) {
227
+ return e.id === 'management';
228
+ });
229
+
230
+ SidebarMainLinks[_index].subMenu = true;
131
231
  }
132
- const [showForm, setShowForm] = (0, react_2.useState)(false);
133
- const formDisplay = showForm ? (0, jsx_runtime_1.jsx)(SidebarForm_1.default, {}, void 0) : '';
134
- function CheckManagementAndMarketplaceAccess() {
135
- const apps = (0, react_redux_1.useSelector)((state) => { var _a; return ((_a = state.auth.userInfo) === null || _a === void 0 ? void 0 : _a.applications) || new Array(); });
136
- const appCategories = apps.filter((e) => e.attributes !== undefined)
137
- .filter((e) => e.attributes['category'] !== undefined)
138
- .filter((d) => Object.keys(d.attributes).length > 0)
139
- .map((app) => app.attributes['category'].toLowerCase());
140
- const appCategoriesForSubApps = apps.filter((e) => e.attributes !== undefined)
141
- .filter((e) => e.attributes['category'] !== undefined)
142
- .map((app) => app.attributes['category'].toLowerCase());
143
- let appCategorySubAppsCount = appCategoriesForSubApps.reduce((object, element) => {
144
- object[element] = ++object[element] || 1;
145
- return object;
146
- }, {});
147
- if (appCategorySubAppsCount['my_apps'] >= 1) {
148
- const index = SidebarMainLinks.findIndex((e) => e.id === 'my_apps');
149
- SidebarMainLinks[index].subMenu = true;
150
- }
151
- if (appCategorySubAppsCount['management'] >= 1) {
152
- const index = SidebarMainLinks.findIndex((e) => e.id === 'management');
153
- SidebarMainLinks[index].subMenu = true;
154
- }
155
- const isCollaboration = sidebarOptions.filter(option => option.category === Models_1.SidebarCategory.COLLABORATION);
156
- if (appCategorySubAppsCount['engagement'] >= 1) {
157
- const index = SidebarMainLinks.findIndex((e) => e.id === 'engagement');
158
- SidebarMainLinks[index].subMenu = true;
159
- }
160
- if (appCategorySubAppsCount['collaboration'] >= 1 || isCollaboration.length) {
161
- const index = SidebarMainLinks.findIndex((e) => e.id === 'collaboration');
162
- SidebarMainLinks[index].subMenu = true;
163
- }
164
- const hasManagementAccess = appCategories.includes(Models_1.SidebarCategory.MANAGEMENT);
165
- const hasMarketplaceAccess = appCategories.includes(Models_1.SidebarCategory.MARKETPLACE);
166
- const hasHomeAccess = appCategories.includes(Models_1.SidebarCategory.MY_HOME);
167
- const hasMyAppAccess = appCategories.includes(Models_1.SidebarCategory.MY_APPS);
168
- const hasCollaborationAccess = appCategories.includes(Models_1.SidebarCategory.COLLABORATION) || sidebarOptions.map(option => option.category).includes(Models_1.SidebarCategory.COLLABORATION);
169
- return SidebarMainLinks.filter(mainLinkProps => (mainLinkProps.id.toLowerCase() !== SidebarConstants_1.SidebarMenuTypes.Marketplace || hasMarketplaceAccess))
170
- .filter(mainLinkProps => (mainLinkProps.id.toLowerCase() !== SidebarConstants_1.SidebarMenuTypes.Management || hasManagementAccess))
171
- .filter(mainLinkProps => (mainLinkProps.id.toLowerCase() !== SidebarConstants_1.SidebarMenuTypes.Home || hasHomeAccess))
172
- .filter(mainLinkProps => (mainLinkProps.id.toLowerCase() !== SidebarConstants_1.SidebarMenuTypes.MyApps || hasMyAppAccess))
173
- .filter(mainLinkProps => (mainLinkProps.id.toLowerCase() !== SidebarConstants_1.SidebarMenuTypes.Collaboration || hasCollaborationAccess))
174
- .map((mainLinkProps, index) => (0, react_1.createElement)(SidebarMainLink_1.default, Object.assign({ appContext: appContext }, mainLinkProps, { key: `lsac-sidebar-main-link-${index}`, selectedOption: selectedOption })));
232
+
233
+ var isCollaboration = sidebarOptions.filter(function (option) {
234
+ return option.category === _Models.SidebarCategory.COLLABORATION;
235
+ });
236
+
237
+ if (appCategorySubAppsCount['engagement'] >= 1) {
238
+ var _index2 = SidebarMainLinks.findIndex(function (e) {
239
+ return e.id === 'engagement';
240
+ });
241
+
242
+ SidebarMainLinks[_index2].subMenu = true;
175
243
  }
176
- const mainLinks = CheckManagementAndMarketplaceAccess();
177
- const topNavHeightBuffer = {
178
- top: topNavHeight
179
- };
180
- const sidebarRef = (0, react_2.useRef)(null);
181
- useExternalClickListener(sidebarRef);
182
- const handleMouseLeave = () => {
183
- if (!isMinimal) {
184
- reduxDispatch((0, SidebarActions_1.SetExpandSidebar)(false));
185
- reduxDispatch((0, SidebarActions_1.SetMinimalSidebar)(true));
186
- }
187
- reduxDispatch((0, SidebarActions_1.SetSelectedSidebarOption)(selectedOption));
188
- reduxDispatch((0, SidebarActions_1.SetShowExpandedApps)(false));
189
- };
190
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: 'lsac-sidebar-container' }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)('lsac-sidebar', { expanded, isMinimal }), style: topNavHeightBuffer, ref: sidebarRef, onMouseLeave: handleMouseLeave }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'icon-strip' }, { children: mainLinks }), void 0), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: 'submenu' }, { children: (0, jsx_runtime_1.jsx)(SidebarSubMenu_1.default, {}, void 0) }), void 0)] }), void 0), formDisplay] }), void 0));
244
+
245
+ if (appCategorySubAppsCount['collaboration'] >= 1 || isCollaboration.length) {
246
+ var _index3 = SidebarMainLinks.findIndex(function (e) {
247
+ return e.id === 'collaboration';
248
+ });
249
+
250
+ SidebarMainLinks[_index3].subMenu = true;
251
+ }
252
+
253
+ var hasManagementAccess = appCategories.includes(_Models.SidebarCategory.MANAGEMENT);
254
+ var hasMarketplaceAccess = appCategories.includes(_Models.SidebarCategory.MARKETPLACE);
255
+ var hasHomeAccess = appCategories.includes(_Models.SidebarCategory.MY_HOME);
256
+ var hasMyAppAccess = appCategories.includes(_Models.SidebarCategory.MY_APPS);
257
+ var hasCollaborationAccess = appCategories.includes(_Models.SidebarCategory.COLLABORATION) || sidebarOptions.map(function (option) {
258
+ return option.category;
259
+ }).includes(_Models.SidebarCategory.COLLABORATION);
260
+ return SidebarMainLinks.filter(function (mainLinkProps) {
261
+ return mainLinkProps.id.toLowerCase() !== _SidebarConstants.SidebarMenuTypes.Marketplace || hasMarketplaceAccess;
262
+ }).filter(function (mainLinkProps) {
263
+ return mainLinkProps.id.toLowerCase() !== _SidebarConstants.SidebarMenuTypes.Management || hasManagementAccess;
264
+ }).filter(function (mainLinkProps) {
265
+ return mainLinkProps.id.toLowerCase() !== _SidebarConstants.SidebarMenuTypes.Home || hasHomeAccess;
266
+ }).filter(function (mainLinkProps) {
267
+ return mainLinkProps.id.toLowerCase() !== _SidebarConstants.SidebarMenuTypes.MyApps || hasMyAppAccess;
268
+ }).filter(function (mainLinkProps) {
269
+ return mainLinkProps.id.toLowerCase() !== _SidebarConstants.SidebarMenuTypes.Collaboration || hasCollaborationAccess;
270
+ }).map(function (mainLinkProps, index) {
271
+ return /*#__PURE__*/_react.default.createElement(_SidebarMainLink.default, _extends({
272
+ appContext: appContext
273
+ }, mainLinkProps, {
274
+ key: "lsac-sidebar-main-link-".concat(index),
275
+ selectedOption: selectedOption
276
+ }));
277
+ });
278
+ }
279
+
280
+ var mainLinks = CheckManagementAndMarketplaceAccess();
281
+ var topNavHeightBuffer = {
282
+ top: topNavHeight
283
+ };
284
+ var sidebarRef = (0, _react.useRef)(null);
285
+ useExternalClickListener(sidebarRef);
286
+
287
+ var handleMouseLeave = function handleMouseLeave() {
288
+ if (!isMinimal) {
289
+ reduxDispatch((0, _SidebarActions.SetExpandSidebar)(false));
290
+ reduxDispatch((0, _SidebarActions.SetMinimalSidebar)(true));
291
+ }
292
+
293
+ reduxDispatch((0, _SidebarActions.SetSelectedSidebarOption)(selectedOption));
294
+ reduxDispatch((0, _SidebarActions.SetShowExpandedApps)(false));
295
+ };
296
+
297
+ return /*#__PURE__*/_react.default.createElement("div", {
298
+ className: 'lsac-sidebar-container'
299
+ }, /*#__PURE__*/_react.default.createElement("div", {
300
+ className: (0, _classnames.default)('lsac-sidebar', {
301
+ expanded: expanded,
302
+ isMinimal: isMinimal
303
+ }),
304
+ style: topNavHeightBuffer,
305
+ ref: sidebarRef,
306
+ onMouseLeave: handleMouseLeave
307
+ }, /*#__PURE__*/_react.default.createElement("div", {
308
+ className: "icon-strip"
309
+ }, mainLinks), /*#__PURE__*/_react.default.createElement("div", {
310
+ className: "submenu"
311
+ }, /*#__PURE__*/_react.default.createElement(_SidebarSubMenu.default, null))), formDisplay);
191
312
  }
192
- const MemoizedSidebar = react_2.default.memo(Sidebar);
193
- exports.default = MemoizedSidebar;
313
+
314
+ var MemoizedSidebar = /*#__PURE__*/_react.default.memo(Sidebar);
315
+
316
+ var _default = MemoizedSidebar;
317
+ exports.default = _default;