@verdaccio/ui-components 5.0.0-next-9.0 → 5.0.0-next-9.2

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 (560) hide show
  1. package/build/Theme/ResetStyles.js +28 -47
  2. package/build/Theme/ResetStyles.js.map +1 -1
  3. package/build/Theme/StyleBaseline.js +9 -14
  4. package/build/Theme/StyleBaseline.js.map +1 -1
  5. package/build/Theme/ThemeProvider.js +31 -56
  6. package/build/Theme/ThemeProvider.js.map +1 -1
  7. package/build/Theme/colors.js +15 -18
  8. package/build/Theme/colors.js.map +1 -1
  9. package/build/Theme/index.js +5 -58
  10. package/build/Theme/modes.js +25 -38
  11. package/build/Theme/modes.js.map +1 -1
  12. package/build/Theme/theme.js +18 -31
  13. package/build/Theme/theme.js.map +1 -1
  14. package/build/Theme/tokens.js +28 -33
  15. package/build/Theme/tokens.js.map +1 -1
  16. package/build/_virtual/_rolldown/runtime.js +11 -0
  17. package/build/api/use-data-mutation.js +38 -95
  18. package/build/api/use-data-mutation.js.map +1 -1
  19. package/build/api/use-data.js +17 -33
  20. package/build/api/use-data.js.map +1 -1
  21. package/build/components/ActionBar/ActionBar.js +45 -86
  22. package/build/components/ActionBar/ActionBar.js.map +1 -1
  23. package/build/components/ActionBar/ActionBarAction.js +79 -107
  24. package/build/components/ActionBar/ActionBarAction.js.map +1 -1
  25. package/build/components/ActionBar/index.js +1 -14
  26. package/build/components/AppRoute/AppRoute.js +65 -87
  27. package/build/components/AppRoute/AppRoute.js.map +1 -1
  28. package/build/components/Author/Author.js +30 -41
  29. package/build/components/Author/Author.js.map +1 -1
  30. package/build/components/Author/index.js +1 -14
  31. package/build/components/Author/styles.js +21 -31
  32. package/build/components/Author/styles.js.map +1 -1
  33. package/build/components/CopyClipboard/CopyToClipBoard.js +52 -67
  34. package/build/components/CopyClipboard/CopyToClipBoard.js.map +1 -1
  35. package/build/components/CopyClipboard/index.js +2 -21
  36. package/build/components/CopyClipboard/utils.d.ts +1 -1
  37. package/build/components/CopyClipboard/utils.js +6 -13
  38. package/build/components/CopyClipboard/utils.js.map +1 -1
  39. package/build/components/Dependencies/Dependencies.js +36 -80
  40. package/build/components/Dependencies/Dependencies.js.map +1 -1
  41. package/build/components/Dependencies/DependencyBlock.d.ts +3 -3
  42. package/build/components/Dependencies/DependencyBlock.js +62 -108
  43. package/build/components/Dependencies/DependencyBlock.js.map +1 -1
  44. package/build/components/Dependencies/index.js +2 -14
  45. package/build/components/Dependencies/utits.js +6 -8
  46. package/build/components/Dependencies/utits.js.map +1 -1
  47. package/build/components/Deprecated/Deprecated.js +14 -23
  48. package/build/components/Deprecated/Deprecated.js.map +1 -1
  49. package/build/components/Deprecated/index.js +1 -14
  50. package/build/components/Developers/DeveloperType.js +6 -10
  51. package/build/components/Developers/DeveloperType.js.map +1 -1
  52. package/build/components/Developers/Developers.js +57 -98
  53. package/build/components/Developers/Developers.js.map +1 -1
  54. package/build/components/Developers/Title.js +29 -39
  55. package/build/components/Developers/Title.js.map +1 -1
  56. package/build/components/Developers/get-unique-developer-values.js +6 -22
  57. package/build/components/Developers/get-unique-developer-values.js.map +1 -1
  58. package/build/components/Developers/index.js +2 -21
  59. package/build/components/Distribution/Dist.js +38 -44
  60. package/build/components/Distribution/Dist.js.map +1 -1
  61. package/build/components/Distribution/index.js +1 -14
  62. package/build/components/Distribution/styles.js +33 -44
  63. package/build/components/Distribution/styles.js.map +1 -1
  64. package/build/components/Engines/Engines.js +66 -88
  65. package/build/components/Engines/Engines.js.map +1 -1
  66. package/build/components/Engines/index.js +1 -14
  67. package/build/components/Engines/styles.js +24 -32
  68. package/build/components/Engines/styles.js.map +1 -1
  69. package/build/components/ErrorBoundary/ErrorBoundary.js +27 -66
  70. package/build/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
  71. package/build/components/ErrorBoundary/index.js +1 -14
  72. package/build/components/Forbidden/Forbidden.js +62 -71
  73. package/build/components/Forbidden/Forbidden.js.map +1 -1
  74. package/build/components/Forbidden/index.js +1 -14
  75. package/build/components/FundButton/FundButton.js +52 -73
  76. package/build/components/FundButton/FundButton.js.map +1 -1
  77. package/build/components/FundButton/index.js +1 -14
  78. package/build/components/HeaderInfoDialog/HeaderInfoDialog.js +62 -88
  79. package/build/components/HeaderInfoDialog/HeaderInfoDialog.js.map +1 -1
  80. package/build/components/HeaderInfoDialog/index.js +1 -14
  81. package/build/components/Heading/Heading.d.ts +1 -1
  82. package/build/components/Heading/Heading.js +13 -23
  83. package/build/components/Heading/Heading.js.map +1 -1
  84. package/build/components/Heading/index.js +1 -14
  85. package/build/components/Help/Help.js +55 -55
  86. package/build/components/Help/Help.js.map +1 -1
  87. package/build/components/Help/index.js +1 -14
  88. package/build/components/Help/styles.js +17 -20
  89. package/build/components/Help/styles.js.map +1 -1
  90. package/build/components/Icons/DevsIcons/CommonJS2.js +16 -0
  91. package/build/components/Icons/DevsIcons/CommonJS2.js.map +1 -0
  92. package/build/components/Icons/DevsIcons/ES6Module2.js +16 -0
  93. package/build/components/Icons/DevsIcons/ES6Module2.js.map +1 -0
  94. package/build/components/Icons/DevsIcons/Git2.js +16 -0
  95. package/build/components/Icons/DevsIcons/Git2.js.map +1 -0
  96. package/build/components/Icons/DevsIcons/NodeJS2.js +16 -0
  97. package/build/components/Icons/DevsIcons/NodeJS2.js.map +1 -0
  98. package/build/components/Icons/DevsIcons/TypeScript2.js +16 -0
  99. package/build/components/Icons/DevsIcons/TypeScript2.js.map +1 -0
  100. package/build/components/Icons/DevsIcons/commonjs.js +6 -0
  101. package/build/components/Icons/DevsIcons/commonjs.js.map +1 -0
  102. package/build/components/Icons/DevsIcons/es6module.js +6 -0
  103. package/build/components/Icons/DevsIcons/es6module.js.map +1 -0
  104. package/build/components/Icons/DevsIcons/git.js +6 -0
  105. package/build/components/Icons/DevsIcons/git.js.map +1 -0
  106. package/build/components/Icons/DevsIcons/index.js +5 -41
  107. package/build/components/Icons/DevsIcons/nodejs.js +6 -0
  108. package/build/components/Icons/DevsIcons/nodejs.js.map +1 -0
  109. package/build/components/Icons/DevsIcons/typescript.js +6 -0
  110. package/build/components/Icons/DevsIcons/typescript.js.map +1 -0
  111. package/build/components/Icons/Earth.js +39 -42
  112. package/build/components/Icons/Earth.js.map +1 -1
  113. package/build/components/Icons/FileBinary.js +15 -24
  114. package/build/components/Icons/FileBinary.js.map +1 -1
  115. package/build/components/Icons/Law.js +18 -25
  116. package/build/components/Icons/Law.js.map +1 -1
  117. package/build/components/Icons/License.js +15 -26
  118. package/build/components/Icons/License.js.map +1 -1
  119. package/build/components/Icons/Managers/Npm2.js +16 -0
  120. package/build/components/Icons/Managers/Npm2.js.map +1 -0
  121. package/build/components/Icons/Managers/Pnpm2.js +16 -0
  122. package/build/components/Icons/Managers/Pnpm2.js.map +1 -0
  123. package/build/components/Icons/Managers/Yarn2.js +16 -0
  124. package/build/components/Icons/Managers/Yarn2.js.map +1 -0
  125. package/build/components/Icons/Managers/index.js +3 -27
  126. package/build/components/Icons/Managers/npm.js +6 -0
  127. package/build/components/Icons/Managers/npm.js.map +1 -0
  128. package/build/components/Icons/Managers/pnpm.js +6 -0
  129. package/build/components/Icons/Managers/pnpm.js.map +1 -0
  130. package/build/components/Icons/Managers/yarn.js +6 -0
  131. package/build/components/Icons/Managers/yarn.js.map +1 -0
  132. package/build/components/Icons/SvgIcon.d.ts +2 -6
  133. package/build/components/Icons/SvgIcon.js +24 -53
  134. package/build/components/Icons/SvgIcon.js.map +1 -1
  135. package/build/components/Icons/Time.js +22 -29
  136. package/build/components/Icons/Time.js.map +1 -1
  137. package/build/components/Icons/Version.js +20 -27
  138. package/build/components/Icons/Version.js.map +1 -1
  139. package/build/components/Icons/index.js +36 -78
  140. package/build/components/Icons/index.js.map +1 -1
  141. package/build/components/Install/Install.js +58 -74
  142. package/build/components/Install/Install.js.map +1 -1
  143. package/build/components/Install/InstallListItem.js +91 -120
  144. package/build/components/Install/InstallListItem.js.map +1 -1
  145. package/build/components/Install/index.js +1 -14
  146. package/build/components/Keywords/KeywordListItems.js +25 -34
  147. package/build/components/Keywords/KeywordListItems.js.map +1 -1
  148. package/build/components/Keywords/Keywords.js +25 -35
  149. package/build/components/Keywords/Keywords.js.map +1 -1
  150. package/build/components/Keywords/index.js +1 -14
  151. package/build/components/Label/Label.js +18 -37
  152. package/build/components/Label/Label.js.map +1 -1
  153. package/build/components/Label/index.js +1 -14
  154. package/build/components/Link/Link.d.ts +3 -1
  155. package/build/components/Link/Link.js +32 -40
  156. package/build/components/Link/Link.js.map +1 -1
  157. package/build/components/Link/index.js +1 -14
  158. package/build/components/LinkExternal/LinkExternal.d.ts +3 -1
  159. package/build/components/LinkExternal/LinkExternal.js +19 -30
  160. package/build/components/LinkExternal/LinkExternal.js.map +1 -1
  161. package/build/components/LinkExternal/index.js +1 -14
  162. package/build/components/Loading/Loading.js +14 -20
  163. package/build/components/Loading/Loading.js.map +1 -1
  164. package/build/components/Loading/Spinner/Spinner.js +28 -57
  165. package/build/components/Loading/Spinner/Spinner.js.map +1 -1
  166. package/build/components/Loading/Spinner/index.js +1 -14
  167. package/build/components/Loading/index.js +1 -14
  168. package/build/components/Loading/styles.d.ts +5 -5
  169. package/build/components/Loading/styles.js +26 -35
  170. package/build/components/Loading/styles.js.map +1 -1
  171. package/build/components/LoginDialog/LoginDialog.js +28 -39
  172. package/build/components/LoginDialog/LoginDialog.js.map +1 -1
  173. package/build/components/LoginDialog/LoginDialogCloseButton.js +27 -39
  174. package/build/components/LoginDialog/LoginDialogCloseButton.js.map +1 -1
  175. package/build/components/LoginDialog/LoginDialogForm.js +17 -26
  176. package/build/components/LoginDialog/LoginDialogForm.js.map +1 -1
  177. package/build/components/LoginDialog/LoginDialogFormError.js +30 -51
  178. package/build/components/LoginDialog/LoginDialogFormError.js.map +1 -1
  179. package/build/components/LoginDialog/index.js +1 -14
  180. package/build/components/LoginForm/Login.js +64 -85
  181. package/build/components/LoginForm/Login.js.map +1 -1
  182. package/build/components/LoginForm/PasswordField.js +31 -49
  183. package/build/components/LoginForm/PasswordField.js.map +1 -1
  184. package/build/components/LoginForm/UsernameField.js +29 -47
  185. package/build/components/LoginForm/UsernameField.js.map +1 -1
  186. package/build/components/LoginForm/styles.js +48 -58
  187. package/build/components/LoginForm/styles.js.map +1 -1
  188. package/build/components/LoginForm/useLoginForm.js +32 -64
  189. package/build/components/LoginForm/useLoginForm.js.map +1 -1
  190. package/build/components/Logo/Logo.js +66 -87
  191. package/build/components/Logo/Logo.js.map +1 -1
  192. package/build/components/Logo/img/logo-black-and-white.js +6 -0
  193. package/build/components/Logo/img/logo-black-and-white.js.map +1 -0
  194. package/build/components/Logo/img/logo.js +6 -0
  195. package/build/components/Logo/img/logo.js.map +1 -0
  196. package/build/components/Logo/index.js +1 -14
  197. package/build/components/MenuItem/MenuItem.d.ts +1 -1
  198. package/build/components/MenuItem/MenuItem.js +25 -39
  199. package/build/components/MenuItem/MenuItem.js.map +1 -1
  200. package/build/components/MenuItem/index.js +1 -14
  201. package/build/components/NoItems/NoItems.js +14 -24
  202. package/build/components/NoItems/NoItems.js.map +1 -1
  203. package/build/components/NoItems/index.js +1 -14
  204. package/build/components/NotFound/NotFound.js +63 -72
  205. package/build/components/NotFound/NotFound.js.map +1 -1
  206. package/build/components/NotFound/index.js +1 -14
  207. package/build/components/Package/Package.js +163 -230
  208. package/build/components/Package/Package.js.map +1 -1
  209. package/build/components/Package/index.js +1 -14
  210. package/build/components/Package/styles.d.ts +18 -18
  211. package/build/components/Package/styles.js +122 -185
  212. package/build/components/Package/styles.js.map +1 -1
  213. package/build/components/PackageList/PackageList.js +63 -92
  214. package/build/components/PackageList/PackageList.js.map +1 -1
  215. package/build/components/PackageList/index.js +1 -14
  216. package/build/components/Person/Person.js +36 -46
  217. package/build/components/Person/Person.js.map +1 -1
  218. package/build/components/Person/PersonTooltip.js +24 -21
  219. package/build/components/Person/PersonTooltip.js.map +1 -1
  220. package/build/components/Person/index.js +1 -14
  221. package/build/components/Person/utils.js +11 -14
  222. package/build/components/Person/utils.js.map +1 -1
  223. package/build/components/RawViewer/RawViewer.js +53 -64
  224. package/build/components/RawViewer/RawViewer.js.map +1 -1
  225. package/build/components/RawViewer/index.js +1 -14
  226. package/build/components/Readme/Readme.d.ts +2 -0
  227. package/build/components/Readme/Readme.js +40 -56
  228. package/build/components/Readme/Readme.js.map +1 -1
  229. package/build/components/Readme/index.js +1 -14
  230. package/build/components/Readme/utils.js +22 -27
  231. package/build/components/Readme/utils.js.map +1 -1
  232. package/build/components/RegistryInfoDialog/RegistryInfoDialog.js +30 -34
  233. package/build/components/RegistryInfoDialog/RegistryInfoDialog.js.map +1 -1
  234. package/build/components/RegistryInfoDialog/index.js +1 -14
  235. package/build/components/RegistryInfoDialog/styles.d.ts +5 -5
  236. package/build/components/RegistryInfoDialog/styles.js +22 -47
  237. package/build/components/RegistryInfoDialog/styles.js.map +1 -1
  238. package/build/components/Repository/Repository.js +79 -101
  239. package/build/components/Repository/Repository.js.map +1 -1
  240. package/build/components/Repository/index.js +1 -14
  241. package/build/components/Search/AutoComplete/AutoComplete.js +33 -76
  242. package/build/components/Search/AutoComplete/AutoComplete.js.map +1 -1
  243. package/build/components/Search/AutoComplete/index.js +1 -14
  244. package/build/components/Search/AutoComplete/styles.d.ts +2 -2
  245. package/build/components/Search/AutoComplete/styles.js +16 -19
  246. package/build/components/Search/AutoComplete/styles.js.map +1 -1
  247. package/build/components/Search/Search.js +91 -176
  248. package/build/components/Search/Search.js.map +1 -1
  249. package/build/components/Search/SearchItem.d.ts +3 -3
  250. package/build/components/Search/SearchItem.js +102 -144
  251. package/build/components/Search/SearchItem.js.map +1 -1
  252. package/build/components/Search/index.js +1 -14
  253. package/build/components/Search/styles.d.ts +2 -2
  254. package/build/components/Search/styles.js +29 -56
  255. package/build/components/Search/styles.js.map +1 -1
  256. package/build/components/Search/utils.js +13 -20
  257. package/build/components/Search/utils.js.map +1 -1
  258. package/build/components/SettingsMenu/SettingsMenu.js +94 -108
  259. package/build/components/SettingsMenu/SettingsMenu.js.map +1 -1
  260. package/build/components/SettingsMenu/index.js +1 -14
  261. package/build/components/SideBarTitle/SideBarTitle.js +65 -99
  262. package/build/components/SideBarTitle/SideBarTitle.js.map +1 -1
  263. package/build/components/SideBarTitle/index.js +1 -14
  264. package/build/components/SideBarTitle/utils.js +10 -16
  265. package/build/components/SideBarTitle/utils.js.map +1 -1
  266. package/build/components/UpLinks/UpLinks.js +57 -68
  267. package/build/components/UpLinks/UpLinks.js.map +1 -1
  268. package/build/components/UpLinks/UplinkLink.js +17 -19
  269. package/build/components/UpLinks/UplinkLink.js.map +1 -1
  270. package/build/components/UpLinks/index.js +2 -14
  271. package/build/components/UpLinks/styles.d.ts +5 -5
  272. package/build/components/UpLinks/styles.js +27 -48
  273. package/build/components/UpLinks/styles.js.map +1 -1
  274. package/build/components/Versions/HistoryList.js +59 -75
  275. package/build/components/Versions/HistoryList.js.map +1 -1
  276. package/build/components/Versions/TagList.js +29 -35
  277. package/build/components/Versions/TagList.js.map +1 -1
  278. package/build/components/Versions/Versions.js +76 -121
  279. package/build/components/Versions/Versions.js.map +1 -1
  280. package/build/components/Versions/index.js +2 -14
  281. package/build/components/Versions/styles.d.ts +5 -5
  282. package/build/components/Versions/styles.js +23 -37
  283. package/build/components/Versions/styles.js.map +1 -1
  284. package/build/configuration.js +20 -20
  285. package/build/configuration.js.map +1 -1
  286. package/build/dark-logo.png +0 -0
  287. package/build/favicon.ico +0 -0
  288. package/build/hooks/index.js +2 -21
  289. package/build/hooks/useLocalStorage.js +22 -59
  290. package/build/hooks/useLocalStorage.js.map +1 -1
  291. package/build/hooks/useOnClickOutside.js +14 -30
  292. package/build/hooks/useOnClickOutside.js.map +1 -1
  293. package/build/index.js +118 -483
  294. package/build/layouts/Security/Dialog.js +17 -25
  295. package/build/layouts/Security/Dialog.js.map +1 -1
  296. package/build/layouts/Version/Version.js +28 -28
  297. package/build/layouts/Version/Version.js.map +1 -1
  298. package/build/layouts/Version/index.js +1 -14
  299. package/build/mockServiceWorker.js +335 -0
  300. package/build/pages/Front/Home.js +6 -7
  301. package/build/pages/Front/Home.js.map +1 -1
  302. package/build/pages/Front/index.js +2 -14
  303. package/build/pages/Security/AddUser.js +6 -7
  304. package/build/pages/Security/AddUser.js.map +1 -1
  305. package/build/pages/Security/ChangePassword.js +6 -7
  306. package/build/pages/Security/ChangePassword.js.map +1 -1
  307. package/build/pages/Security/Login.js +6 -7
  308. package/build/pages/Security/Login.js.map +1 -1
  309. package/build/pages/Security/Success.js +6 -7
  310. package/build/pages/Security/Success.js.map +1 -1
  311. package/build/pages/Security/index.js +4 -35
  312. package/build/pages/Version/Version.js +16 -30
  313. package/build/pages/Version/Version.js.map +1 -1
  314. package/build/pages/Version/index.js +2 -14
  315. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js +51 -72
  316. package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js.map +1 -1
  317. package/build/providers/AppConfigurationProvider/index.js +1 -19
  318. package/build/providers/AuthProvider/AuthProvider.js +37 -100
  319. package/build/providers/AuthProvider/AuthProvider.js.map +1 -1
  320. package/build/providers/AuthProvider/index.js +1 -17
  321. package/build/providers/AuthProvider/utils.js +19 -24
  322. package/build/providers/AuthProvider/utils.js.map +1 -1
  323. package/build/providers/DownloadProvider/DownloadProvider.js +29 -71
  324. package/build/providers/DownloadProvider/DownloadProvider.js.map +1 -1
  325. package/build/providers/DownloadProvider/index.js +1 -19
  326. package/build/providers/ManifestsProvider/ManifestsProvider.js +20 -31
  327. package/build/providers/ManifestsProvider/ManifestsProvider.js.map +1 -1
  328. package/build/providers/ManifestsProvider/index.js +1 -21
  329. package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js +22 -50
  330. package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js.map +1 -1
  331. package/build/providers/PersistenceSettingProvider/index.js +1 -19
  332. package/build/providers/SearchProvider/SearchProvider.js +45 -95
  333. package/build/providers/SearchProvider/SearchProvider.js.map +1 -1
  334. package/build/providers/SearchProvider/index.js +1 -25
  335. package/build/providers/TranslatorProvider/TranslatorProvider.js +33 -71
  336. package/build/providers/TranslatorProvider/TranslatorProvider.js.map +1 -1
  337. package/build/providers/TranslatorProvider/index.js +1 -21
  338. package/build/providers/VersionProvider/VersionProvider.js +42 -57
  339. package/build/providers/VersionProvider/VersionProvider.js.map +1 -1
  340. package/build/providers/VersionProvider/index.js +1 -21
  341. package/build/providers/index.js +16 -94
  342. package/build/sections/Detail/ContainerContent.js +24 -63
  343. package/build/sections/Detail/ContainerContent.js.map +1 -1
  344. package/build/sections/Detail/Detail.js +39 -62
  345. package/build/sections/Detail/Detail.js.map +1 -1
  346. package/build/sections/Detail/ReadmeSection.js +8 -18
  347. package/build/sections/Detail/ReadmeSection.js.map +1 -1
  348. package/build/sections/Detail/Tabs.js +52 -54
  349. package/build/sections/Detail/Tabs.js.map +1 -1
  350. package/build/sections/Detail/index.js +1 -14
  351. package/build/sections/Footer/Footer.js +94 -137
  352. package/build/sections/Footer/Footer.js.map +1 -1
  353. package/build/sections/Footer/index.js +1 -14
  354. package/build/sections/Footer/styles.d.ts +16 -16
  355. package/build/sections/Footer/styles.js +58 -89
  356. package/build/sections/Footer/styles.js.map +1 -1
  357. package/build/sections/Header/Header.js +89 -144
  358. package/build/sections/Header/Header.js.map +1 -1
  359. package/build/sections/Header/HeaderGreetings.js +17 -21
  360. package/build/sections/Header/HeaderGreetings.js.map +1 -1
  361. package/build/sections/Header/HeaderLeft.js +31 -32
  362. package/build/sections/Header/HeaderLeft.js.map +1 -1
  363. package/build/sections/Header/HeaderMenu.js +43 -50
  364. package/build/sections/Header/HeaderMenu.js.map +1 -1
  365. package/build/sections/Header/HeaderRight.js +76 -119
  366. package/build/sections/Header/HeaderRight.js.map +1 -1
  367. package/build/sections/Header/HeaderSettingsDialog.js +91 -107
  368. package/build/sections/Header/HeaderSettingsDialog.js.map +1 -1
  369. package/build/sections/Header/HeaderToolTip.js +10 -17
  370. package/build/sections/Header/HeaderToolTip.js.map +1 -1
  371. package/build/sections/Header/HeaderToolTipIcon.d.ts +1 -1
  372. package/build/sections/Header/HeaderToolTipIcon.js +56 -63
  373. package/build/sections/Header/HeaderToolTipIcon.js.map +1 -1
  374. package/build/sections/Header/LanguageSwitch.js +81 -128
  375. package/build/sections/Header/LanguageSwitch.js.map +1 -1
  376. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.d.ts +6 -6
  377. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js +171 -166
  378. package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js.map +1 -1
  379. package/build/sections/Header/RegistryInfoContent/index.js +1 -14
  380. package/build/sections/Header/RegistryInfoContent/styles.d.ts +6 -6
  381. package/build/sections/Header/RegistryInfoContent/styles.js +17 -30
  382. package/build/sections/Header/RegistryInfoContent/styles.js.map +1 -1
  383. package/build/sections/Header/index.js +1 -14
  384. package/build/sections/Header/styles.d.ts +10 -10
  385. package/build/sections/Header/styles.js +109 -146
  386. package/build/sections/Header/styles.js.map +1 -1
  387. package/build/sections/Home/Home.js +17 -21
  388. package/build/sections/Home/Home.js.map +1 -1
  389. package/build/sections/Home/index.js +1 -14
  390. package/build/sections/Security/AddUser.js +116 -179
  391. package/build/sections/Security/AddUser.js.map +1 -1
  392. package/build/sections/Security/ChangePassword.js +111 -169
  393. package/build/sections/Security/ChangePassword.js.map +1 -1
  394. package/build/sections/Security/Login.js +78 -142
  395. package/build/sections/Security/Login.js.map +1 -1
  396. package/build/sections/Security/Success.js +40 -50
  397. package/build/sections/Security/Success.js.map +1 -1
  398. package/build/sections/Security/index.js +4 -35
  399. package/build/sections/Security/styles.js +25 -38
  400. package/build/sections/Security/styles.js.map +1 -1
  401. package/build/sections/Security/utils.js +14 -57
  402. package/build/sections/Security/utils.js.map +1 -1
  403. package/build/sections/SideBar/Sidebar.js +85 -90
  404. package/build/sections/SideBar/Sidebar.js.map +1 -1
  405. package/build/sections/SideBar/index.js +1 -14
  406. package/build/sections/index.js +4 -21
  407. package/build/store/api.js +57 -116
  408. package/build/store/api.js.map +1 -1
  409. package/build/store/index.js +1 -14
  410. package/build/store/routes.js +6 -20
  411. package/build/store/routes.js.map +1 -1
  412. package/build/store/storage.js +19 -30
  413. package/build/store/storage.js.map +1 -1
  414. package/build/store/utils.js +7 -12
  415. package/build/store/utils.js.map +1 -1
  416. package/build/ui-components.css +2 -0
  417. package/build/utils/cli-utils.d.ts +1 -1
  418. package/build/utils/cli-utils.js +21 -36
  419. package/build/utils/cli-utils.js.map +1 -1
  420. package/build/utils/index.js +6 -75
  421. package/build/utils/loadable.js +12 -25
  422. package/build/utils/loadable.js.map +1 -1
  423. package/build/utils/routes.js +8 -31
  424. package/build/utils/routes.js.map +1 -1
  425. package/build/utils/schemas.js +15 -27
  426. package/build/utils/schemas.js.map +1 -1
  427. package/build/utils/token.js +20 -40
  428. package/build/utils/token.js.map +1 -1
  429. package/build/utils/url.js +45 -73
  430. package/build/utils/url.js.map +1 -1
  431. package/build/utils/utils.js +55 -111
  432. package/build/utils/utils.js.map +1 -1
  433. package/package.json +17 -12
  434. package/build/AppTest/AppRoute.js +0 -14
  435. package/build/AppTest/AppRoute.js.map +0 -1
  436. package/build/Theme/index.js.map +0 -1
  437. package/build/components/ActionBar/index.js.map +0 -1
  438. package/build/components/Author/index.js.map +0 -1
  439. package/build/components/CopyClipboard/index.js.map +0 -1
  440. package/build/components/Dependencies/index.js.map +0 -1
  441. package/build/components/Dependencies/types.js +0 -6
  442. package/build/components/Dependencies/types.js.map +0 -1
  443. package/build/components/Deprecated/index.js.map +0 -1
  444. package/build/components/Developers/index.js.map +0 -1
  445. package/build/components/Distribution/index.js.map +0 -1
  446. package/build/components/Engines/index.js.map +0 -1
  447. package/build/components/ErrorBoundary/index.js.map +0 -1
  448. package/build/components/Forbidden/index.js.map +0 -1
  449. package/build/components/FundButton/index.js.map +0 -1
  450. package/build/components/HeaderInfoDialog/index.js.map +0 -1
  451. package/build/components/Heading/index.js.map +0 -1
  452. package/build/components/Help/index.js.map +0 -1
  453. package/build/components/Icons/DevsIcons/CommonJS.js +0 -18
  454. package/build/components/Icons/DevsIcons/CommonJS.js.map +0 -1
  455. package/build/components/Icons/DevsIcons/ES6Module.js +0 -18
  456. package/build/components/Icons/DevsIcons/ES6Module.js.map +0 -1
  457. package/build/components/Icons/DevsIcons/Git.js +0 -18
  458. package/build/components/Icons/DevsIcons/Git.js.map +0 -1
  459. package/build/components/Icons/DevsIcons/NodeJS.js +0 -18
  460. package/build/components/Icons/DevsIcons/NodeJS.js.map +0 -1
  461. package/build/components/Icons/DevsIcons/TypeScript.js +0 -18
  462. package/build/components/Icons/DevsIcons/TypeScript.js.map +0 -1
  463. package/build/components/Icons/DevsIcons/commonjs.svg +0 -4
  464. package/build/components/Icons/DevsIcons/es6module.svg +0 -4
  465. package/build/components/Icons/DevsIcons/git.svg +0 -4
  466. package/build/components/Icons/DevsIcons/index.js.map +0 -1
  467. package/build/components/Icons/DevsIcons/nodejs.svg +0 -6
  468. package/build/components/Icons/DevsIcons/typescript.svg +0 -4
  469. package/build/components/Icons/Managers/Npm.js +0 -18
  470. package/build/components/Icons/Managers/Npm.js.map +0 -1
  471. package/build/components/Icons/Managers/Pnpm.js +0 -18
  472. package/build/components/Icons/Managers/Pnpm.js.map +0 -1
  473. package/build/components/Icons/Managers/Yarn.js +0 -18
  474. package/build/components/Icons/Managers/Yarn.js.map +0 -1
  475. package/build/components/Icons/Managers/index.js.map +0 -1
  476. package/build/components/Icons/Managers/npm.svg +0 -15
  477. package/build/components/Icons/Managers/pnpm.svg +0 -1
  478. package/build/components/Icons/Managers/yarn.svg +0 -1
  479. package/build/components/Install/index.js.map +0 -1
  480. package/build/components/Keywords/index.js.map +0 -1
  481. package/build/components/Label/index.js.map +0 -1
  482. package/build/components/Link/index.js.map +0 -1
  483. package/build/components/LinkExternal/index.js.map +0 -1
  484. package/build/components/Loading/Spinner/index.js.map +0 -1
  485. package/build/components/Loading/index.js.map +0 -1
  486. package/build/components/LoginDialog/index.js.map +0 -1
  487. package/build/components/Logo/img/logo-black-and-white.svg +0 -1
  488. package/build/components/Logo/img/logo.svg +0 -1
  489. package/build/components/Logo/index.js.map +0 -1
  490. package/build/components/MenuItem/index.js.map +0 -1
  491. package/build/components/NoItems/index.js.map +0 -1
  492. package/build/components/NotFound/img/package.svg +0 -1
  493. package/build/components/NotFound/index.js.map +0 -1
  494. package/build/components/Package/index.js.map +0 -1
  495. package/build/components/PackageList/index.js.map +0 -1
  496. package/build/components/Person/index.js.map +0 -1
  497. package/build/components/RawViewer/index.js.map +0 -1
  498. package/build/components/Readme/github-markdown.css +0 -1198
  499. package/build/components/Readme/index.js.map +0 -1
  500. package/build/components/Readme/types.js +0 -6
  501. package/build/components/Readme/types.js.map +0 -1
  502. package/build/components/RegistryInfoDialog/index.js.map +0 -1
  503. package/build/components/RegistryInfoDialog/types.js +0 -6
  504. package/build/components/RegistryInfoDialog/types.js.map +0 -1
  505. package/build/components/Repository/index.js.map +0 -1
  506. package/build/components/Search/AutoComplete/index.js.map +0 -1
  507. package/build/components/Search/index.js.map +0 -1
  508. package/build/components/SettingsMenu/index.js.map +0 -1
  509. package/build/components/SideBarTitle/index.js.map +0 -1
  510. package/build/components/UnAuthorized/UnAuthorized.js +0 -75
  511. package/build/components/UnAuthorized/UnAuthorized.js.map +0 -1
  512. package/build/components/UnAuthorized/index.js +0 -14
  513. package/build/components/UnAuthorized/index.js.map +0 -1
  514. package/build/components/UpLinks/index.js.map +0 -1
  515. package/build/components/Versions/index.js.map +0 -1
  516. package/build/components/Versions/types.js +0 -6
  517. package/build/components/Versions/types.js.map +0 -1
  518. package/build/hooks/index.js.map +0 -1
  519. package/build/index.js.map +0 -1
  520. package/build/layouts/Version/index.js.map +0 -1
  521. package/build/pages/Front/index.js.map +0 -1
  522. package/build/pages/Security/index.js.map +0 -1
  523. package/build/pages/Version/index.js.map +0 -1
  524. package/build/providers/AppConfigurationProvider/index.js.map +0 -1
  525. package/build/providers/AuthProvider/index.js.map +0 -1
  526. package/build/providers/AuthProvider/types.js +0 -6
  527. package/build/providers/AuthProvider/types.js.map +0 -1
  528. package/build/providers/DownloadProvider/index.js.map +0 -1
  529. package/build/providers/ManifestsProvider/README.md +0 -22
  530. package/build/providers/ManifestsProvider/index.js.map +0 -1
  531. package/build/providers/PersistenceSettingProvider/index.js.map +0 -1
  532. package/build/providers/SearchProvider/index.js.map +0 -1
  533. package/build/providers/TranslatorProvider/index.js.map +0 -1
  534. package/build/providers/VersionProvider/README.md +0 -22
  535. package/build/providers/VersionProvider/index.js.map +0 -1
  536. package/build/providers/index.js.map +0 -1
  537. package/build/routes/SecurityRoutes.js +0 -36
  538. package/build/routes/SecurityRoutes.js.map +0 -1
  539. package/build/sections/Detail/index.js.map +0 -1
  540. package/build/sections/Footer/index.js.map +0 -1
  541. package/build/sections/Header/RegistryInfoContent/index.js.map +0 -1
  542. package/build/sections/Header/index.js.map +0 -1
  543. package/build/sections/Home/index.js.map +0 -1
  544. package/build/sections/Security/index.js.map +0 -1
  545. package/build/sections/SideBar/index.js.map +0 -1
  546. package/build/sections/index.js.map +0 -1
  547. package/build/store/index.js.map +0 -1
  548. package/build/test/i18n-config.js +0 -26
  549. package/build/test/i18n-config.js.map +0 -1
  550. package/build/test/test-react-testing-library.js +0 -147
  551. package/build/test/test-react-testing-library.js.map +0 -1
  552. package/build/types/external-modules.d.js +0 -2
  553. package/build/types/external-modules.d.js.map +0 -1
  554. package/build/types/index.js +0 -6
  555. package/build/types/index.js.map +0 -1
  556. package/build/types/packageMeta.js +0 -6
  557. package/build/types/packageMeta.js.map +0 -1
  558. package/build/utils/index.js.map +0 -1
  559. package/build/utils/token-generate.js +0 -44
  560. package/build/utils/token-generate.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Login.js","names":["_yup","require","_material","_react","_interopRequireWildcard","_reactHookForm","_reactI18next","_reactRouter","_useDataMutation2","_Login","_interopRequireDefault","_styles","_NotFound","_configuration","_Dialog","_utils","_storage","_utils2","_utils3","_schemas","_Success","_styles2","_utils4","e","__esModule","t","WeakMap","r","n","o","i","f","__proto__","_typeof","has","get","set","_t3","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_regenerator","Symbol","iterator","toStringTag","c","prototype","Generator","u","create","_regeneratorDefine2","p","y","G","v","a","d","bind","length","l","TypeError","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","displayName","w","m","_regeneratorDefine","_invoke","enumerable","configurable","writable","asyncGeneratorStep","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","configuration","getConfiguration","basePath","stripTrailingSlash","base","Login","_configuration$flags","_useTranslation","useTranslation","location","useLocation","navigate","useNavigate","_getSecurityUrlParams","getSecurityUrlParams","next","createUserEnabled","flags","createUser","addUserLink","Route","ADD_USER","_useDataMutation","useDataMutation","data","isMutating","trigger","form","useForm","mode","resolver","yupResolver","loginSchema","setError","handleSubmit","register","_form$formState","formState","isValid","errors","handleLogin","_ref","_callee","body","_t","_context","normalizeAuthError","_x","onSuccess","useCallback","concat","SUCCESS","MessageType","onSubmit","_ref2","_callee2","_t2","_context2","type","message","_x2","useEffect","username","token","saveAuth","createElement","SecurityContainer","SecurityForm","Typography","align","sx","mt","fontSize","variant","Link","href","ml","_default","exports"],"sources":["../../../src/sections/Security/Login.tsx"],"sourcesContent":["import { yupResolver } from '@hookform/resolvers/yup';\nimport { Link, Typography } from '@mui/material';\nimport React, { useCallback, useEffect } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useTranslation } from 'react-i18next';\nimport { useLocation, useNavigate } from 'react-router';\n\nimport { useDataMutation } from '../../api/use-data-mutation';\nimport type { LoginFormValues } from '../../components/LoginForm/Login';\nimport LoginForm from '../../components/LoginForm/Login';\nimport LoginFormHeader from '../../components/LoginForm/styles';\nimport NotFound from '../../components/NotFound';\nimport { getConfiguration } from '../../configuration';\nimport SecurityLayout from '../../layouts/Security/Dialog';\nimport type { LoginBody } from '../../providers/AuthProvider/types';\nimport { normalizeAuthError } from '../../providers/AuthProvider/utils';\nimport { saveAuth } from '../../store/storage';\nimport { stripTrailingSlash } from '../../store/utils';\nimport { Route } from '../../utils';\nimport { loginSchema } from '../../utils/schemas';\nimport { MessageType } from './Success';\nimport { SecurityContainer, SecurityForm } from './styles';\nimport { getSecurityUrlParams } from './utils';\n\nconst configuration = getConfiguration();\nconst basePath = stripTrailingSlash(configuration.base);\n\nconst Login: React.FC = () => {\n const { t } = useTranslation();\n const location = useLocation();\n const navigate = useNavigate();\n const { next } = getSecurityUrlParams(location);\n const createUserEnabled = configuration?.flags?.createUser;\n const addUserLink = Route.ADD_USER + (next ? '?next=' + next : '');\n\n const { data, isMutating, trigger } = useDataMutation<LoginBody>(basePath, next, 'POST');\n\n const form = useForm<LoginFormValues>({\n mode: 'onChange',\n resolver: yupResolver(loginSchema),\n });\n\n const {\n setError,\n handleSubmit,\n register,\n formState: { isValid, errors },\n } = form;\n\n const handleLogin = async (body: { username: string; password: string }) => {\n try {\n await trigger(body);\n } catch (err) {\n throw normalizeAuthError(err);\n }\n };\n\n const onSuccess = useCallback(() => {\n navigate(`${Route.SUCCESS}?messageType=${MessageType.Login}`);\n }, [navigate]);\n\n const onSubmit = useCallback(\n async (data: LoginFormValues) => {\n try {\n await handleLogin?.(data);\n onSuccess();\n } catch {\n setError('root', {\n type: 'server',\n // TODO: add translation key\n message: 'Invalid username or password',\n });\n }\n },\n [handleLogin, setError, onSuccess]\n );\n\n useEffect(() => {\n if (data && !isMutating && data.username && data.token) {\n saveAuth(data.username, data.token);\n }\n }, [data, isMutating]);\n\n return !next ? (\n <NotFound />\n ) : (\n <SecurityLayout>\n <SecurityContainer>\n <SecurityForm>\n <LoginFormHeader />\n <LoginForm\n errors={errors}\n handleSubmit={handleSubmit}\n isValid={isValid}\n onSubmit={onSubmit}\n register={register}\n />\n {createUserEnabled && (\n <Typography align=\"center\" sx={{ mt: 2, fontSize: 12 }} variant=\"body2\">\n {t('security.login.noUserQuestion')}\n <Link href={addUserLink} sx={{ ml: 1 }}>\n {t('security.login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I,SAAA,WAAQ,MAAE,CAAC,gBAEZT,MAAA,YAAAoJ,aAAA,CAACzI,OAAA,WAAc,qBACbX,MAAA,YAAAoJ,aAAA,CAAClI,QAAA,CAAAmI,iBAAiB,qBAChBrJ,MAAA,YAAAoJ,aAAA,CAAClI,QAAA,CAAAoI,YAAY,qBACXtJ,MAAA,YAAAoJ,aAAA,CAAC5I,OAAA,WAAe,MAAE,CAAC,eACnBR,MAAA,YAAAoJ,aAAA,CAAC9I,MAAA,WAAS;IACRoH,MAAM,EAAEA,MAAO;IACfL,YAAY,EAAEA,YAAa;IAC3BI,OAAO,EAAEA,OAAQ;IACjBe,QAAQ,EAAEA,QAAS;IACnBlB,QAAQ,EAAEA;EAAS,CACpB,CAAC,EACDnB,iBAAiB,iBAChBnG,MAAA,YAAAoJ,aAAA,CAACrJ,SAAA,CAAAwJ,UAAU;IAACC,KAAK,EAAC,QAAQ;IAACC,EAAE,EAAE;MAAEC,EAAE,EAAE,CAAC;MAAEC,QAAQ,EAAE;IAAG,CAAE;IAACC,OAAO,EAAC;EAAO,GACpEtI,CAAC,CAAC,+BAA+B,CAAC,eACnCtB,MAAA,YAAAoJ,aAAA,CAACrJ,SAAA,CAAA8J,IAAI;IAACC,IAAI,EAAExD,WAAY;IAACmD,EAAE,EAAE;MAAEM,EAAE,EAAE;IAAE;EAAE,GACpCzI,CAAC,CAAC,2BAA2B,CAC1B,CACI,CAEF,CACG,CACL,CACjB;AACH,CAAC;AAAC,IAAA0I,QAAA,GAAAC,OAAA,cAEazE,KAAK","ignoreList":[]}
1
+ {"version":3,"file":"Login.js","names":["yupResolver","Link","Typography","React","useCallback","useEffect","useForm","useTranslation","useLocation","useNavigate","useDataMutation","LoginFormValues","LoginForm","LoginFormHeader","NotFound","getConfiguration","SecurityLayout","LoginBody","normalizeAuthError","saveAuth","stripTrailingSlash","Route","loginSchema","MessageType","SecurityContainer","SecurityForm","getSecurityUrlParams","configuration","basePath","base","Login","FC","t","location","navigate","next","createUserEnabled","flags","createUser","addUserLink","ADD_USER","data","isMutating","trigger","form","mode","resolver","setError","handleSubmit","register","formState","isValid","errors","handleLogin","body","username","password","err","onSuccess","SUCCESS","onSubmit","type","message","token","mt","fontSize","ml"],"sources":["../../../src/sections/Security/Login.tsx"],"sourcesContent":["import { yupResolver } from '@hookform/resolvers/yup';\nimport { Link, Typography } from '@mui/material';\nimport React, { useCallback, useEffect } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useTranslation } from 'react-i18next';\nimport { useLocation, useNavigate } from 'react-router';\n\nimport { useDataMutation } from '../../api/use-data-mutation';\nimport type { LoginFormValues } from '../../components/LoginForm/Login';\nimport LoginForm from '../../components/LoginForm/Login';\nimport LoginFormHeader from '../../components/LoginForm/styles';\nimport NotFound from '../../components/NotFound';\nimport { getConfiguration } from '../../configuration';\nimport SecurityLayout from '../../layouts/Security/Dialog';\nimport type { LoginBody } from '../../providers/AuthProvider/types';\nimport { normalizeAuthError } from '../../providers/AuthProvider/utils';\nimport { saveAuth } from '../../store/storage';\nimport { stripTrailingSlash } from '../../store/utils';\nimport { Route } from '../../utils';\nimport { loginSchema } from '../../utils/schemas';\nimport { MessageType } from './Success';\nimport { SecurityContainer, SecurityForm } from './styles';\nimport { getSecurityUrlParams } from './utils';\n\nconst configuration = getConfiguration();\nconst basePath = stripTrailingSlash(configuration.base);\n\nconst Login: React.FC = () => {\n const { t } = useTranslation();\n const location = useLocation();\n const navigate = useNavigate();\n const { next } = getSecurityUrlParams(location);\n const createUserEnabled = configuration?.flags?.createUser;\n const addUserLink = Route.ADD_USER + (next ? '?next=' + next : '');\n\n const { data, isMutating, trigger } = useDataMutation<LoginBody>(basePath, next, 'POST');\n\n const form = useForm<LoginFormValues>({\n mode: 'onChange',\n resolver: yupResolver(loginSchema),\n });\n\n const {\n setError,\n handleSubmit,\n register,\n formState: { isValid, errors },\n } = form;\n\n const handleLogin = async (body: { username: string; password: string }) => {\n try {\n await trigger(body);\n } catch (err) {\n throw normalizeAuthError(err);\n }\n };\n\n const onSuccess = useCallback(() => {\n navigate(`${Route.SUCCESS}?messageType=${MessageType.Login}`);\n }, [navigate]);\n\n const onSubmit = useCallback(\n async (data: LoginFormValues) => {\n try {\n await handleLogin?.(data);\n onSuccess();\n } catch {\n setError('root', {\n type: 'server',\n // TODO: add translation key\n message: 'Invalid username or password',\n });\n }\n },\n [handleLogin, setError, onSuccess]\n );\n\n useEffect(() => {\n if (data && !isMutating && data.username && data.token) {\n saveAuth(data.username, data.token);\n }\n }, [data, isMutating]);\n\n return !next ? (\n <NotFound />\n ) : (\n <SecurityLayout>\n <SecurityContainer>\n <SecurityForm>\n <LoginFormHeader />\n <LoginForm\n errors={errors}\n handleSubmit={handleSubmit}\n isValid={isValid}\n onSubmit={onSubmit}\n register={register}\n />\n {createUserEnabled && (\n <Typography align=\"center\" sx={{ mt: 2, fontSize: 12 }} variant=\"body2\">\n {t('security.login.noUserQuestion')}\n <Link href={addUserLink} sx={{ ml: 1 }}>\n {t('security.login.createUser')}\n </Link>\n </Typography>\n )}\n </SecurityForm>\n </SecurityContainer>\n </SecurityLayout>\n );\n};\n\nexport default Login;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAM2B,IAAgBZ,GAAkB,EAClCa,IAAWR,EAAmBO,EAAcE,KAAK,EAEjDC,UAAwB;CAC5B,IAAM,EAAEE,SAAMzB,GAAgB,EACxB0B,IAAWzB,GAAa,EACxB0B,IAAWzB,GAAa,EACxB,EAAE0B,YAAST,EAAqBO,EAAS,EACzCG,IAAoBT,GAAeU,OAAOC,YAC1CC,IAAclB,EAAMmB,YAAYL,IAAO,WAAWA,IAAO,KAEzD,EAAEM,SAAMC,eAAYC,eAAYjC,EAA2BkB,GAAUO,GAAM,OAAO,EAOlF,EACJY,aACAC,iBACAC,aACAC,WAAW,EAAEC,YAASC,gBATX9C,EAAyB;EACpCuC,MAAM;EACNC,UAAU9C,EAAYsB,EAAW;EAClC,CAAC,EASI+B,IAAc,OAAOC,MAAiD;AAC1E,MAAI;AACF,SAAMX,EAAQW,EAAK;WACZG,GAAK;AACZ,SAAMvC,EAAmBuC,EAAI;;IAI3BC,IAAYtD,QAAkB;AAClC8B,IAAS,GAAGb,EAAMsC,QAAO,eAAgBpC,EAAYO,QAAQ;IAC5D,CAACI,EAAS,CAAC,EAER0B,IAAWxD,EACf,OAAOqC,MAA0B;AAC/B,MAAI;AAEFiB,GADA,MAAML,IAAcZ,EAAK,EACzBiB,GAAW;UACL;AACNX,KAAS,QAAQ;IACfc,MAAM;IAENC,SAAS;IACV,CAAC;;IAGN;EAACT;EAAaN;EAAUW;EAC1B,CAAC;AAQD,QANArD,QAAgB;AACd,EAAIoC,KAAQ,CAACC,KAAcD,EAAKc,YAAYd,EAAKsB,SAC/C5C,EAASsB,EAAKc,UAAUd,EAAKsB,MAAM;IAEpC,CAACtB,GAAMC,EAAW,CAAC,EAEdP,IAGN,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAA;EACE,kBAAC,GAAD,EAAgB,CAAA;EAChB,kBAAC,GAAD;GACUiB;GACMJ;GACLG;GACCS;GACAX;GAAS,CAAA;EAEpBb,KACC,kBAAC,GAAD;GAAY,OAAM;GAAS,IAAI;IAAE4B,IAAI;IAAGC,UAAU;IAAI;GAAE,SAAQ;aAAhE,CACGjC,EAAE,gCAAgC,EACnC,kBAAC,GAAD;IAAM,MAAMO;IAAa,IAAI,EAAE2B,IAAI,GAAG;cACnClC,EAAE,4BAA4B;IAC3B,CAAA,CAET;;EACW,EAAA,CAAA,EACG,CAAA,EAEtB,CAAA,GAxBC,kBAAC,GAAD,EAAY,CAAA"}
@@ -1,52 +1,42 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = exports.MessageType = void 0;
7
- var _CheckCircle = _interopRequireDefault(require("@mui/icons-material/CheckCircle"));
8
- var _material = require("@mui/material");
9
- var _react = _interopRequireDefault(require("react"));
10
- var _reactI18next = require("react-i18next");
11
- var _reactRouter = require("react-router");
12
- var _Dialog = _interopRequireDefault(require("../../layouts/Security/Dialog"));
13
- var _styles = require("./styles");
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
15
- var MessageType = exports.MessageType = /*#__PURE__*/function (MessageType) {
16
- MessageType["Login"] = "Login";
17
- MessageType["ChangePassword"] = "ChangePassword";
18
- MessageType["AddUser"] = "AddUser";
19
- MessageType["Success"] = "Success";
20
- return MessageType;
21
- }({});
22
- var Success = function Success() {
23
- var _useTranslation = (0, _reactI18next.useTranslation)(),
24
- t = _useTranslation.t;
25
- var location = (0, _reactRouter.useLocation)();
26
- var queryParams = new URLSearchParams(location.search);
27
- var messageType = queryParams.get('messageType');
28
- var message = !messageType ? t('security.success.messageSuccess') : t("security.success.message".concat(messageType));
29
- var handleClose = function handleClose() {
30
- window.location.href = '/';
31
- };
32
- return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], null, /*#__PURE__*/_react["default"].createElement(_styles.SecurityContainer, null, /*#__PURE__*/_react["default"].createElement(_styles.SecurityForm, null, /*#__PURE__*/_react["default"].createElement(_CheckCircle["default"], {
33
- color: "success"
34
- }), /*#__PURE__*/_react["default"].createElement(_material.Typography, {
35
- component: "h1",
36
- gutterBottom: true,
37
- variant: "h4"
38
- }, t('security.success.title')), /*#__PURE__*/_react["default"].createElement(_material.Typography, {
39
- color: "text.secondary",
40
- paragraph: true,
41
- variant: "body1"
42
- }, message), /*#__PURE__*/_react["default"].createElement(_material.Button, {
43
- color: "primary",
44
- onClick: handleClose,
45
- sx: {
46
- mt: 2
47
- },
48
- variant: "contained"
49
- }, t('security.success.submit')))));
1
+ import e from "../../layouts/Security/Dialog.js";
2
+ import { SecurityContainer as t, SecurityForm as n } from "./styles.js";
3
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import "react";
5
+ import { useTranslation as a } from "react-i18next";
6
+ import { useLocation as o } from "react-router";
7
+ import { Button as s, Typography as c } from "@mui/material";
8
+ import l from "@mui/icons-material/CheckCircle";
9
+ //#region src/sections/Security/Success.tsx
10
+ var u = /* @__PURE__ */ function(e) {
11
+ return e.Login = "Login", e.ChangePassword = "ChangePassword", e.AddUser = "AddUser", e.Success = "Success", e;
12
+ }({}), d = () => {
13
+ let { t: u } = a(), d = o(), f = new URLSearchParams(d.search).get("messageType"), p = u(f ? `security.success.message${f}` : "security.success.messageSuccess");
14
+ return /* @__PURE__ */ r(e, { children: /* @__PURE__ */ r(t, { children: /* @__PURE__ */ i(n, { children: [
15
+ /* @__PURE__ */ r(l, { color: "success" }),
16
+ /* @__PURE__ */ r(c, {
17
+ component: "h1",
18
+ gutterBottom: !0,
19
+ variant: "h4",
20
+ children: u("security.success.title")
21
+ }),
22
+ /* @__PURE__ */ r(c, {
23
+ color: "text.secondary",
24
+ paragraph: !0,
25
+ variant: "body1",
26
+ children: p
27
+ }),
28
+ /* @__PURE__ */ r(s, {
29
+ color: "primary",
30
+ onClick: () => {
31
+ window.location.href = "/";
32
+ },
33
+ sx: { mt: 2 },
34
+ variant: "contained",
35
+ children: u("security.success.submit")
36
+ })
37
+ ] }) }) });
50
38
  };
51
- var _default = exports["default"] = Success;
39
+ //#endregion
40
+ export { u as MessageType, d as default };
41
+
52
42
  //# sourceMappingURL=Success.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Success.js","names":["_CheckCircle","_interopRequireDefault","require","_material","_react","_reactI18next","_reactRouter","_Dialog","_styles","e","__esModule","MessageType","exports","Success","_useTranslation","useTranslation","t","location","useLocation","queryParams","URLSearchParams","search","messageType","get","message","concat","handleClose","window","href","createElement","SecurityContainer","SecurityForm","color","Typography","component","gutterBottom","variant","paragraph","Button","onClick","sx","mt","_default"],"sources":["../../../src/sections/Security/Success.tsx"],"sourcesContent":["import CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport { Button, Typography } from '@mui/material';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useLocation } from 'react-router';\n\nimport SecurityLayout from '../../layouts/Security/Dialog';\nimport { SecurityContainer, SecurityForm } from './styles';\n\nexport enum MessageType {\n Login = 'Login',\n ChangePassword = 'ChangePassword',\n AddUser = 'AddUser',\n Success = 'Success',\n}\n\nconst Success: React.FC = () => {\n const { t } = useTranslation();\n const location = useLocation();\n const queryParams = new URLSearchParams(location.search);\n const messageType = queryParams.get('messageType') as MessageType;\n const message = !messageType\n ? t('security.success.messageSuccess')\n : t(`security.success.message${messageType}`);\n\n const handleClose = () => {\n window.location.href = '/';\n };\n\n return (\n <SecurityLayout>\n <SecurityContainer>\n <SecurityForm>\n <CheckCircleIcon color=\"success\" />\n <Typography component=\"h1\" gutterBottom={true} variant=\"h4\">\n {t('security.success.title')}\n </Typography>\n <Typography color=\"text.secondary\" paragraph={true} variant=\"body1\">\n {message}\n </Typography>\n <Button color=\"primary\" onClick={handleClose} sx={{ mt: 2 }} variant=\"contained\">\n {t('security.success.submit')}\n </Button>\n </SecurityForm>\n </SecurityContainer>\n </SecurityLayout>\n );\n};\n\nexport default Success;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAA2D,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,gBAAAA,CAAA;AAAA,IAE/CE,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAOvB,IAAME,OAAiB,GAAG,SAApBA,OAAiBA,CAAA,EAAS;EAC9B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;IAAE,CAAE;IAACL,OAAO,EAAC;EAAW,GAC7EpB,CAAC,CAAC,yBAAyB,CACtB,CACI,CACG,CACL,CAAC;AAErB,CAAC;AAAC,IAAA0B,QAAA,GAAA9B,OAAA,cAEaC,OAAO","ignoreList":[]}
1
+ {"version":3,"file":"Success.js","names":["CheckCircleIcon","Button","Typography","React","useTranslation","useLocation","SecurityLayout","SecurityContainer","SecurityForm","MessageType","Login","ChangePassword","AddUser","Success","FC","t","location","queryParams","URLSearchParams","search","messageType","get","message","handleClose","window","href","mt"],"sources":["../../../src/sections/Security/Success.tsx"],"sourcesContent":["import CheckCircleIcon from '@mui/icons-material/CheckCircle';\nimport { Button, Typography } from '@mui/material';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useLocation } from 'react-router';\n\nimport SecurityLayout from '../../layouts/Security/Dialog';\nimport { SecurityContainer, SecurityForm } from './styles';\n\nexport enum MessageType {\n Login = 'Login',\n ChangePassword = 'ChangePassword',\n AddUser = 'AddUser',\n Success = 'Success',\n}\n\nconst Success: React.FC = () => {\n const { t } = useTranslation();\n const location = useLocation();\n const queryParams = new URLSearchParams(location.search);\n const messageType = queryParams.get('messageType') as MessageType;\n const message = !messageType\n ? t('security.success.messageSuccess')\n : t(`security.success.message${messageType}`);\n\n const handleClose = () => {\n window.location.href = '/';\n };\n\n return (\n <SecurityLayout>\n <SecurityContainer>\n <SecurityForm>\n <CheckCircleIcon color=\"success\" />\n <Typography component=\"h1\" gutterBottom={true} variant=\"h4\">\n {t('security.success.title')}\n </Typography>\n <Typography color=\"text.secondary\" paragraph={true} variant=\"body1\">\n {message}\n </Typography>\n <Button color=\"primary\" onClick={handleClose} sx={{ mt: 2 }} variant=\"contained\">\n {t('security.success.submit')}\n </Button>\n </SecurityForm>\n </SecurityContainer>\n </SecurityLayout>\n );\n};\n\nexport default Success;\n"],"mappings":";;;;;;;;;AASA,IAAYS,IAAL,yBAAA,GAAA;QACLC,EAAAA,QAAAA,SACAC,EAAAA,iBAAAA,kBACAC,EAAAA,UAAAA,WACAC,EAAAA,UAAAA;KACF,EAEMA,UAA0B;CAC9B,IAAM,EAAEE,SAAMX,GAAgB,EACxBY,IAAWX,GAAa,EAExBe,IADc,IAAIF,gBAAgBF,EAASG,OAAO,CACxBE,IAAI,cAAc,EAC5CC,IAEFP,EAFaK,IAEX,2BAA2BA,MAD3B,kCACyC;AAM/C,QACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAA;EACE,kBAAC,GAAD,EAAiB,OAAM,WAAS,CAAA;EAChC,kBAAC,GAAD;GAAY,WAAU;GAAK,cAAc;GAAM,SAAQ;aACpDL,EAAE,yBAAyB;GAClB,CAAA;EACZ,kBAAC,GAAD;GAAY,OAAM;GAAiB,WAAW;GAAM,SAAQ;aACzDO;GACS,CAAA;EACZ,kBAAC,GAAD;GAAQ,OAAM;GAAU,eAfN;AACxBE,WAAOR,SAASS,OAAO;;GAc6B,IAAI,EAAEC,IAAI,GAAG;GAAE,SAAQ;aAClEX,EAAE,0BAA0B;GACvB,CAAA;EACI,EAAA,CAAA,EACG,CAAA,EACJ,CAAA"}
@@ -1,35 +1,4 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "AddUser", {
7
- enumerable: true,
8
- get: function get() {
9
- return _AddUser["default"];
10
- }
11
- });
12
- Object.defineProperty(exports, "ChangePassword", {
13
- enumerable: true,
14
- get: function get() {
15
- return _ChangePassword["default"];
16
- }
17
- });
18
- Object.defineProperty(exports, "Login", {
19
- enumerable: true,
20
- get: function get() {
21
- return _Login["default"];
22
- }
23
- });
24
- Object.defineProperty(exports, "Success", {
25
- enumerable: true,
26
- get: function get() {
27
- return _Success["default"];
28
- }
29
- });
30
- var _Login = _interopRequireDefault(require("./Login"));
31
- var _Success = _interopRequireDefault(require("./Success"));
32
- var _AddUser = _interopRequireDefault(require("./AddUser"));
33
- var _ChangePassword = _interopRequireDefault(require("./ChangePassword"));
34
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
35
- //# sourceMappingURL=index.js.map
1
+ import "./Success.js";
2
+ import "./Login.js";
3
+ import "./AddUser.js";
4
+ import "./ChangePassword.js";
@@ -1,40 +1,27 @@
1
- "use strict";
1
+ import { styled as e } from "@mui/material/styles";
2
+ import { Box as t, TextField as n } from "@mui/material";
3
+ //#region src/sections/Security/styles.ts
4
+ var r = e(t)(({ theme: e }) => ({
5
+ display: "flex",
6
+ flexDirection: "column",
7
+ alignItems: "center",
8
+ justifyContent: "center",
9
+ minHeight: "100%",
10
+ padding: e.spacing(2),
11
+ backgroundColor: e.palette.background.default
12
+ })), i = e(t)(({ theme: e }) => ({
13
+ width: "100%",
14
+ maxWidth: 420,
15
+ padding: e.spacing(4),
16
+ backgroundColor: e.palette.background.paper,
17
+ borderRadius: e.shape.borderRadius,
18
+ boxShadow: e.shadows[3]
19
+ })), a = e(n)(({ theme: e }) => ({
20
+ width: "100%",
21
+ marginTop: e.spacing(1),
22
+ marginBottom: e.spacing(1)
23
+ }));
24
+ //#endregion
25
+ export { r as SecurityContainer, i as SecurityForm, a as SecurityTextField };
2
26
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SecurityTextField = exports.SecurityForm = exports.SecurityContainer = void 0;
7
- var _material = require("@mui/material");
8
- var _styles = require("@mui/material/styles");
9
- var SecurityContainer = exports.SecurityContainer = (0, _styles.styled)(_material.Box)(function (_ref) {
10
- var theme = _ref.theme;
11
- return {
12
- display: 'flex',
13
- flexDirection: 'column',
14
- alignItems: 'center',
15
- justifyContent: 'center',
16
- minHeight: '100%',
17
- padding: theme.spacing(2),
18
- backgroundColor: theme.palette.background["default"]
19
- };
20
- });
21
- var SecurityForm = exports.SecurityForm = (0, _styles.styled)(_material.Box)(function (_ref2) {
22
- var theme = _ref2.theme;
23
- return {
24
- width: '100%',
25
- maxWidth: 420,
26
- padding: theme.spacing(4),
27
- backgroundColor: theme.palette.background.paper,
28
- borderRadius: theme.shape.borderRadius,
29
- boxShadow: theme.shadows[3]
30
- };
31
- });
32
- var SecurityTextField = exports.SecurityTextField = (0, _styles.styled)(_material.TextField)(function (_ref3) {
33
- var theme = _ref3.theme;
34
- return {
35
- width: '100%',
36
- marginTop: theme.spacing(1),
37
- marginBottom: theme.spacing(1)
38
- };
39
- });
40
27
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["_material","require","_styles","SecurityContainer","exports","styled","Box","_ref","theme","display","flexDirection","alignItems","justifyContent","minHeight","padding","spacing","backgroundColor","palette","background","SecurityForm","_ref2","width","maxWidth","paper","borderRadius","shape","boxShadow","shadows","SecurityTextField","TextField","_ref3","marginTop","marginBottom"],"sources":["../../../src/sections/Security/styles.ts"],"sourcesContent":["import { Box, TextField } from '@mui/material';\nimport { styled } from '@mui/material/styles';\n\nexport const SecurityContainer = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: '100%',\n padding: theme.spacing(2),\n backgroundColor: theme.palette.background.default,\n}));\n\nexport const SecurityForm = styled(Box)(({ theme }) => ({\n width: '100%',\n maxWidth: 420,\n padding: theme.spacing(4),\n backgroundColor: theme.palette.background.paper,\n borderRadius: theme.shape.borderRadius,\n boxShadow: theme.shadows[3],\n}));\n\nexport const SecurityTextField = styled(TextField)(({ theme }) => ({\n width: '100%',\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n}));\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAEO,IAAME,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,cAAM,EAACC,aAAG,CAAC,CAAC,UAAAC,IAAA;EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;EAAA,OAAQ;IAC3DC,OAAO,EAAE,MAAM;IACfC,aAAa,EAAE,QAAQ;IACvBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,SAAS,EAAE,MAAM;IACjBC,OAAO,EAAEN,KAAK,CAACO,OAAO,CAAC,CAAC,CAAC;IACzBC,eAAe,EAAER,KAAK,CAACS,OAAO,CAACC,UAAU;EAC3C,CAAC;AAAA,CAAC,CAAC;AAEI,IAAMC,YAAY,GAAAf,OAAA,CAAAe,YAAA,GAAG,IAAAd,cAAM,EAACC,aAAG,CAAC,CAAC,UAAAc,KAAA;EAAA,IAAGZ,KAAK,GAAAY,KAAA,CAALZ,KAAK;EAAA,OAAQ;IACtDa,KAAK,EAAE,MAAM;IACbC,QAAQ,EAAE,GAAG;IACbR,OAAO,EAAEN,KAAK,CAACO,OAAO,CAAC,CAAC,CAAC;IACzBC,eAAe,EAAER,KAAK,CAACS,OAAO,CAACC,UAAU,CAACK,KAAK;IAC/CC,YAAY,EAAEhB,KAAK,CAACiB,KAAK,CAACD,YAAY;IACtCE,SAAS,EAAElB,KAAK,CAACmB,OAAO,CAAC,CAAC;EAC5B,CAAC;AAAA,CAAC,CAAC;AAEI,IAAMC,iBAAiB,GAAAxB,OAAA,CAAAwB,iBAAA,GAAG,IAAAvB,cAAM,EAACwB,mBAAS,CAAC,CAAC,UAAAC,KAAA;EAAA,IAAGtB,KAAK,GAAAsB,KAAA,CAALtB,KAAK;EAAA,OAAQ;IACjEa,KAAK,EAAE,MAAM;IACbU,SAAS,EAAEvB,KAAK,CAACO,OAAO,CAAC,CAAC,CAAC;IAC3BiB,YAAY,EAAExB,KAAK,CAACO,OAAO,CAAC,CAAC;EAC/B,CAAC;AAAA,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"styles.js","names":["Box","TextField","styled","SecurityContainer","theme","display","flexDirection","alignItems","justifyContent","minHeight","padding","spacing","backgroundColor","palette","background","default","SecurityForm","width","maxWidth","paper","borderRadius","shape","boxShadow","shadows","SecurityTextField","marginTop","marginBottom"],"sources":["../../../src/sections/Security/styles.ts"],"sourcesContent":["import { Box, TextField } from '@mui/material';\nimport { styled } from '@mui/material/styles';\n\nexport const SecurityContainer = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: '100%',\n padding: theme.spacing(2),\n backgroundColor: theme.palette.background.default,\n}));\n\nexport const SecurityForm = styled(Box)(({ theme }) => ({\n width: '100%',\n maxWidth: 420,\n padding: theme.spacing(4),\n backgroundColor: theme.palette.background.paper,\n borderRadius: theme.shape.borderRadius,\n boxShadow: theme.shadows[3],\n}));\n\nexport const SecurityTextField = styled(TextField)(({ theme }) => ({\n width: '100%',\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n}));\n"],"mappings":";;;AAGA,IAAaG,IAAoBD,EAAOF,EAAI,EAAE,EAAEI,gBAAa;CAC3DC,SAAS;CACTC,eAAe;CACfC,YAAY;CACZC,gBAAgB;CAChBC,WAAW;CACXC,SAASN,EAAMO,QAAQ,EAAE;CACzBC,iBAAiBR,EAAMS,QAAQC,WAAWC;CAC3C,EAAE,EAEUC,IAAed,EAAOF,EAAI,EAAE,EAAEI,gBAAa;CACtDa,OAAO;CACPC,UAAU;CACVR,SAASN,EAAMO,QAAQ,EAAE;CACzBC,iBAAiBR,EAAMS,QAAQC,WAAWK;CAC1CC,cAAchB,EAAMiB,MAAMD;CAC1BE,WAAWlB,EAAMmB,QAAQ;CAC1B,EAAE,EAEUC,IAAoBtB,EAAOD,EAAU,EAAE,EAAEG,gBAAa;CACjEa,OAAO;CACPQ,WAAWrB,EAAMO,QAAQ,EAAE;CAC3Be,cAActB,EAAMO,QAAQ,EAAC;CAC9B,EAAE"}
@@ -1,60 +1,17 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getSecurityUrlParams = getSecurityUrlParams;
7
- exports.validateCredentials = void 0;
8
- var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
9
- var _utils = require("../../utils");
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
- function getSecurityUrlParams(location) {
12
- var queryParams = new URLSearchParams(location.search);
13
-
14
- // Get next parameter to match v1 URLs
15
- var next = queryParams.get('next') || '';
16
- if (next.length > 0 && (!next.startsWith(_utils.Route.LOGIN_API) || !next.match(/\/[-0-9a-f]{36}$/))) {
17
- next = '';
18
- }
19
-
20
- // Ignore user parameter if it does not match expected format (prevent XSS attacks)
21
- var user = queryParams.get('user') || '';
22
- if (user.length > 0 && !user.match(/^[a-zA-Z0-9-_]{1,255}$/)) {
23
- user = '';
24
- }
25
- return {
26
- next: next,
27
- user: user
28
- };
1
+ import { Route as e } from "../../utils/routes.js";
2
+ import "../../utils/index.js";
3
+ import "lodash/isEmpty";
4
+ //#region src/sections/Security/utils.ts
5
+ function t(t) {
6
+ let n = new URLSearchParams(t.search), r = n.get("next") || "";
7
+ r.length > 0 && (!r.startsWith(e.LOGIN_API) || !r.match(/\/[-0-9a-f]{36}$/)) && (r = "");
8
+ let i = n.get("user") || "";
9
+ return i.length > 0 && !i.match(/^[a-zA-Z0-9-_]{1,255}$/) && (i = ""), {
10
+ next: r,
11
+ user: i
12
+ };
29
13
  }
30
- var validateCredentials = exports.validateCredentials = function validateCredentials(username, password, t, dispatchAction) {
31
- if (!username || !password || (0, _isEmpty["default"])(username) || (0, _isEmpty["default"])(password)) {
32
- dispatchAction({
33
- type: 'error',
34
- description: t('security.error.username-or-password-cant-be-empty')
35
- });
36
- return false;
37
- }
38
- if (username.length < 2) {
39
- dispatchAction({
40
- type: 'error',
41
- description: t('security.error.username-min-length', {
42
- length: 2
43
- })
44
- });
45
- return false;
46
- }
47
-
48
- // Validate username contains only url-safe characters
49
- if (!username.match(/^[-a-zA-Z0-9_.!~*'()@]+$/)) {
50
- dispatchAction({
51
- type: 'error',
52
- description: t('security.error.username-must-be-url-safe')
53
- });
54
- return false;
55
- }
14
+ //#endregion
15
+ export { t as getSecurityUrlParams };
56
16
 
57
- // Note: password rules should be checked in auth plugin
58
- return true;
59
- };
60
17
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["_isEmpty","_interopRequireDefault","require","_utils","e","__esModule","getSecurityUrlParams","location","queryParams","URLSearchParams","search","next","get","length","startsWith","Route","LOGIN_API","match","user","validateCredentials","exports","username","password","t","dispatchAction","isEmpty","type","description"],"sources":["../../../src/sections/Security/utils.ts"],"sourcesContent":["import isEmpty from 'lodash/isEmpty';\n\nimport { Route } from '../../utils';\n\nexport interface SecurityUrlParams {\n readonly next: string;\n readonly user: string;\n}\n\nexport interface LocationLike {\n readonly search: string;\n}\n\nexport function getSecurityUrlParams(location: LocationLike): SecurityUrlParams {\n const queryParams = new URLSearchParams(location.search);\n\n // Get next parameter to match v1 URLs\n let next = queryParams.get('next') || '';\n if (next.length > 0 && (!next.startsWith(Route.LOGIN_API) || !next.match(/\\/[-0-9a-f]{36}$/))) {\n next = '';\n }\n\n // Ignore user parameter if it does not match expected format (prevent XSS attacks)\n let user = queryParams.get('user') || '';\n if (user.length > 0 && !user.match(/^[a-zA-Z0-9-_]{1,255}$/)) {\n user = '';\n }\n\n return { next, user };\n}\n\nexport interface TranslationFunction {\n (key: string, options?: Record<string, unknown>): string;\n}\n\nexport interface DispatchAction {\n (payload: { type: string; description: string }): void;\n}\n\nexport const validateCredentials = (\n username: string,\n password: string,\n t: TranslationFunction,\n dispatchAction: DispatchAction\n): boolean => {\n if (!username || !password || isEmpty(username) || isEmpty(password)) {\n dispatchAction({\n type: 'error',\n description: t('security.error.username-or-password-cant-be-empty'),\n });\n return false;\n }\n\n if (username.length < 2) {\n dispatchAction({\n type: 'error',\n description: t('security.error.username-min-length', { length: 2 }),\n });\n return false;\n }\n\n // Validate username contains only url-safe characters\n if (!username.match(/^[-a-zA-Z0-9_.!~*'()@]+$/)) {\n dispatchAction({\n type: 'error',\n description: t('security.error.username-must-be-url-safe'),\n });\n return false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,WAAW,EAAEJ,CAAC,CAAC,mDAAmD;IACpE,CAAC,CAAC;IACF,OAAO,KAAK;EACd;EAEA,IAAIF,QAAQ,CAACR,MAAM,GAAG,CAAC,EAAE;IACvBW,cAAc,CAAC;MACbE,IAAI,EAAE,OAAO;MACbC,WAAW,EAAEJ,CAAC,CAAC,oCAAoC,EAAE;QAAEV,MAAM,EAAE;MAAE,CAAC;IACpE,CAAC,CAAC;IACF,OAAO,KAAK;EACd;;EAEA;EACA,IAAI,CAACQ,QAAQ,CAACJ,KAAK,CAAC,0BAA0B,CAAC,EAAE;IAC/CO,cAAc,CAAC;MACbE,IAAI,EAAE,OAAO;MACbC,WAAW,EAAEJ,CAAC,CAAC,0CAA0C;IAC3D,CAAC,CAAC;IACF,OAAO,KAAK;EACd;;EAEA;EACA,OAAO,IAAI;AACb,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"utils.js","names":["isEmpty","Route","SecurityUrlParams","next","user","LocationLike","search","getSecurityUrlParams","location","queryParams","URLSearchParams","get","length","startsWith","LOGIN_API","match","TranslationFunction","key","options","Record","DispatchAction","payload","type","description","validateCredentials","username","password","t","dispatchAction"],"sources":["../../../src/sections/Security/utils.ts"],"sourcesContent":["import isEmpty from 'lodash/isEmpty';\n\nimport { Route } from '../../utils';\n\nexport interface SecurityUrlParams {\n readonly next: string;\n readonly user: string;\n}\n\nexport interface LocationLike {\n readonly search: string;\n}\n\nexport function getSecurityUrlParams(location: LocationLike): SecurityUrlParams {\n const queryParams = new URLSearchParams(location.search);\n\n // Get next parameter to match v1 URLs\n let next = queryParams.get('next') || '';\n if (next.length > 0 && (!next.startsWith(Route.LOGIN_API) || !next.match(/\\/[-0-9a-f]{36}$/))) {\n next = '';\n }\n\n // Ignore user parameter if it does not match expected format (prevent XSS attacks)\n let user = queryParams.get('user') || '';\n if (user.length > 0 && !user.match(/^[a-zA-Z0-9-_]{1,255}$/)) {\n user = '';\n }\n\n return { next, user };\n}\n\nexport interface TranslationFunction {\n (key: string, options?: Record<string, unknown>): string;\n}\n\nexport interface DispatchAction {\n (payload: { type: string; description: string }): void;\n}\n\nexport const validateCredentials = (\n username: string,\n password: string,\n t: TranslationFunction,\n dispatchAction: DispatchAction\n): boolean => {\n if (!username || !password || isEmpty(username) || isEmpty(password)) {\n dispatchAction({\n type: 'error',\n description: t('security.error.username-or-password-cant-be-empty'),\n });\n return false;\n }\n\n if (username.length < 2) {\n dispatchAction({\n type: 'error',\n description: t('security.error.username-min-length', { length: 2 }),\n });\n return false;\n }\n\n // Validate username contains only url-safe characters\n if (!username.match(/^[-a-zA-Z0-9_.!~*'()@]+$/)) {\n dispatchAction({\n type: 'error',\n description: t('security.error.username-must-be-url-safe'),\n });\n return false;\n }\n\n // Note: password rules should be checked in auth plugin\n return true;\n};\n"],"mappings":";;;;AAaA,SAAgBO,EAAqBC,GAA2C;CAC9E,IAAMC,IAAc,IAAIC,gBAAgBF,EAASF,OAAO,EAGpDH,IAAOM,EAAYE,IAAI,OAAO,IAAI;AACtC,CAAIR,EAAKS,SAAS,MAAM,CAACT,EAAKU,WAAWZ,EAAMa,UAAU,IAAI,CAACX,EAAKY,MAAM,mBAAmB,MAC1FZ,IAAO;CAIT,IAAIC,IAAOK,EAAYE,IAAI,OAAO,IAAI;AAKtC,QAJIP,EAAKQ,SAAS,KAAK,CAACR,EAAKW,MAAM,yBAAyB,KAC1DX,IAAO,KAGF;EAAED;EAAMC;EAAM"}
@@ -1,92 +1,87 @@
1
- "use strict";
2
-
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = void 0;
8
- var _Paper = _interopRequireDefault(require("@mui/material/Paper"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _ActionBar = _interopRequireDefault(require("../../components/ActionBar"));
11
- var _Author = _interopRequireDefault(require("../../components/Author"));
12
- var _Developers = _interopRequireWildcard(require("../../components/Developers"));
13
- var _Distribution = _interopRequireDefault(require("../../components/Distribution"));
14
- var _Engines = _interopRequireDefault(require("../../components/Engines"));
15
- var _FundButton = _interopRequireDefault(require("../../components/FundButton"));
16
- var _Install = _interopRequireDefault(require("../../components/Install"));
17
- var _Keywords = _interopRequireDefault(require("../../components/Keywords"));
18
- var _Repository = _interopRequireDefault(require("../../components/Repository"));
19
- var _SideBarTitle = _interopRequireDefault(require("../../components/SideBarTitle"));
20
- var _providers = require("../../providers");
21
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
22
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
23
- var getModuleTypes = function getModuleTypes(manifest) {
24
- if (!manifest.latest) return [];
25
- var moduleTypes = [manifest.latest.type || 'commonjs'];
26
- if (manifest.latest.main) {
27
- moduleTypes.push('commonjs');
28
- }
29
- return Array.from(new Set(moduleTypes));
30
- };
31
- var DetailSidebar = function DetailSidebar() {
32
- var _packageMeta$latest, _packageMeta$latest2;
33
- var _useVersion = (0, _providers.useVersion)(),
34
- packageMeta = _useVersion.packageMeta,
35
- packageName = _useVersion.packageName,
36
- packageVersion = _useVersion.packageVersion;
37
- var _useConfig = (0, _providers.useConfig)(),
38
- configOptions = _useConfig.configOptions;
39
- var version = packageVersion || (packageMeta === null || packageMeta === void 0 ? void 0 : packageMeta.latest.version) || '';
40
- var time = packageMeta !== null && packageMeta !== void 0 && packageMeta.time ? packageMeta.time[version] : '';
41
- if (!packageMeta || !packageName) {
42
- return null;
43
- }
44
- return /*#__PURE__*/_react["default"].createElement(_Paper["default"], {
45
- "data-testid": "sidebar",
46
- sx: {
47
- position: 'sticky',
48
- top: 0,
49
- p: 2,
50
- ml: {
51
- xs: 0,
52
- md: 2
53
- }
54
- }
55
- }, /*#__PURE__*/_react["default"].createElement(_SideBarTitle["default"], {
56
- description: (_packageMeta$latest = packageMeta.latest) === null || _packageMeta$latest === void 0 ? void 0 : _packageMeta$latest.description,
57
- hasTypes: typeof ((_packageMeta$latest2 = packageMeta.latest) === null || _packageMeta$latest2 === void 0 ? void 0 : _packageMeta$latest2.types) === 'string',
58
- isLatest: typeof packageVersion === 'undefined',
59
- moduleTypes: getModuleTypes(packageMeta),
60
- packageName: packageName,
61
- time: time,
62
- version: version
63
- }), /*#__PURE__*/_react["default"].createElement(_providers.DownloadProvider, null, /*#__PURE__*/_react["default"].createElement(_ActionBar["default"], {
64
- packageMeta: packageMeta,
65
- showDownloadTarball: configOptions.showDownloadTarball,
66
- showRaw: configOptions.showRaw
67
- })), /*#__PURE__*/_react["default"].createElement(_FundButton["default"], {
68
- packageMeta: packageMeta
69
- }), /*#__PURE__*/_react["default"].createElement(_Install["default"], {
70
- configOptions: configOptions,
71
- packageMeta: packageMeta,
72
- packageName: packageName
73
- }), /*#__PURE__*/_react["default"].createElement(_Repository["default"], {
74
- packageMeta: packageMeta
75
- }), /*#__PURE__*/_react["default"].createElement(_Engines["default"], {
76
- packageMeta: packageMeta
77
- }), /*#__PURE__*/_react["default"].createElement(_Distribution["default"], {
78
- packageMeta: packageMeta
79
- }), /*#__PURE__*/_react["default"].createElement(_Keywords["default"], {
80
- packageMeta: packageMeta
81
- }), /*#__PURE__*/_react["default"].createElement(_Author["default"], {
82
- packageMeta: packageMeta
83
- }), /*#__PURE__*/_react["default"].createElement(_Developers["default"], {
84
- packageMeta: packageMeta,
85
- type: _Developers.DeveloperType.MAINTAINERS
86
- }), /*#__PURE__*/_react["default"].createElement(_Developers["default"], {
87
- packageMeta: packageMeta,
88
- type: _Developers.DeveloperType.CONTRIBUTORS
89
- }));
1
+ import { useConfig as e } from "../../providers/AppConfigurationProvider/AppConfigurationProvider.js";
2
+ import { useVersion as t } from "../../providers/VersionProvider/VersionProvider.js";
3
+ import { DownloadProvider as n } from "../../providers/DownloadProvider/DownloadProvider.js";
4
+ import "../../providers/index.js";
5
+ import r from "../../components/ActionBar/ActionBar.js";
6
+ import "../../components/ActionBar/index.js";
7
+ import i from "../../components/Author/Author.js";
8
+ import "../../components/Author/index.js";
9
+ import a from "../../components/Developers/Developers.js";
10
+ import { DeveloperType as o } from "../../components/Developers/DeveloperType.js";
11
+ import "../../components/Developers/index.js";
12
+ import s from "../../components/Distribution/Dist.js";
13
+ import "../../components/Distribution/index.js";
14
+ import c from "../../components/Engines/Engines.js";
15
+ import "../../components/Engines/index.js";
16
+ import l from "../../components/FundButton/FundButton.js";
17
+ import "../../components/FundButton/index.js";
18
+ import u from "../../components/Install/Install.js";
19
+ import "../../components/Install/index.js";
20
+ import d from "../../components/Keywords/Keywords.js";
21
+ import "../../components/Keywords/index.js";
22
+ import f from "../../components/SideBarTitle/SideBarTitle.js";
23
+ import "../../components/SideBarTitle/index.js";
24
+ import p from "../../components/Repository/Repository.js";
25
+ import "../../components/Repository/index.js";
26
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
27
+ import "react";
28
+ import g from "@mui/material/Paper";
29
+ //#region src/sections/SideBar/Sidebar.tsx
30
+ var _ = (e) => {
31
+ if (!e.latest) return [];
32
+ let t = [e.latest.type || "commonjs"];
33
+ return e.latest.main && t.push("commonjs"), Array.from(new Set(t));
34
+ }, v = () => {
35
+ let { packageMeta: v, packageName: y, packageVersion: b } = t(), { configOptions: x } = e(), S = b || v?.latest.version || "", C = v?.time ? v.time[S] : "";
36
+ return !v || !y ? null : /* @__PURE__ */ h(g, {
37
+ "data-testid": "sidebar",
38
+ sx: {
39
+ position: "sticky",
40
+ top: 0,
41
+ p: 2,
42
+ ml: {
43
+ xs: 0,
44
+ md: 2
45
+ }
46
+ },
47
+ children: [
48
+ /* @__PURE__ */ m(f, {
49
+ description: v.latest?.description,
50
+ hasTypes: typeof v.latest?.types == "string",
51
+ isLatest: b === void 0,
52
+ moduleTypes: _(v),
53
+ packageName: y,
54
+ time: C,
55
+ version: S
56
+ }),
57
+ /* @__PURE__ */ m(n, { children: /* @__PURE__ */ m(r, {
58
+ packageMeta: v,
59
+ showDownloadTarball: x.showDownloadTarball,
60
+ showRaw: x.showRaw
61
+ }) }),
62
+ /* @__PURE__ */ m(l, { packageMeta: v }),
63
+ /* @__PURE__ */ m(u, {
64
+ configOptions: x,
65
+ packageMeta: v,
66
+ packageName: y
67
+ }),
68
+ /* @__PURE__ */ m(p, { packageMeta: v }),
69
+ /* @__PURE__ */ m(c, { packageMeta: v }),
70
+ /* @__PURE__ */ m(s, { packageMeta: v }),
71
+ /* @__PURE__ */ m(d, { packageMeta: v }),
72
+ /* @__PURE__ */ m(i, { packageMeta: v }),
73
+ /* @__PURE__ */ m(a, {
74
+ packageMeta: v,
75
+ type: o.MAINTAINERS
76
+ }),
77
+ /* @__PURE__ */ m(a, {
78
+ packageMeta: v,
79
+ type: o.CONTRIBUTORS
80
+ })
81
+ ]
82
+ });
90
83
  };
91
- var _default = exports["default"] = DetailSidebar;
84
+ //#endregion
85
+ export { v as default };
86
+
92
87
  //# sourceMappingURL=Sidebar.js.map