@verdaccio/ui-theme 6.0.0-6-next.9 → 6.0.0-6-next.13

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 (323) hide show
  1. package/.babelrc +1 -1
  2. package/.eslintrc +0 -15
  3. package/CHANGELOG.md +61 -0
  4. package/jest/api/packages.json +42 -0
  5. package/jest/jest.config.js +2 -2
  6. package/jest/server-handlers.ts +9 -0
  7. package/jest/server.ts +6 -0
  8. package/jest/setup-env.ts +18 -0
  9. package/jest/setup.ts +2 -7
  10. package/jest/unit/components/__mocks__/token.ts +0 -1
  11. package/jest/unit/components/store/login.ts +1 -0
  12. package/package.json +43 -33
  13. package/src/App/App.test.tsx +75 -51
  14. package/src/App/App.tsx +7 -42
  15. package/src/App/AppRoute.tsx +3 -16
  16. package/src/App/Footer/Footer.test.tsx +0 -1
  17. package/src/App/Footer/Footer.tsx +35 -22
  18. package/src/App/Footer/__snapshots__/Footer.test.tsx.snap +208 -302
  19. package/src/App/Footer/styles.ts +2 -3
  20. package/src/App/Header/Header.test.tsx +53 -61
  21. package/src/App/Header/Header.tsx +13 -24
  22. package/src/App/Header/HeaderGreetings.tsx +0 -1
  23. package/src/App/Header/HeaderLeft.tsx +0 -1
  24. package/src/App/Header/HeaderMenu.tsx +6 -6
  25. package/src/App/Header/HeaderRight.tsx +1 -2
  26. package/src/App/Header/HeaderToolTip.tsx +0 -1
  27. package/src/App/Header/HeaderToolTipIcon.tsx +10 -10
  28. package/src/App/Header/LanguageSwitch.tsx +17 -79
  29. package/src/App/Header/LoginDialog/LoginDialog.test.tsx +25 -35
  30. package/src/App/Header/LoginDialog/LoginDialog.tsx +28 -46
  31. package/src/App/Header/LoginDialog/LoginDialogCloseButton.tsx +1 -2
  32. package/src/App/Header/LoginDialog/LoginDialogForm.tsx +0 -1
  33. package/src/App/Header/LoginDialog/LoginDialogFormError.tsx +1 -2
  34. package/src/App/Header/LoginDialog/LoginDialogHeader.tsx +4 -4
  35. package/src/App/Header/RegistryInfoContent/RegistryInfoContent.test.tsx +1 -3
  36. package/src/App/Header/RegistryInfoContent/RegistryInfoContent.tsx +9 -10
  37. package/src/App/Header/RegistryInfoDialog/RegistryInfoDialog.tsx +1 -2
  38. package/src/App/Header/RegistryInfoDialog/styles.ts +0 -1
  39. package/src/App/Header/Search/Search.test.tsx +48 -43
  40. package/src/App/Header/Search/Search.tsx +23 -108
  41. package/src/App/Header/Search/__snapshots__/Search.test.tsx.snap +392 -28
  42. package/src/App/Header/styles.ts +2 -3
  43. package/src/App/index.ts +0 -1
  44. package/src/App/utils/loadable.tsx +3 -1
  45. package/src/components/ActionBar/ActionBar.test.tsx +13 -14
  46. package/src/components/ActionBar/ActionBar.tsx +0 -2
  47. package/src/components/ActionBar/ActionBarAction.tsx +11 -14
  48. package/src/components/ActionBar/__snapshots__/ActionBar.test.tsx.snap +198 -53
  49. package/src/components/AppBar.tsx +1 -1
  50. package/src/components/Author/Author.test.tsx +1 -4
  51. package/src/components/Author/Author.tsx +2 -4
  52. package/src/components/Author/__snapshots__/Author.test.tsx.snap +804 -48
  53. package/src/components/Author/styles.ts +0 -1
  54. package/src/components/AutoComplete/AutoComplete.tsx +85 -163
  55. package/src/components/AutoComplete/AutoCompleteV2.tsx +8 -10
  56. package/src/components/AutoComplete/styles.tsx +0 -15
  57. package/src/components/Avatar.tsx +1 -1
  58. package/src/components/Box.tsx +1 -1
  59. package/src/components/Button.tsx +1 -1
  60. package/src/components/Card.tsx +1 -1
  61. package/src/components/CardActions.tsx +1 -1
  62. package/src/components/CardContent.tsx +1 -1
  63. package/src/components/Chip.tsx +1 -1
  64. package/src/components/CircularProgress.tsx +2 -2
  65. package/src/components/CopyToClipBoard.tsx +2 -3
  66. package/src/components/Dialog.tsx +1 -1
  67. package/src/components/DialogActions.tsx +2 -2
  68. package/src/components/DialogContent.tsx +2 -2
  69. package/src/components/DialogTitle.tsx +1 -1
  70. package/src/components/Divider.tsx +1 -1
  71. package/src/components/FloatingActionButton.tsx +1 -1
  72. package/src/components/FormControl.tsx +1 -1
  73. package/src/components/FormHelperText.tsx +2 -2
  74. package/src/components/Grid.tsx +1 -1
  75. package/src/components/Heading.tsx +1 -1
  76. package/src/components/IconButton.tsx +1 -1
  77. package/src/components/Icons/index.ts +1 -17
  78. package/src/components/Input.tsx +1 -1
  79. package/src/components/InputAdornment/InputAdornment.tsx +2 -2
  80. package/src/components/InputLabel.tsx +1 -1
  81. package/src/components/Label/Label.test.tsx +0 -1
  82. package/src/components/Label/Label.tsx +2 -3
  83. package/src/components/List.tsx +1 -1
  84. package/src/components/ListItem.tsx +1 -1
  85. package/src/components/ListItemText.tsx +1 -4
  86. package/src/components/Loading/Loading.test.tsx +0 -1
  87. package/src/components/Loading/Loading.tsx +1 -2
  88. package/src/components/Loading/Spinner/Spinner.test.tsx +1 -2
  89. package/src/components/Loading/Spinner/Spinner.tsx +1 -2
  90. package/src/components/Loading/Spinner/__snapshots__/Spinner.test.tsx.snap +114 -16
  91. package/src/components/Loading/__snapshots__/Loading.test.tsx.snap +63 -11
  92. package/src/components/Loading/styles.ts +1 -2
  93. package/src/components/Logo/Logo.test.tsx +0 -1
  94. package/src/components/Logo/Logo.tsx +1 -2
  95. package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +2 -0
  96. package/src/components/Menu.tsx +1 -1
  97. package/src/components/MenuItem.tsx +1 -1
  98. package/src/components/NotFound/NotFound.tsx +1 -3
  99. package/src/components/NotFound/Notfound.test.tsx +1 -2
  100. package/src/components/NotFound/__snapshots__/Notfound.test.tsx.snap +138 -11
  101. package/src/components/NotFound/styles.ts +0 -1
  102. package/src/components/Paper.tsx +1 -1
  103. package/src/components/SnackbarContent.tsx +1 -1
  104. package/src/components/SvgIcon.tsx +1 -1
  105. package/src/components/Tab.tsx +1 -1
  106. package/src/components/Tabs.tsx +1 -1
  107. package/src/components/Text/Text.tsx +1 -1
  108. package/src/components/Text/TextConfig.ts +1 -1
  109. package/src/components/TextField/TextField.test.tsx +0 -1
  110. package/src/components/TextField/TextField.tsx +2 -2
  111. package/src/components/TextField/__snapshots__/TextField.test.tsx.snap +216 -3
  112. package/src/components/Toolbar.tsx +1 -1
  113. package/src/components/Tooltip.tsx +1 -1
  114. package/src/design-tokens/ResetStyles.tsx +1 -1
  115. package/src/design-tokens/StyleBaseline.tsx +2 -2
  116. package/src/design-tokens/ThemeContext.ts +1 -1
  117. package/src/design-tokens/ThemeProvider.tsx +15 -12
  118. package/src/design-tokens/theme.ts +28 -26
  119. package/src/design-tokens/useTheme.ts +1 -1
  120. package/src/{design-tokens → hooks}/useLocalStorage.ts +0 -0
  121. package/src/{design-tokens → hooks}/useOnClickOutside.ts +0 -0
  122. package/src/i18n/ABOUT_TRANSLATIONS.md +13 -0
  123. package/src/i18n/__mocks__/loadTranslationFile.ts +5 -0
  124. package/src/i18n/config.ts +38 -0
  125. package/src/i18n/crowdin/ui.json +170 -0
  126. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/cs-CZ.json +0 -0
  127. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/de-DE.json +0 -0
  128. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/en-US.json +0 -0
  129. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/es-ES.json +0 -0
  130. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/fr-FR.json +0 -0
  131. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/ja-JP.json +0 -0
  132. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/km-KH.json +0 -0
  133. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/pt-BR.json +0 -0
  134. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/ru-RU.json +0 -0
  135. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/tr-TR.json +0 -0
  136. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/uk-UA.json +0 -0
  137. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/zh-CN.json +0 -0
  138. package/{i18n/translations → src/i18n/deprecated_translations_dont_use}/zh-TW.json +0 -0
  139. package/src/i18n/download_translations/ar-SA/ui.json +170 -0
  140. package/src/i18n/download_translations/cs-CZ/ui.json +170 -0
  141. package/src/i18n/download_translations/de-DE/ui.json +170 -0
  142. package/src/i18n/download_translations/es-ES/ui.json +170 -0
  143. package/src/i18n/download_translations/fi-FI/ui.json +170 -0
  144. package/src/i18n/download_translations/fil-PH/ui.json +170 -0
  145. package/src/i18n/download_translations/fr-FR/ui.json +170 -0
  146. package/src/i18n/download_translations/gl-ES/ui.json +170 -0
  147. package/src/i18n/download_translations/hi-IN/ui.json +170 -0
  148. package/src/i18n/download_translations/it-IT/ui.json +170 -0
  149. package/src/i18n/download_translations/ja-JP/ui.json +170 -0
  150. package/src/i18n/download_translations/km-KH/ui.json +170 -0
  151. package/src/i18n/download_translations/ko-KR/ui.json +170 -0
  152. package/src/i18n/download_translations/pl-PL/ui.json +170 -0
  153. package/src/i18n/download_translations/pt-BR/ui.json +170 -0
  154. package/src/i18n/download_translations/pt-PT/ui.json +170 -0
  155. package/src/i18n/download_translations/ro-RO/ui.json +170 -0
  156. package/src/i18n/download_translations/ru-RU/ui.json +170 -0
  157. package/src/i18n/download_translations/si-LK/ui.json +170 -0
  158. package/src/i18n/download_translations/sr-CS/ui.json +170 -0
  159. package/src/i18n/download_translations/sr-SP/ui.json +170 -0
  160. package/src/i18n/download_translations/tg-TJ/ui.json +170 -0
  161. package/src/i18n/download_translations/tr-TR/ui.json +170 -0
  162. package/src/i18n/download_translations/uk-UA/ui.json +170 -0
  163. package/src/i18n/download_translations/vi-VN/ui.json +170 -0
  164. package/src/i18n/download_translations/yo-NG/ui.json +170 -0
  165. package/src/i18n/download_translations/zh-CN/ui.json +170 -0
  166. package/src/i18n/download_translations/zh-TW/ui.json +170 -0
  167. package/src/i18n/enabledLanguages.ts +35 -0
  168. package/src/i18n/loadTranslationFile.ts +14 -0
  169. package/src/index.tsx +13 -11
  170. package/src/pages/Version/DetailContainer/Dependencies/Dependencies.test.tsx +0 -2
  171. package/src/pages/Version/DetailContainer/Dependencies/Dependencies.tsx +1 -3
  172. package/src/pages/Version/DetailContainer/Dependencies/styles.ts +0 -1
  173. package/src/pages/Version/DetailContainer/Deprecated/Deprecated.test.tsx +1 -3
  174. package/src/pages/Version/DetailContainer/Deprecated/Deprecated.tsx +2 -3
  175. package/src/pages/Version/DetailContainer/DetailContainer.test.tsx +0 -1
  176. package/src/pages/Version/DetailContainer/DetailContainer.tsx +1 -3
  177. package/src/pages/Version/DetailContainer/DetailContainerContent.tsx +0 -1
  178. package/src/pages/Version/DetailContainer/DetailContainerContentReadme.tsx +0 -1
  179. package/src/pages/Version/DetailContainer/DetailContainerTabs.tsx +0 -1
  180. package/src/pages/Version/DetailContainer/NoItems/NoItems.tsx +0 -1
  181. package/src/pages/Version/DetailContainer/NoItems/Noitems.test.tsx +0 -1
  182. package/src/pages/Version/DetailContainer/NoItems/__snapshots__/Noitems.test.tsx.snap +10 -1
  183. package/src/pages/Version/DetailContainer/Readme/Readme.spec.tsx +1 -2
  184. package/src/pages/Version/DetailContainer/Readme/Readme.tsx +1 -2
  185. package/src/pages/Version/DetailContainer/UpLinks/UpLinks.test.tsx +1 -9
  186. package/src/pages/Version/DetailContainer/UpLinks/UpLinks.tsx +1 -3
  187. package/src/pages/Version/DetailContainer/UpLinks/__snapshots__/UpLinks.test.tsx.snap +184 -26
  188. package/src/pages/Version/DetailContainer/UpLinks/styles.ts +2 -3
  189. package/src/pages/Version/DetailContainer/Versions/Versions.test.tsx +3 -5
  190. package/src/pages/Version/DetailContainer/Versions/Versions.tsx +1 -2
  191. package/src/pages/Version/DetailContainer/Versions/VersionsHistoryList.tsx +2 -4
  192. package/src/pages/Version/DetailContainer/Versions/VersionsTagList.tsx +1 -3
  193. package/src/pages/Version/DetailContainer/Versions/styles.ts +2 -3
  194. package/src/pages/Version/DetailContainer/__snapshots__/DetailContainer.test.tsx.snap +168 -34
  195. package/src/pages/Version/DetailSidebar/DetailSidebar.tsx +0 -2
  196. package/src/pages/Version/DetailSidebar/DetailSidebarFundButton.test.tsx +0 -2
  197. package/src/pages/Version/DetailSidebar/DetailSidebarFundButton.tsx +1 -2
  198. package/src/pages/Version/DetailSidebar/DetailSidebarTitle.tsx +0 -1
  199. package/src/pages/Version/DetailSidebar/Developers/Developers.test.tsx +3 -5
  200. package/src/pages/Version/DetailSidebar/Developers/Developers.tsx +3 -5
  201. package/src/pages/Version/DetailSidebar/Developers/DevelopersTitle.tsx +0 -1
  202. package/src/pages/Version/DetailSidebar/Developers/__snapshots__/Developers.test.tsx.snap +328 -40
  203. package/src/pages/Version/DetailSidebar/Developers/styles.ts +0 -1
  204. package/src/pages/Version/DetailSidebar/Dist/Dist.test.tsx +1 -3
  205. package/src/pages/Version/DetailSidebar/Dist/Dist.tsx +1 -3
  206. package/src/pages/Version/DetailSidebar/Dist/__snapshots__/Dist.test.tsx.snap +1436 -74
  207. package/src/pages/Version/DetailSidebar/Dist/styles.ts +2 -1
  208. package/src/pages/Version/DetailSidebar/Engines/Engines.test.tsx +1 -3
  209. package/src/pages/Version/DetailSidebar/Engines/Engines.tsx +1 -3
  210. package/src/pages/Version/DetailSidebar/Engines/styles.ts +0 -1
  211. package/src/pages/Version/DetailSidebar/Install/Install.test.tsx +1 -3
  212. package/src/pages/Version/DetailSidebar/Install/Install.tsx +0 -2
  213. package/src/pages/Version/DetailSidebar/Install/InstallListItem.tsx +0 -1
  214. package/src/pages/Version/DetailSidebar/Repository/Repository.test.tsx +1 -3
  215. package/src/pages/Version/DetailSidebar/Repository/Repository.tsx +1 -3
  216. package/src/pages/Version/Version.test.tsx +3 -5
  217. package/src/pages/Version/Version.tsx +21 -6
  218. package/src/pages/Version/VersionContextProvider.tsx +14 -45
  219. package/src/pages/Version/VersionLayout.tsx +1 -1
  220. package/src/pages/Version/context.ts +1 -1
  221. package/src/pages/home/Home.tsx +9 -28
  222. package/src/pages/home/PackageList/Help/Help.test.tsx +0 -1
  223. package/src/pages/home/PackageList/Help/Help.tsx +0 -1
  224. package/src/pages/home/PackageList/Help/__snapshots__/Help.test.tsx.snap +298 -59
  225. package/src/pages/home/PackageList/Help/styles.ts +0 -1
  226. package/src/pages/home/PackageList/Package/Package.test.tsx +5 -4
  227. package/src/pages/home/PackageList/Package/Package.tsx +20 -28
  228. package/src/pages/home/PackageList/Package/Tag/Tag.test.tsx +0 -1
  229. package/src/pages/home/PackageList/Package/styles.ts +5 -6
  230. package/src/pages/home/PackageList/PackageList.tsx +17 -17
  231. package/src/pages/home/PackageList/Packagelist.test.tsx +6 -5
  232. package/src/providers/API/api.test.ts +1 -0
  233. package/src/providers/API/api.ts +7 -3
  234. package/src/providers/config/AppConfigurationProvider.tsx +3 -3
  235. package/src/store/index.ts +1 -0
  236. package/src/store/models/configuration.ts +41 -0
  237. package/src/store/models/download.ts +30 -0
  238. package/src/store/models/index.ts +18 -0
  239. package/src/store/models/login.ts +92 -0
  240. package/src/store/models/manifest.ts +91 -0
  241. package/src/store/models/packages.ts +36 -0
  242. package/src/store/models/search.ts +81 -0
  243. package/src/store/store.ts +15 -0
  244. package/src/utils/login.test.ts +3 -4
  245. package/src/utils/package.test.ts +2 -3
  246. package/src/utils/package.ts +2 -1
  247. package/src/utils/sec-utils.ts +1 -1
  248. package/src/utils/test-react-testing-library.tsx +22 -5
  249. package/src/utils/url.test.ts +1 -1
  250. package/src/utils/url.ts +1 -0
  251. package/static/Dependencies.15768a14646212b71166.js +2 -0
  252. package/static/Dependencies.15768a14646212b71166.js.LICENSE.txt +78 -0
  253. package/static/Dist.15768a14646212b71166.js +2 -0
  254. package/static/Dist.15768a14646212b71166.js.LICENSE.txt +60 -0
  255. package/static/Engines.15768a14646212b71166.js +2 -0
  256. package/static/Engines.15768a14646212b71166.js.LICENSE.txt +66 -0
  257. package/static/Home.15768a14646212b71166.js +2 -0
  258. package/static/Home.15768a14646212b71166.js.LICENSE.txt +222 -0
  259. package/static/Install.15768a14646212b71166.js +2 -0
  260. package/static/Install.15768a14646212b71166.js.LICENSE.txt +66 -0
  261. package/static/NotFound.15768a14646212b71166.js +2 -0
  262. package/static/NotFound.15768a14646212b71166.js.LICENSE.txt +40 -0
  263. package/static/Provider.15768a14646212b71166.js +2 -0
  264. package/static/Provider.15768a14646212b71166.js.LICENSE.txt +32 -0
  265. package/static/Repository.15768a14646212b71166.js +2 -0
  266. package/static/Repository.15768a14646212b71166.js.LICENSE.txt +50 -0
  267. package/static/UpLinks.15768a14646212b71166.js +2 -0
  268. package/static/UpLinks.15768a14646212b71166.js.LICENSE.txt +56 -0
  269. package/static/Version.15768a14646212b71166.js +2 -0
  270. package/static/Version.15768a14646212b71166.js.LICENSE.txt +380 -0
  271. package/static/Versions.15768a14646212b71166.js +2 -0
  272. package/static/Versions.15768a14646212b71166.js.LICENSE.txt +64 -0
  273. package/static/index.html +1 -1
  274. package/static/main.15768a14646212b71166.js +2 -0
  275. package/static/main.15768a14646212b71166.js.LICENSE.txt +972 -0
  276. package/static/manifest.json +17 -3
  277. package/static/runtime.15768a14646212b71166.js +2 -0
  278. package/static/{runtime.9525ddaaf85378590c63.js.LICENSE.txt → runtime.15768a14646212b71166.js.LICENSE.txt} +2 -2
  279. package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-123400.15768a14646212b71166.js +2 -0
  280. package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-123400.15768a14646212b71166.js.LICENSE.txt +148 -0
  281. package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-d2b578.15768a14646212b71166.js +2 -0
  282. package/static/vendors-node_modules_pnpm_mui_icons-material_5_0_5_d1eeebd4022867ee03864a00e16c7901_node_modu-d2b578.15768a14646212b71166.js.LICENSE.txt +218 -0
  283. package/static/vendors-node_modules_pnpm_mui_material_5_0_6_033766d34292bd5d464212fd95cb4b6d_node_modules_mu-1fb115.15768a14646212b71166.js +2 -0
  284. package/static/vendors-node_modules_pnpm_mui_material_5_0_6_033766d34292bd5d464212fd95cb4b6d_node_modules_mu-1fb115.15768a14646212b71166.js.LICENSE.txt +316 -0
  285. package/static/vendors.15768a14646212b71166.js +103 -0
  286. package/static/vendors.15768a14646212b71166.js.LICENSE.txt +3158 -0
  287. package/tools/dev.server.js +0 -1
  288. package/tools/webpack.dev.config.babel.js +1 -3
  289. package/tools/webpack.prod.config.babel.js +1 -1
  290. package/tsconfig.json +1 -3
  291. package/types/index.ts +3 -20
  292. package/i18n/config.ts +0 -94
  293. package/src/App/AppContext.ts +0 -18
  294. package/src/App/AppContextProvider.tsx +0 -44
  295. package/src/App/Header/Search/SearchAdornment.tsx +0 -18
  296. package/src/components/Icons/Austria.tsx +0 -23
  297. package/src/components/Icons/Brazil.tsx +0 -44
  298. package/src/components/Icons/China.tsx +0 -33
  299. package/src/components/Icons/Czech.tsx +0 -21
  300. package/src/components/Icons/France.tsx +0 -27
  301. package/src/components/Icons/Germany.tsx +0 -27
  302. package/src/components/Icons/India.tsx +0 -44
  303. package/src/components/Icons/Japan.tsx +0 -23
  304. package/src/components/Icons/Khmer.tsx +0 -40
  305. package/src/components/Icons/Nicaragua.tsx +0 -66
  306. package/src/components/Icons/Russia.tsx +0 -27
  307. package/src/components/Icons/Spain.tsx +0 -43
  308. package/src/components/Icons/Taiwan.tsx +0 -25
  309. package/src/components/Icons/Turkey.tsx +0 -23
  310. package/src/components/Icons/Ukraine.tsx +0 -30
  311. package/src/components/Icons/Usa.tsx +0 -34
  312. package/src/design-tokens/emotion.ts +0 -5
  313. package/src/lib/constants.ts +0 -9
  314. package/src/pages/Version/DetailSidebar/ActionBar/ActionBar.test.tsx +0 -84
  315. package/src/pages/Version/DetailSidebar/ActionBar/__snapshots__/ActionBar.test.tsx.snap +0 -122
  316. package/src/pages/Version/is-package-version-valid.ts +0 -19
  317. package/src/providers/API/APIProvider.tsx +0 -109
  318. package/src/providers/API/index.ts +0 -1
  319. package/static/main.9525ddaaf85378590c63.js +0 -2
  320. package/static/main.9525ddaaf85378590c63.js.LICENSE.txt +0 -1588
  321. package/static/runtime.9525ddaaf85378590c63.js +0 -2
  322. package/static/vendors.9525ddaaf85378590c63.js +0 -2
  323. package/static/vendors.9525ddaaf85378590c63.js.LICENSE.txt +0 -4540
@@ -0,0 +1,170 @@
1
+ {
2
+ "copy-to-clipboard": "Copy to clipboard",
3
+ "author-anonymous": "Anonymous",
4
+ "author-unknown": "Unknown",
5
+ "action-bar-action": {
6
+ "visit-home-page": "Visit homepage",
7
+ "open-an-issue": "Open an issue",
8
+ "download-tarball": "Download tarball"
9
+ },
10
+ "dialog": {
11
+ "registry-info": {
12
+ "title": "Registry Info"
13
+ }
14
+ },
15
+ "header": {
16
+ "documentation": "Documentation",
17
+ "registry-info": "Registry Information",
18
+ "registry-info-link": "Learn more",
19
+ "registry-no-conf": "No configurations available",
20
+ "greetings": "Hi "
21
+ },
22
+ "search": {
23
+ "packages": "Search Packages"
24
+ },
25
+ "autoComplete": {
26
+ "loading": "Loading...",
27
+ "no-results-found": "No results found",
28
+ "clear": "Clear",
29
+ "expand": "Expand",
30
+ "collapse": "Collapse"
31
+ },
32
+ "tab": {
33
+ "uplinks": "Uplinks",
34
+ "versions": "Versions",
35
+ "dependencies": "Dependencies",
36
+ "readme": "Readme"
37
+ },
38
+ "uplinks": {
39
+ "title": "Uplinks",
40
+ "no-items": "{{name}} has no uplinks."
41
+ },
42
+ "versions": {
43
+ "current-tags": "Current Tags",
44
+ "version-history": "Version history",
45
+ "not-available": "Not available"
46
+ },
47
+ "package": {
48
+ "published-on": "Published on {{time}} •",
49
+ "version": "v{{version}}",
50
+ "visit-home-page": "Visit homepage",
51
+ "homepage": "Homepage",
52
+ "open-an-issue": "Open an issue",
53
+ "bugs": "Bugs",
54
+ "download": "Download {{what}}",
55
+ "the-tar-file": "the tar file",
56
+ "tarball": "Tarball"
57
+ },
58
+ "dependencies": {
59
+ "has-no-dependencies": "{{package}} has no dependencies.",
60
+ "dependency-block": "{{package}}@{{version}}"
61
+ },
62
+ "form": {
63
+ "username": "Username",
64
+ "password": "Password"
65
+ },
66
+ "form-placeholder": {
67
+ "username": "Your username",
68
+ "password": "Your strong password"
69
+ },
70
+ "form-validation": {
71
+ "required-field": "This field is required",
72
+ "required-min-length": "This field required the min length of {{length}}",
73
+ "unable-to-sign-in": "Unable to sign in",
74
+ "username-or-password-cant-be-empty": "Username or password can't be empty!"
75
+ },
76
+ "help": {
77
+ "title": "No Package Published Yet.",
78
+ "sub-title": "To publish your first package just:",
79
+ "first-step": "1. Login",
80
+ "first-step-command-line": "npm adduser --registry {{registryUrl}}",
81
+ "second-step": "2. Publish",
82
+ "second-step-command-line": "npm publish --registry {{registryUrl}}",
83
+ "third-step": "3. Refresh this page"
84
+ },
85
+ "sidebar": {
86
+ "detail": {
87
+ "latest-version": "Latest v{{version}}",
88
+ "version": "v{{version}}"
89
+ },
90
+ "installation": {
91
+ "title": "Installation",
92
+ "install-using-yarn": "Install using yarn",
93
+ "install-using-yarn-command": "yarn add {{packageName}}",
94
+ "install-using-npm": "Install using npm",
95
+ "install-using-npm-command": "npm install {{packageName}}",
96
+ "install-using-pnpm": "Install using pnpm",
97
+ "install-using-pnpm-command": "pnpm install {{packageName}}"
98
+ },
99
+ "repository": {
100
+ "title": "Repository"
101
+ },
102
+ "author": {
103
+ "title": "Author"
104
+ },
105
+ "distribution": {
106
+ "title": "Latest Distribution",
107
+ "license": "License",
108
+ "size": "Size",
109
+ "file-count": "file count"
110
+ },
111
+ "maintainers": {
112
+ "title": "Maintainers"
113
+ },
114
+ "contributors": {
115
+ "title": "Contributors"
116
+ },
117
+ "engines": {
118
+ "npm-version": "NPM Version",
119
+ "node-js": "NODE JS"
120
+ }
121
+ },
122
+ "footer": {
123
+ "powered-by": "Powered by",
124
+ "made-with-love-on": "Made with <0>♥</0> on"
125
+ },
126
+ "button": {
127
+ "close": "Close",
128
+ "cancel": "Cancel",
129
+ "login": "Login",
130
+ "logout": "Logout",
131
+ "go-to-the-home-page": "Go to the home page",
132
+ "learn-more": "Learn More",
133
+ "fund-this-package": "<0>Fund</0> this package"
134
+ },
135
+ "error": {
136
+ "unspecific": "Something went wrong.",
137
+ "404": {
138
+ "page-not-found": "404 - Page not found",
139
+ "sorry-we-could-not-find-it": "Sorry, we couldn't find it..."
140
+ },
141
+ "app-context-not-correct-used": "The app context was not used correctly",
142
+ "theme-context-not-correct-used": "The theme context was not used correctly",
143
+ "package-meta-is-required-at-detail-context": "packageMeta is required at DetailContext"
144
+ },
145
+ "lng": {
146
+ "english": "English",
147
+ "czech": "Czech",
148
+ "japanese": "Japanese",
149
+ "portuguese": "Portuguese",
150
+ "spanish": "Spanish",
151
+ "german": "German",
152
+ "chinese": "Chinese",
153
+ "chineseTraditional": "Chinese (Traditional)",
154
+ "french": "French",
155
+ "russian": "Russian",
156
+ "turkish": "Turkish",
157
+ "ukraine": "Ukraine",
158
+ "khmer": "Khmer"
159
+ },
160
+ "flag": {
161
+ "austria": "Austria",
162
+ "brazil": "Brazil",
163
+ "spain": "Spain",
164
+ "nicaragua": "Nicaragua",
165
+ "india": "India",
166
+ "china": "China",
167
+ "germany": "Germany",
168
+ "taiwan": "Taiwan"
169
+ }
170
+ }
@@ -0,0 +1,35 @@
1
+ import Flags from 'country-flag-icons/react/3x2';
2
+ import React from 'react';
3
+
4
+ export const DEFAULT_LANGUAGE = 'en-US';
5
+
6
+ export type LanguageConfiguration = {
7
+ lng: string;
8
+ menuKey: string;
9
+ icon: React.ReactElement;
10
+ };
11
+
12
+ export const listLanguages: LanguageConfiguration[] = [
13
+ { lng: DEFAULT_LANGUAGE, icon: Flags.US, menuKey: 'lng.english' },
14
+ { lng: 'cs-CZ', icon: Flags.CZ, menuKey: 'lng.czech' },
15
+ { lng: 'pt-BR', icon: Flags.BR, menuKey: 'lng.portuguese' },
16
+ { lng: 'es-ES', icon: Flags.ES, menuKey: 'lng.spanish' },
17
+ { lng: 'de-DE', icon: Flags.DE, menuKey: 'lng.german' },
18
+ { lng: 'fr-FR', icon: Flags.FR, menuKey: 'lng.french' },
19
+ { lng: 'zh-CN', icon: Flags.CN, menuKey: 'lng.chinese' },
20
+ { lng: 'ja-JP', icon: Flags.JP, menuKey: 'lng.japanese' },
21
+ { lng: 'ru-RU', icon: Flags.RU, menuKey: 'lng.russian' },
22
+ { lng: 'tr-TR', icon: Flags.TR, menuKey: 'lng.turkish' },
23
+ { lng: 'uk-UA', icon: Flags.UA, menuKey: 'lng.ukraine' },
24
+ { lng: 'km-KH', icon: Flags.KH, menuKey: 'lng.khme' },
25
+ { lng: 'zh-TW', icon: Flags.TW, menuKey: 'lng.chineseTraditional' },
26
+ ];
27
+
28
+ const languages = listLanguages.reduce((acc, item: LanguageConfiguration) => {
29
+ acc.push(item.lng);
30
+ return acc;
31
+ }, [] as string[]);
32
+
33
+ export const listLanguagesAsString = languages;
34
+
35
+ export type Language = keyof typeof listLanguagesAsString;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * In development mode translations files might be not available,
3
+ * crowdin translations are only available in CI.
4
+ */
5
+ export function loadTranslationFile(lng) {
6
+ try {
7
+ return require(`./download_translations/${lng}/ui.json`);
8
+ } catch {
9
+ // eslint-disable-next-line no-console
10
+ console.warn(`language ${lng} file not found, fallback to en-US`);
11
+ // in case the file is not there, fallback to en-US
12
+ return require(`./crowdin/ui.json`);
13
+ }
14
+ }
package/src/index.tsx CHANGED
@@ -1,34 +1,36 @@
1
1
  import React from 'react';
2
2
  import ReactDOM from 'react-dom';
3
3
  import { AppContainer } from 'react-hot-loader';
4
-
5
- import APIProvider from 'verdaccio-ui/providers/API/APIProvider';
4
+ import { Provider } from 'react-redux';
6
5
  import AppConfigurationContext from 'verdaccio-ui/providers/config';
7
6
 
8
7
  import App from './App';
9
8
  import StyleBaseline from './design-tokens/StyleBaseline';
10
9
  import ThemeProvider from './design-tokens/ThemeProvider';
10
+ import { store } from './store';
11
11
 
12
12
  const rootNode = document.getElementById('root');
13
13
  const renderApp = (Component: React.ElementType): void => {
14
14
  ReactDOM.render(
15
- <AppContainer>
16
- <AppConfigurationContext>
17
- <ThemeProvider>
18
- <StyleBaseline />
19
- <APIProvider>
15
+ <Provider store={store}>
16
+ <AppContainer>
17
+ <AppConfigurationContext>
18
+ <ThemeProvider>
19
+ <StyleBaseline />
20
20
  <Component />
21
- </APIProvider>
22
- </ThemeProvider>
23
- </AppConfigurationContext>
24
- </AppContainer>,
21
+ </ThemeProvider>
22
+ </AppConfigurationContext>
23
+ </AppContainer>
24
+ </Provider>,
25
25
  rootNode
26
26
  );
27
27
  };
28
28
 
29
29
  renderApp(App);
30
30
 
31
+ // @ts-expect-error
31
32
  if (module.hot) {
33
+ // @ts-expect-error
32
34
  module.hot.accept('./App', () => {
33
35
  renderApp(App);
34
36
  });
@@ -1,10 +1,8 @@
1
1
  import React from 'react';
2
2
  import { HashRouter } from 'react-router-dom';
3
-
4
3
  import { render } from 'verdaccio-ui/utils/test-react-testing-library';
5
4
 
6
5
  import { DetailContextProvider } from '../../context';
7
-
8
6
  import Dependencies from './Dependencies';
9
7
 
10
8
  describe('<Dependencies /> component', () => {
@@ -1,14 +1,12 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { useHistory } from 'react-router-dom';
4
-
5
4
  import CardContent from 'verdaccio-ui/components/CardContent';
6
5
 
7
6
  import { PackageDependencies } from '../../../../../types/packageMeta';
8
7
  import { DetailContext } from '../../context';
9
8
  import NoItems from '../NoItems';
10
-
11
- import { CardWrap, StyledText, Tags, Tag } from './styles';
9
+ import { CardWrap, StyledText, Tag, Tags } from './styles';
12
10
 
13
11
  interface DependencyBlockProps {
14
12
  title: string;
@@ -1,5 +1,4 @@
1
1
  import styled from '@emotion/styled';
2
-
3
2
  import Card from 'verdaccio-ui/components/Card';
4
3
  import Chip from 'verdaccio-ui/components/Chip';
5
4
  import Text from 'verdaccio-ui/components/Text';
@@ -1,9 +1,7 @@
1
1
  import React from 'react';
2
-
3
- import { render, cleanup, screen } from 'verdaccio-ui/utils/test-react-testing-library';
2
+ import { cleanup, render, screen } from 'verdaccio-ui/utils/test-react-testing-library';
4
3
 
5
4
  import { DetailContextProvider } from '../../context';
6
-
7
5
  import Deprecated from './Deprecated';
8
6
 
9
7
  describe('test Deprecated', () => {
@@ -1,8 +1,7 @@
1
1
  import styled from '@emotion/styled';
2
- import Card from '@material-ui/core/Card';
3
- import CardContent from '@material-ui/core/CardContent';
2
+ import Card from '@mui/material/Card';
3
+ import CardContent from '@mui/material/CardContent';
4
4
  import React from 'react';
5
-
6
5
  import { Theme } from 'verdaccio-ui/design-tokens/theme';
7
6
 
8
7
  export const CardStyled = styled(Card)<{ theme?: Theme }>(({ theme }) => {
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
-
3
2
  import { render } from 'verdaccio-ui/utils/test-react-testing-library';
4
3
 
5
4
  import DetailContainer from './DetailContainer';
@@ -1,9 +1,7 @@
1
- import React, { useState, useContext } from 'react';
2
-
1
+ import React, { useContext, useState } from 'react';
3
2
  import Box from 'verdaccio-ui/components/Box';
4
3
 
5
4
  import { DetailContext } from '../context';
6
-
7
5
  import Deprecated from './Deprecated';
8
6
  import DetailContainerContent from './DetailContainerContent';
9
7
  import DetailContainerTabs from './DetailContainerTabs';
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
3
  import loadable from '../../../App/utils/loadable';
4
-
5
4
  import DetailContainerContentReadme from './DetailContainerContentReadme';
6
5
 
7
6
  export enum TabPosition {
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
-
3
2
  import { preventXSS } from 'verdaccio-ui/utils/sec-utils';
4
3
 
5
4
  import Readme from './Readme';
@@ -1,7 +1,6 @@
1
1
  import styled from '@emotion/styled';
2
2
  import React from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
-
5
4
  import Tab from 'verdaccio-ui/components/Tab';
6
5
  import { default as MuiTabs } from 'verdaccio-ui/components/Tabs';
7
6
  import { Theme } from 'verdaccio-ui/design-tokens/theme';
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
-
3
2
  import Text from 'verdaccio-ui/components/Text';
4
3
 
5
4
  interface Props {
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
-
3
2
  import { render } from 'verdaccio-ui/utils/test-react-testing-library';
4
3
 
5
4
  import NoItems from './NoItems';
@@ -1,8 +1,17 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<NoItem /> component should load the component in default state 1`] = `
4
+ .emotion-0 {
5
+ margin: 0;
6
+ font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
7
+ font-weight: 400;
8
+ font-size: 1rem;
9
+ line-height: 1.75;
10
+ margin-bottom: 0.35em;
11
+ }
12
+
4
13
  <span
5
- class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom"
14
+ class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom emotion-0"
6
15
  >
7
16
  test
8
17
  </span>
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
-
3
- import { render, cleanup } from 'verdaccio-ui/utils/test-react-testing-library';
2
+ import { cleanup, render } from 'verdaccio-ui/utils/test-react-testing-library';
4
3
 
5
4
  import Readme from './Readme';
6
5
 
@@ -1,7 +1,6 @@
1
1
  import styled from '@emotion/styled';
2
- import React from 'react';
3
2
  import 'github-markdown-css';
4
-
3
+ import React from 'react';
5
4
  import { Theme } from 'verdaccio-ui/design-tokens/theme';
6
5
 
7
6
  import { Props } from './types';
@@ -1,20 +1,12 @@
1
1
  import React from 'react';
2
-
3
- import { render, cleanup } from 'verdaccio-ui/utils/test-react-testing-library';
2
+ import { cleanup, render } from 'verdaccio-ui/utils/test-react-testing-library';
4
3
 
5
4
  import { DetailContext } from '../../context';
6
-
7
5
  import UpLinks from './UpLinks';
8
6
 
9
7
  describe('<UpLinks /> component', () => {
10
8
  beforeEach(cleanup);
11
9
 
12
- test('should return null without packageMeta', () => {
13
- const wrapper = render(<UpLinks />);
14
- wrapper.debug();
15
- // expect(wrapper).toBeNull();
16
- });
17
-
18
10
  test('should render the component when there is no uplink', () => {
19
11
  const packageMeta = {
20
12
  latest: {
@@ -1,14 +1,12 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
-
4
3
  import List from 'verdaccio-ui/components/List';
5
4
  import ListItem from 'verdaccio-ui/components/ListItem';
6
5
  import { formatDateDistance } from 'verdaccio-ui/utils/package';
7
6
 
8
7
  import { DetailContext } from '../..';
9
8
  import NoItems from '../NoItems';
10
-
11
- import { StyledText, Spacer, ListItemText } from './styles';
9
+ import { ListItemText, Spacer, StyledText } from './styles';
12
10
 
13
11
  const UpLinks: React.FC = () => {
14
12
  const { packageMeta } = useContext(DetailContext);