@verdaccio/ui-theme 3.1.0 → 6.0.0-6-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +33 -0
- package/.eslintrc +115 -0
- package/.stylelintrc +40 -0
- package/CHANGELOG.md +152 -554
- package/LICENSE +1 -1
- package/README.md +22 -95
- package/config/env.js +9 -0
- package/jest/api/packages.json +42 -0
- package/jest/identity.js +29 -0
- package/jest/jest.config.js +39 -0
- package/jest/jestEnvironment.js +1 -0
- package/jest/server-handlers.ts +9 -0
- package/jest/server.ts +6 -0
- package/jest/setup-env.ts +15 -0
- package/jest/setup.ts +31 -0
- package/jest/unit/components/__mocks__/api.ts +47 -0
- package/jest/unit/components/__mocks__/token.ts +31 -0
- package/jest/unit/components/store/login.ts +23 -0
- package/jest/unit/components/store/logo.ts +7 -0
- package/jest/unit/components/store/package.ts +174 -0
- package/jest/unit/components/store/packageMeta.ts +592 -0
- package/jest/unit/empty.ts +1 -0
- package/lib/constants.ts +9 -0
- package/package.json +153 -228
- package/src/App/App.test.tsx +123 -0
- package/src/App/App.tsx +54 -0
- package/src/App/AppError.tsx +38 -0
- package/src/App/AppRoute.tsx +63 -0
- package/src/App/Footer/Footer.test.tsx +20 -0
- package/src/App/Footer/Footer.tsx +111 -0
- package/src/App/Footer/__snapshots__/Footer.test.tsx.snap +456 -0
- package/src/App/Footer/index.ts +1 -0
- package/src/App/Footer/styles.ts +44 -0
- package/src/App/Header/Header.test.tsx +152 -0
- package/src/App/Header/Header.tsx +74 -0
- package/src/App/Header/HeaderGreetings.tsx +22 -0
- package/src/App/Header/HeaderInfoDialog.tsx +19 -0
- package/src/App/Header/HeaderLeft.tsx +31 -0
- package/src/App/Header/HeaderMenu.tsx +65 -0
- package/src/App/Header/HeaderRight.tsx +118 -0
- package/src/App/Header/HeaderToolTip.tsx +19 -0
- package/src/App/Header/HeaderToolTipIcon.tsx +75 -0
- package/src/App/Header/LanguageSwitch.tsx +125 -0
- package/src/App/Header/LoginDialog/LoginDialog.test.tsx +112 -0
- package/src/App/Header/LoginDialog/LoginDialog.tsx +81 -0
- package/src/App/Header/LoginDialog/LoginDialogCloseButton.tsx +32 -0
- package/src/App/Header/LoginDialog/LoginDialogForm.tsx +97 -0
- package/src/App/Header/LoginDialog/LoginDialogFormError.tsx +43 -0
- package/src/App/Header/LoginDialog/LoginDialogHeader.tsx +48 -0
- package/src/App/Header/LoginDialog/__snapshots__/LoginDialog.test.tsx.snap +3 -0
- package/src/App/Header/LoginDialog/index.ts +1 -0
- package/src/App/Header/RegistryInfoContent/RegistryInfoContent.test.tsx +27 -0
- package/src/App/Header/RegistryInfoContent/RegistryInfoContent.tsx +155 -0
- package/src/App/Header/RegistryInfoContent/index.ts +1 -0
- package/src/App/Header/RegistryInfoDialog/RegistryInfoDialog.tsx +30 -0
- package/src/App/Header/RegistryInfoDialog/index.ts +1 -0
- package/src/App/Header/RegistryInfoDialog/styles.ts +16 -0
- package/src/App/Header/RegistryInfoDialog/types.ts +7 -0
- package/src/App/Header/Search/Search.test.tsx +168 -0
- package/src/App/Header/Search/Search.tsx +127 -0
- package/src/App/Header/Search/SearchAdornment.tsx +18 -0
- package/src/App/Header/Search/__snapshots__/Search.test.tsx.snap +101 -0
- package/src/App/Header/Search/index.ts +1 -0
- package/src/App/Header/index.ts +1 -0
- package/src/App/Header/styles.ts +89 -0
- package/src/App/index.ts +1 -0
- package/src/App/utils/loadable.tsx +10 -0
- package/src/components/.eslintrc +7 -0
- package/src/components/ActionBar/ActionBar.test.tsx +91 -0
- package/src/components/ActionBar/ActionBar.tsx +45 -0
- package/src/components/ActionBar/ActionBarAction.tsx +75 -0
- package/src/components/ActionBar/__snapshots__/ActionBar.test.tsx.snap +122 -0
- package/src/components/ActionBar/index.ts +1 -0
- package/src/components/AppBar.tsx +10 -0
- package/src/components/Author/Author.test.tsx +75 -0
- package/src/components/Author/Author.tsx +47 -0
- package/src/components/Author/__snapshots__/Author.test.tsx.snap +353 -0
- package/src/components/Author/index.ts +1 -0
- package/src/components/Author/styles.ts +23 -0
- package/src/components/AutoComplete/AutoComplete.tsx +179 -0
- package/src/components/AutoComplete/AutoCompleteV2.tsx +296 -0
- package/src/components/AutoComplete/index.ts +1 -0
- package/src/components/AutoComplete/styles.tsx +58 -0
- package/src/components/AutoComplete/useAutoComplete.tsx +61 -0
- package/src/components/Avatar.tsx +3 -0
- package/src/components/Box.tsx +8 -0
- package/src/components/Button.tsx +10 -0
- package/src/components/Card.tsx +10 -0
- package/src/components/CardActions.tsx +13 -0
- package/src/components/CardContent.tsx +10 -0
- package/src/components/Chip.tsx +10 -0
- package/src/components/CircularProgress.tsx +15 -0
- package/src/components/CopyToClipBoard.tsx +45 -0
- package/src/components/Dialog.tsx +10 -0
- package/src/components/DialogActions.tsx +16 -0
- package/src/components/DialogContent.tsx +16 -0
- package/src/components/DialogTitle.tsx +10 -0
- package/src/components/Divider.tsx +10 -0
- package/src/components/FloatingActionButton.tsx +12 -0
- package/src/components/FormControl.tsx +10 -0
- package/src/components/FormHelperText.tsx +16 -0
- package/src/components/Grid.tsx +10 -0
- package/src/components/Heading.tsx +15 -0
- package/src/components/IconButton.tsx +10 -0
- package/src/components/Icons/.eslintrc +5 -0
- package/src/components/Icons/Earth.tsx +36 -0
- package/src/components/Icons/FileBinary.tsx +20 -0
- package/src/components/Icons/Law.tsx +20 -0
- package/src/components/Icons/License.tsx +18 -0
- package/src/components/Icons/Time.tsx +19 -0
- package/src/components/Icons/Version.tsx +20 -0
- package/src/components/Icons/index.ts +5 -0
- package/src/components/Input.tsx +10 -0
- package/src/components/InputAdornment/InputAdornment.tsx +16 -0
- package/src/components/InputAdornment/index.ts +1 -0
- package/src/components/InputLabel.tsx +10 -0
- package/src/components/Label/Label.test.tsx +15 -0
- package/src/components/Label/Label.tsx +35 -0
- package/src/components/Label/__snapshots__/Label.test.tsx.snap +14 -0
- package/src/components/Label/index.ts +1 -0
- package/src/components/Link.tsx +39 -0
- package/src/components/List.tsx +10 -0
- package/src/components/ListItem.tsx +23 -0
- package/src/components/ListItemText.tsx +16 -0
- package/src/components/Loading/Loading.test.tsx +12 -0
- package/src/components/Loading/Loading.tsx +17 -0
- package/src/components/Loading/Spinner/Spinner.test.tsx +14 -0
- package/src/components/Loading/Spinner/Spinner.tsx +35 -0
- package/src/components/Loading/Spinner/__snapshots__/Spinner.test.tsx.snap +148 -0
- package/src/components/Loading/Spinner/index.tsx +1 -0
- package/src/components/Loading/__snapshots__/Loading.test.tsx.snap +86 -0
- package/src/components/Loading/index.ts +1 -0
- package/src/components/Loading/styles.ts +17 -0
- package/src/components/Logo/Logo.test.tsx +12 -0
- package/src/components/Logo/Logo.tsx +55 -0
- package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +19 -0
- package/src/components/Logo/img/logo-black-and-white.svg +1 -0
- package/src/components/Logo/img/logo.svg +1 -0
- package/src/components/Logo/index.ts +1 -0
- package/src/components/Menu.tsx +10 -0
- package/src/components/MenuItem.tsx +25 -0
- package/src/components/NotFound/NotFound.tsx +52 -0
- package/src/components/NotFound/Notfound.test.tsx +37 -0
- package/src/components/NotFound/__snapshots__/Notfound.test.tsx.snap +44 -0
- package/src/components/NotFound/img/package.svg +1 -0
- package/src/components/NotFound/index.ts +1 -0
- package/src/components/NotFound/styles.ts +40 -0
- package/src/components/Paper.tsx +10 -0
- package/src/components/SnackbarContent.tsx +15 -0
- package/src/components/SvgIcon.tsx +38 -0
- package/src/components/Tab.tsx +10 -0
- package/src/components/Tabs.tsx +14 -0
- package/src/components/Text/Text.tsx +17 -0
- package/src/components/Text/TextConfig.ts +7 -0
- package/src/components/Text/index.ts +2 -0
- package/src/components/TextField/TextField.test.tsx +16 -0
- package/src/components/TextField/TextField.tsx +23 -0
- package/src/components/TextField/__snapshots__/TextField.test.tsx.snap +19 -0
- package/src/components/TextField/index.ts +1 -0
- package/src/components/Toolbar.tsx +10 -0
- package/src/components/Tooltip.tsx +25 -0
- package/src/design-tokens/ResetStyles.tsx +44 -0
- package/src/design-tokens/StyleBaseline.tsx +14 -0
- package/src/design-tokens/ThemeContext.ts +13 -0
- package/src/design-tokens/ThemeProvider.tsx +44 -0
- package/src/design-tokens/emotion.ts +5 -0
- package/src/design-tokens/load-dayjs-locale.ts +98 -0
- package/src/design-tokens/theme.ts +159 -0
- package/src/design-tokens/useLocalStorage.ts +40 -0
- package/src/design-tokens/useOnClickOutside.ts +28 -0
- package/src/design-tokens/useTheme.ts +7 -0
- package/src/i18n/ABOUT_TRANSLATIONS.md +13 -0
- package/src/i18n/config.ts +52 -0
- package/src/i18n/crowdin/ui.json +170 -0
- package/src/i18n/deprecated_translations_dont_use/cs-CZ.json +168 -0
- package/src/i18n/deprecated_translations_dont_use/de-DE.json +168 -0
- package/src/i18n/deprecated_translations_dont_use/en-US.json +170 -0
- package/src/i18n/deprecated_translations_dont_use/es-ES.json +168 -0
- package/src/i18n/deprecated_translations_dont_use/fr-FR.json +168 -0
- package/src/i18n/deprecated_translations_dont_use/ja-JP.json +168 -0
- package/src/i18n/deprecated_translations_dont_use/km-KH.json +168 -0
- package/src/i18n/deprecated_translations_dont_use/pt-BR.json +168 -0
- package/src/i18n/deprecated_translations_dont_use/ru-RU.json +168 -0
- package/src/i18n/deprecated_translations_dont_use/tr-TR.json +168 -0
- package/src/i18n/deprecated_translations_dont_use/uk-UA.json +168 -0
- package/src/i18n/deprecated_translations_dont_use/zh-CN.json +168 -0
- package/src/i18n/deprecated_translations_dont_use/zh-TW.json +165 -0
- package/src/i18n/enabledLanguages.ts +35 -0
- package/src/index.tsx +36 -0
- package/src/lib/constants.ts +9 -0
- package/src/pages/Version/DetailContainer/Dependencies/Dependencies.test.tsx +93 -0
- package/src/pages/Version/DetailContainer/Dependencies/Dependencies.tsx +100 -0
- package/src/pages/Version/DetailContainer/Dependencies/index.ts +1 -0
- package/src/pages/Version/DetailContainer/Dependencies/styles.ts +26 -0
- package/src/pages/Version/DetailContainer/Dependencies/types.ts +7 -0
- package/src/pages/Version/DetailContainer/Deprecated/Deprecated.test.tsx +34 -0
- package/src/pages/Version/DetailContainer/Deprecated/Deprecated.tsx +31 -0
- package/src/pages/Version/DetailContainer/Deprecated/index.ts +1 -0
- package/src/pages/Version/DetailContainer/DetailContainer.test.tsx +13 -0
- package/src/pages/Version/DetailContainer/DetailContainer.tsx +37 -0
- package/src/pages/Version/DetailContainer/DetailContainerContent.tsx +41 -0
- package/src/pages/Version/DetailContainer/DetailContainerContentReadme.tsx +19 -0
- package/src/pages/Version/DetailContainer/DetailContainerTabs.tsx +36 -0
- package/src/pages/Version/DetailContainer/NoItems/NoItems.tsx +16 -0
- package/src/pages/Version/DetailContainer/NoItems/Noitems.test.tsx +16 -0
- package/src/pages/Version/DetailContainer/NoItems/__snapshots__/Noitems.test.tsx.snap +9 -0
- package/src/pages/Version/DetailContainer/NoItems/index.ts +1 -0
- package/src/pages/Version/DetailContainer/Readme/Readme.spec.tsx +19 -0
- package/src/pages/Version/DetailContainer/Readme/Readme.tsx +22 -0
- package/src/pages/Version/DetailContainer/Readme/__snapshots__/Readme.spec.tsx.snap +94 -0
- package/src/pages/Version/DetailContainer/Readme/index.ts +1 -0
- package/src/pages/Version/DetailContainer/Readme/types.ts +3 -0
- package/src/pages/Version/DetailContainer/UpLinks/UpLinks.test.tsx +58 -0
- package/src/pages/Version/DetailContainer/UpLinks/UpLinks.tsx +45 -0
- package/src/pages/Version/DetailContainer/UpLinks/__snapshots__/UpLinks.test.tsx.snap +247 -0
- package/src/pages/Version/DetailContainer/UpLinks/index.ts +1 -0
- package/src/pages/Version/DetailContainer/UpLinks/styles.ts +24 -0
- package/src/pages/Version/DetailContainer/Versions/Versions.test.tsx +60 -0
- package/src/pages/Version/DetailContainer/Versions/Versions.tsx +41 -0
- package/src/pages/Version/DetailContainer/Versions/VersionsHistoryList.tsx +40 -0
- package/src/pages/Version/DetailContainer/Versions/VersionsTagList.tsx +28 -0
- package/src/pages/Version/DetailContainer/Versions/__partials__/data.json +5984 -0
- package/src/pages/Version/DetailContainer/Versions/__snapshots__/Versions.test.tsx.snap +3 -0
- package/src/pages/Version/DetailContainer/Versions/index.ts +1 -0
- package/src/pages/Version/DetailContainer/Versions/styles.ts +30 -0
- package/src/pages/Version/DetailContainer/__snapshots__/DetailContainer.test.tsx.snap +103 -0
- package/src/pages/Version/DetailContainer/index.ts +1 -0
- package/src/pages/Version/DetailSidebar/DetailSidebar.tsx +55 -0
- package/src/pages/Version/DetailSidebar/DetailSidebarFundButton.test.tsx +111 -0
- package/src/pages/Version/DetailSidebar/DetailSidebarFundButton.tsx +53 -0
- package/src/pages/Version/DetailSidebar/DetailSidebarTitle.tsx +40 -0
- package/src/pages/Version/DetailSidebar/Developers/Developers.test.tsx +117 -0
- package/src/pages/Version/DetailSidebar/Developers/Developers.tsx +90 -0
- package/src/pages/Version/DetailSidebar/Developers/DevelopersTitle.tsx +32 -0
- package/src/pages/Version/DetailSidebar/Developers/__snapshots__/Developers.test.tsx.snap +380 -0
- package/src/pages/Version/DetailSidebar/Developers/get-unique-developer-values.ts +16 -0
- package/src/pages/Version/DetailSidebar/Developers/index.ts +1 -0
- package/src/pages/Version/DetailSidebar/Developers/styles.ts +31 -0
- package/src/pages/Version/DetailSidebar/Dist/Dist.test.tsx +78 -0
- package/src/pages/Version/DetailSidebar/Dist/Dist.tsx +49 -0
- package/src/pages/Version/DetailSidebar/Dist/__snapshots__/Dist.test.tsx.snap +602 -0
- package/src/pages/Version/DetailSidebar/Dist/index.ts +1 -0
- package/src/pages/Version/DetailSidebar/Dist/styles.ts +27 -0
- package/src/pages/Version/DetailSidebar/Engines/Engines.test.tsx +71 -0
- package/src/pages/Version/DetailSidebar/Engines/Engines.tsx +58 -0
- package/src/pages/Version/DetailSidebar/Engines/img/node.png +0 -0
- package/src/pages/Version/DetailSidebar/Engines/index.ts +1 -0
- package/src/pages/Version/DetailSidebar/Engines/styles.ts +14 -0
- package/src/pages/Version/DetailSidebar/Install/Install.test.tsx +64 -0
- package/src/pages/Version/DetailSidebar/Install/Install.tsx +52 -0
- package/src/pages/Version/DetailSidebar/Install/InstallListItem.tsx +97 -0
- package/src/pages/Version/DetailSidebar/Install/__partials__/data.json +5984 -0
- package/src/pages/Version/DetailSidebar/Install/img/npm.svg +15 -0
- package/src/pages/Version/DetailSidebar/Install/img/pnpm.svg +1 -0
- package/src/pages/Version/DetailSidebar/Install/img/yarn.svg +1 -0
- package/src/pages/Version/DetailSidebar/Install/index.ts +1 -0
- package/src/pages/Version/DetailSidebar/Repository/Repository.test.tsx +78 -0
- package/src/pages/Version/DetailSidebar/Repository/Repository.tsx +93 -0
- package/src/pages/Version/DetailSidebar/Repository/__partials__/data.json +5984 -0
- package/src/pages/Version/DetailSidebar/Repository/__snapshots__/Repository.test.tsx.snap +3 -0
- package/src/pages/Version/DetailSidebar/Repository/img/git.png +0 -0
- package/src/pages/Version/DetailSidebar/Repository/index.ts +1 -0
- package/src/pages/Version/DetailSidebar/index.ts +1 -0
- package/src/pages/Version/Version.test.tsx +68 -0
- package/src/pages/Version/Version.tsx +41 -0
- package/src/pages/Version/VersionContextProvider.tsx +43 -0
- package/src/pages/Version/VersionLayout.tsx +20 -0
- package/src/pages/Version/__partials__/data.json +5984 -0
- package/src/pages/Version/context.ts +10 -0
- package/src/pages/Version/get-route-package-name.ts +9 -0
- package/src/pages/Version/index.ts +4 -0
- package/src/pages/Version/version-config.ts +19 -0
- package/src/pages/home/Home.tsx +25 -0
- package/src/pages/home/PackageList/Help/Help.test.tsx +12 -0
- package/src/pages/home/PackageList/Help/Help.tsx +56 -0
- package/src/pages/home/PackageList/Help/__snapshots__/Help.test.tsx.snap +159 -0
- package/src/pages/home/PackageList/Help/index.ts +1 -0
- package/src/pages/home/PackageList/Help/styles.ts +13 -0
- package/src/pages/home/PackageList/Package/Package.test.tsx +56 -0
- package/src/pages/home/PackageList/Package/Package.tsx +253 -0
- package/src/pages/home/PackageList/Package/Tag/Tag.test.tsx +16 -0
- package/src/pages/home/PackageList/Package/Tag/Tag.tsx +11 -0
- package/src/pages/home/PackageList/Package/Tag/__snapshots__/Tag.test.tsx.snap +21 -0
- package/src/pages/home/PackageList/Package/Tag/index.ts +1 -0
- package/src/pages/home/PackageList/Package/Tag/styles.ts +11 -0
- package/src/pages/home/PackageList/Package/index.ts +1 -0
- package/src/pages/home/PackageList/Package/styles.ts +112 -0
- package/src/pages/home/PackageList/PackageList.tsx +81 -0
- package/src/pages/home/PackageList/Packagelist.test.tsx +60 -0
- package/src/pages/home/PackageList/index.ts +1 -0
- package/src/pages/home/index.ts +1 -0
- package/src/providers/API/api.test.ts +136 -0
- package/src/providers/API/api.ts +73 -0
- package/src/providers/API/storage.ts +12 -0
- package/src/providers/config/AppConfigurationProvider.tsx +57 -0
- package/src/providers/config/index.ts +1 -0
- package/src/store/index.ts +1 -0
- package/src/store/models/configuration.ts +42 -0
- package/src/store/models/download.ts +31 -0
- package/src/store/models/index.ts +17 -0
- package/src/store/models/login.ts +90 -0
- package/src/store/models/manifest.ts +91 -0
- package/src/store/models/packages.ts +36 -0
- package/src/store/models/search.ts +81 -0
- package/src/store/store.ts +15 -0
- package/src/template/favicon.ico +0 -0
- package/src/template/index.html +21 -0
- package/src/utils/.eslintrc +5 -0
- package/src/utils/cli-utils.test.ts +66 -0
- package/src/utils/cli-utils.ts +38 -0
- package/src/utils/colors.ts +1 -0
- package/src/utils/constants.ts +5 -0
- package/src/utils/file-size.ts +13 -0
- package/src/utils/i18nForTests.ts +25 -0
- package/src/utils/login.test.ts +71 -0
- package/src/utils/login.ts +44 -0
- package/src/utils/package.test.ts +101 -0
- package/src/utils/package.ts +105 -0
- package/src/utils/sec-utils.ts +15 -0
- package/src/utils/storage.ts +12 -0
- package/src/utils/test-react-testing-library.tsx +38 -0
- package/src/utils/url.test.ts +28 -0
- package/src/utils/url.ts +58 -0
- package/src/utils/windows.ts +3 -0
- package/static/favicon.ico +0 -0
- package/static/index.html +21 -0
- package/static/main.c57129036f278d0c7acf.js +2 -0
- package/static/main.c57129036f278d0c7acf.js.LICENSE.txt +1456 -0
- package/static/manifest.json +5 -17
- package/static/runtime.c57129036f278d0c7acf.js +2 -0
- package/static/{runtime.f6e570dfe38870a45bf5.js.LICENSE.txt → runtime.c57129036f278d0c7acf.js.LICENSE.txt} +2 -2
- package/static/vendors.c57129036f278d0c7acf.js +2 -0
- package/static/vendors.c57129036f278d0c7acf.js.LICENSE.txt +2932 -0
- package/tools/.eslintrc +14 -0
- package/tools/_verdaccio.config.yaml +59 -0
- package/tools/dev.server.js +48 -0
- package/tools/getPackageJson.js +25 -0
- package/tools/verdaccio.js +31 -0
- package/tools/webpack.config.js +82 -0
- package/tools/webpack.dev.config.babel.js +60 -0
- package/tools/webpack.prod.config.babel.js +81 -0
- package/tsconfig.build.json +24 -0
- package/tsconfig.json +27 -0
- package/types/custom.d.ts +9 -0
- package/types/files.d.ts +9 -0
- package/types/index.ts +12 -0
- package/types/jest-dom.d.ts +1 -0
- package/types/packageMeta.ts +82 -0
- package/static/238.f6e570dfe38870a45bf5.js +0 -2
- package/static/238.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/718.f6e570dfe38870a45bf5.js +0 -2
- package/static/718.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/73.f6e570dfe38870a45bf5.js +0 -2
- package/static/73.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/Dependencies.f6e570dfe38870a45bf5.js +0 -2
- package/static/Dependencies.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/Dist.f6e570dfe38870a45bf5.js +0 -2
- package/static/Dist.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/Engines.f6e570dfe38870a45bf5.js +0 -2
- package/static/Engines.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/Home.f6e570dfe38870a45bf5.js +0 -2
- package/static/Home.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/Install.f6e570dfe38870a45bf5.js +0 -2
- package/static/Install.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/NotFound.f6e570dfe38870a45bf5.js +0 -2
- package/static/NotFound.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/Provider.f6e570dfe38870a45bf5.js +0 -2
- package/static/Provider.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/Repository.f6e570dfe38870a45bf5.js +0 -2
- package/static/Repository.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/UpLinks.f6e570dfe38870a45bf5.js +0 -2
- package/static/UpLinks.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/Version.f6e570dfe38870a45bf5.js +0 -2
- package/static/Version.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/Versions.f6e570dfe38870a45bf5.js +0 -2
- package/static/Versions.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/main.f6e570dfe38870a45bf5.js +0 -2
- package/static/main.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -10
- package/static/runtime.f6e570dfe38870a45bf5.js +0 -2
- package/static/vendors.f6e570dfe38870a45bf5.js +0 -2
- package/static/vendors.f6e570dfe38870a45bf5.js.LICENSE.txt +0 -98
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<UpLinks /> component should render the component when there is no uplink 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"asFragment": [Function],
|
|
6
|
+
"baseElement": <body>
|
|
7
|
+
<div>
|
|
8
|
+
<span
|
|
9
|
+
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom"
|
|
10
|
+
>
|
|
11
|
+
verdaccio has no uplinks.
|
|
12
|
+
</span>
|
|
13
|
+
</div>
|
|
14
|
+
</body>,
|
|
15
|
+
"container": <div>
|
|
16
|
+
<span
|
|
17
|
+
class="MuiTypography-root MuiTypography-subtitle1 MuiTypography-gutterBottom"
|
|
18
|
+
>
|
|
19
|
+
verdaccio has no uplinks.
|
|
20
|
+
</span>
|
|
21
|
+
</div>,
|
|
22
|
+
"debug": [Function],
|
|
23
|
+
"findAllByAltText": [Function],
|
|
24
|
+
"findAllByDisplayValue": [Function],
|
|
25
|
+
"findAllByLabelText": [Function],
|
|
26
|
+
"findAllByPlaceholderText": [Function],
|
|
27
|
+
"findAllByRole": [Function],
|
|
28
|
+
"findAllByTestId": [Function],
|
|
29
|
+
"findAllByText": [Function],
|
|
30
|
+
"findAllByTitle": [Function],
|
|
31
|
+
"findByAltText": [Function],
|
|
32
|
+
"findByDisplayValue": [Function],
|
|
33
|
+
"findByLabelText": [Function],
|
|
34
|
+
"findByPlaceholderText": [Function],
|
|
35
|
+
"findByRole": [Function],
|
|
36
|
+
"findByTestId": [Function],
|
|
37
|
+
"findByText": [Function],
|
|
38
|
+
"findByTitle": [Function],
|
|
39
|
+
"getAllByAltText": [Function],
|
|
40
|
+
"getAllByDisplayValue": [Function],
|
|
41
|
+
"getAllByLabelText": [Function],
|
|
42
|
+
"getAllByPlaceholderText": [Function],
|
|
43
|
+
"getAllByRole": [Function],
|
|
44
|
+
"getAllByTestId": [Function],
|
|
45
|
+
"getAllByText": [Function],
|
|
46
|
+
"getAllByTitle": [Function],
|
|
47
|
+
"getByAltText": [Function],
|
|
48
|
+
"getByDisplayValue": [Function],
|
|
49
|
+
"getByLabelText": [Function],
|
|
50
|
+
"getByPlaceholderText": [Function],
|
|
51
|
+
"getByRole": [Function],
|
|
52
|
+
"getByTestId": [Function],
|
|
53
|
+
"getByText": [Function],
|
|
54
|
+
"getByTitle": [Function],
|
|
55
|
+
"queryAllByAltText": [Function],
|
|
56
|
+
"queryAllByDisplayValue": [Function],
|
|
57
|
+
"queryAllByLabelText": [Function],
|
|
58
|
+
"queryAllByPlaceholderText": [Function],
|
|
59
|
+
"queryAllByRole": [Function],
|
|
60
|
+
"queryAllByTestId": [Function],
|
|
61
|
+
"queryAllByText": [Function],
|
|
62
|
+
"queryAllByTitle": [Function],
|
|
63
|
+
"queryByAltText": [Function],
|
|
64
|
+
"queryByDisplayValue": [Function],
|
|
65
|
+
"queryByLabelText": [Function],
|
|
66
|
+
"queryByPlaceholderText": [Function],
|
|
67
|
+
"queryByRole": [Function],
|
|
68
|
+
"queryByTestId": [Function],
|
|
69
|
+
"queryByText": [Function],
|
|
70
|
+
"queryByTitle": [Function],
|
|
71
|
+
"rerender": [Function],
|
|
72
|
+
"unmount": [Function],
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
|
|
76
|
+
exports[`<UpLinks /> component should render the component with uplinks 1`] = `
|
|
77
|
+
Object {
|
|
78
|
+
"asFragment": [Function],
|
|
79
|
+
"baseElement": .emotion-0 {
|
|
80
|
+
font-weight: 700;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.emotion-2 {
|
|
84
|
+
-webkit-flex: none;
|
|
85
|
+
-ms-flex: none;
|
|
86
|
+
flex: none;
|
|
87
|
+
color: #000;
|
|
88
|
+
opacity: 0.6;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.emotion-4 {
|
|
92
|
+
-webkit-flex: 1 1 auto;
|
|
93
|
+
-ms-flex: 1 1 auto;
|
|
94
|
+
flex: 1 1 auto;
|
|
95
|
+
border-bottom: 1px dotted rgba(0,0,0,0.2);
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
height: 0.5em;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
<body>
|
|
101
|
+
<div>
|
|
102
|
+
<span
|
|
103
|
+
class="MuiTypography-root emotion-0 emotion-1 MuiTypography-subtitle1"
|
|
104
|
+
>
|
|
105
|
+
Uplinks
|
|
106
|
+
</span>
|
|
107
|
+
<ul
|
|
108
|
+
class="MuiList-root MuiList-padding"
|
|
109
|
+
>
|
|
110
|
+
<li
|
|
111
|
+
class="MuiListItem-root MuiListItem-gutters"
|
|
112
|
+
>
|
|
113
|
+
<div
|
|
114
|
+
class="MuiListItemText-root emotion-2 emotion-3"
|
|
115
|
+
>
|
|
116
|
+
<span
|
|
117
|
+
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
|
118
|
+
>
|
|
119
|
+
npmjs
|
|
120
|
+
</span>
|
|
121
|
+
</div>
|
|
122
|
+
<div
|
|
123
|
+
class="emotion-4 emotion-5"
|
|
124
|
+
/>
|
|
125
|
+
<div
|
|
126
|
+
class="MuiListItemText-root emotion-2 emotion-3"
|
|
127
|
+
>
|
|
128
|
+
<span
|
|
129
|
+
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
|
130
|
+
>
|
|
131
|
+
3 years ago
|
|
132
|
+
</span>
|
|
133
|
+
</div>
|
|
134
|
+
</li>
|
|
135
|
+
</ul>
|
|
136
|
+
</div>
|
|
137
|
+
</body>,
|
|
138
|
+
"container": .emotion-0 {
|
|
139
|
+
font-weight: 700;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.emotion-2 {
|
|
143
|
+
-webkit-flex: none;
|
|
144
|
+
-ms-flex: none;
|
|
145
|
+
flex: none;
|
|
146
|
+
color: #000;
|
|
147
|
+
opacity: 0.6;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.emotion-4 {
|
|
151
|
+
-webkit-flex: 1 1 auto;
|
|
152
|
+
-ms-flex: 1 1 auto;
|
|
153
|
+
flex: 1 1 auto;
|
|
154
|
+
border-bottom: 1px dotted rgba(0,0,0,0.2);
|
|
155
|
+
white-space: nowrap;
|
|
156
|
+
height: 0.5em;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
<div>
|
|
160
|
+
<span
|
|
161
|
+
class="MuiTypography-root emotion-0 emotion-1 MuiTypography-subtitle1"
|
|
162
|
+
>
|
|
163
|
+
Uplinks
|
|
164
|
+
</span>
|
|
165
|
+
<ul
|
|
166
|
+
class="MuiList-root MuiList-padding"
|
|
167
|
+
>
|
|
168
|
+
<li
|
|
169
|
+
class="MuiListItem-root MuiListItem-gutters"
|
|
170
|
+
>
|
|
171
|
+
<div
|
|
172
|
+
class="MuiListItemText-root emotion-2 emotion-3"
|
|
173
|
+
>
|
|
174
|
+
<span
|
|
175
|
+
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
|
176
|
+
>
|
|
177
|
+
npmjs
|
|
178
|
+
</span>
|
|
179
|
+
</div>
|
|
180
|
+
<div
|
|
181
|
+
class="emotion-4 emotion-5"
|
|
182
|
+
/>
|
|
183
|
+
<div
|
|
184
|
+
class="MuiListItemText-root emotion-2 emotion-3"
|
|
185
|
+
>
|
|
186
|
+
<span
|
|
187
|
+
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
|
|
188
|
+
>
|
|
189
|
+
3 years ago
|
|
190
|
+
</span>
|
|
191
|
+
</div>
|
|
192
|
+
</li>
|
|
193
|
+
</ul>
|
|
194
|
+
</div>,
|
|
195
|
+
"debug": [Function],
|
|
196
|
+
"findAllByAltText": [Function],
|
|
197
|
+
"findAllByDisplayValue": [Function],
|
|
198
|
+
"findAllByLabelText": [Function],
|
|
199
|
+
"findAllByPlaceholderText": [Function],
|
|
200
|
+
"findAllByRole": [Function],
|
|
201
|
+
"findAllByTestId": [Function],
|
|
202
|
+
"findAllByText": [Function],
|
|
203
|
+
"findAllByTitle": [Function],
|
|
204
|
+
"findByAltText": [Function],
|
|
205
|
+
"findByDisplayValue": [Function],
|
|
206
|
+
"findByLabelText": [Function],
|
|
207
|
+
"findByPlaceholderText": [Function],
|
|
208
|
+
"findByRole": [Function],
|
|
209
|
+
"findByTestId": [Function],
|
|
210
|
+
"findByText": [Function],
|
|
211
|
+
"findByTitle": [Function],
|
|
212
|
+
"getAllByAltText": [Function],
|
|
213
|
+
"getAllByDisplayValue": [Function],
|
|
214
|
+
"getAllByLabelText": [Function],
|
|
215
|
+
"getAllByPlaceholderText": [Function],
|
|
216
|
+
"getAllByRole": [Function],
|
|
217
|
+
"getAllByTestId": [Function],
|
|
218
|
+
"getAllByText": [Function],
|
|
219
|
+
"getAllByTitle": [Function],
|
|
220
|
+
"getByAltText": [Function],
|
|
221
|
+
"getByDisplayValue": [Function],
|
|
222
|
+
"getByLabelText": [Function],
|
|
223
|
+
"getByPlaceholderText": [Function],
|
|
224
|
+
"getByRole": [Function],
|
|
225
|
+
"getByTestId": [Function],
|
|
226
|
+
"getByText": [Function],
|
|
227
|
+
"getByTitle": [Function],
|
|
228
|
+
"queryAllByAltText": [Function],
|
|
229
|
+
"queryAllByDisplayValue": [Function],
|
|
230
|
+
"queryAllByLabelText": [Function],
|
|
231
|
+
"queryAllByPlaceholderText": [Function],
|
|
232
|
+
"queryAllByRole": [Function],
|
|
233
|
+
"queryAllByTestId": [Function],
|
|
234
|
+
"queryAllByText": [Function],
|
|
235
|
+
"queryAllByTitle": [Function],
|
|
236
|
+
"queryByAltText": [Function],
|
|
237
|
+
"queryByDisplayValue": [Function],
|
|
238
|
+
"queryByLabelText": [Function],
|
|
239
|
+
"queryByPlaceholderText": [Function],
|
|
240
|
+
"queryByRole": [Function],
|
|
241
|
+
"queryByTestId": [Function],
|
|
242
|
+
"queryByText": [Function],
|
|
243
|
+
"queryByTitle": [Function],
|
|
244
|
+
"rerender": [Function],
|
|
245
|
+
"unmount": [Function],
|
|
246
|
+
}
|
|
247
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './UpLinks';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import styled from '@emotion/styled';
|
|
2
|
+
|
|
3
|
+
import { default as MuiListItemText } from 'verdaccio-ui/components/ListItemText';
|
|
4
|
+
import Text from 'verdaccio-ui/components/Text';
|
|
5
|
+
import { Theme } from 'verdaccio-ui/design-tokens/theme';
|
|
6
|
+
|
|
7
|
+
export const StyledText = styled(Text)<{ theme?: Theme }>((props) => ({
|
|
8
|
+
fontWeight: props.theme?.fontWeight.bold,
|
|
9
|
+
}));
|
|
10
|
+
|
|
11
|
+
export const Spacer = styled('div')<{ theme?: Theme }>(({ theme }) => ({
|
|
12
|
+
flex: '1 1 auto',
|
|
13
|
+
borderBottom: `1px dotted ${
|
|
14
|
+
theme?.palette.type == 'light' ? 'rgba(0, 0, 0, 0.2)' : 'rgba(255, 255, 255, 0.2)'
|
|
15
|
+
} `,
|
|
16
|
+
whiteSpace: 'nowrap',
|
|
17
|
+
height: '0.5em',
|
|
18
|
+
}));
|
|
19
|
+
|
|
20
|
+
export const ListItemText = styled(MuiListItemText)<{ theme?: Theme }>(({ theme }) => ({
|
|
21
|
+
flex: 'none',
|
|
22
|
+
color: theme?.palette.type == 'light' ? theme?.palette.black : theme?.palette.white,
|
|
23
|
+
opacity: 0.6,
|
|
24
|
+
}));
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MemoryRouter } from 'react-router-dom';
|
|
3
|
+
|
|
4
|
+
import { render, cleanup } from 'verdaccio-ui/utils/test-react-testing-library';
|
|
5
|
+
|
|
6
|
+
import translationEN from '../../../../i18n/crowdin/ui.json';
|
|
7
|
+
import { DetailContext } from '../../context';
|
|
8
|
+
import { DetailContextProps } from '../../version-config';
|
|
9
|
+
|
|
10
|
+
import data from './__partials__/data.json';
|
|
11
|
+
import Versions from './Versions';
|
|
12
|
+
|
|
13
|
+
const detailContextValue: Partial<DetailContextProps> = {
|
|
14
|
+
packageName: 'foo',
|
|
15
|
+
packageMeta: data,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const ComponentToBeRendered: React.FC<{ contextValue: Partial<DetailContextProps> }> = ({
|
|
19
|
+
contextValue,
|
|
20
|
+
}) => (
|
|
21
|
+
<MemoryRouter>
|
|
22
|
+
<DetailContext.Provider value={contextValue}>
|
|
23
|
+
<Versions />
|
|
24
|
+
</DetailContext.Provider>
|
|
25
|
+
</MemoryRouter>
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
describe('<Version /> component', () => {
|
|
29
|
+
afterEach(() => {
|
|
30
|
+
cleanup();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// FIXME: this test is not deterministic (writes `N days ago` in the snapshot, where N is random number)
|
|
34
|
+
test.skip('should render the component in default state', () => {
|
|
35
|
+
const wrapper = render(<ComponentToBeRendered contextValue={detailContextValue} />);
|
|
36
|
+
expect(wrapper).toMatchSnapshot();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test('should render versions', () => {
|
|
40
|
+
const { getByText } = render(<ComponentToBeRendered contextValue={detailContextValue} />);
|
|
41
|
+
|
|
42
|
+
expect(getByText(translationEN.versions['version-history'])).toBeTruthy();
|
|
43
|
+
expect(getByText(translationEN.versions['current-tags'])).toBeTruthy();
|
|
44
|
+
|
|
45
|
+
// pick some versions
|
|
46
|
+
expect(getByText('2.3.0')).toBeTruthy();
|
|
47
|
+
expect(getByText('canary')).toBeTruthy();
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
test('should not render versions', () => {
|
|
51
|
+
const { queryByText } = render(
|
|
52
|
+
<ComponentToBeRendered contextValue={{ packageName: detailContextValue.packageName }} />
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
expect(queryByText(translationEN.versions['version-history'])).toBeFalsy();
|
|
56
|
+
expect(queryByText(translationEN.versions['current-tags'])).toBeFalsy();
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
test.todo('should click on version link');
|
|
60
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
|
|
4
|
+
import { DIST_TAGS } from '../../../../../lib/constants';
|
|
5
|
+
import { DetailContext } from '../../context';
|
|
6
|
+
|
|
7
|
+
import { StyledText } from './styles';
|
|
8
|
+
import VersionsHistoryList from './VersionsHistoryList';
|
|
9
|
+
import VersionsTagList from './VersionsTagList';
|
|
10
|
+
|
|
11
|
+
const Versions: React.FC = () => {
|
|
12
|
+
const detailContext = useContext(DetailContext);
|
|
13
|
+
const { t } = useTranslation();
|
|
14
|
+
|
|
15
|
+
const { packageMeta, packageName } = detailContext;
|
|
16
|
+
|
|
17
|
+
if (!packageMeta) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const { versions = {}, time = {}, [DIST_TAGS]: distTags = {} } = packageMeta;
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
{distTags && Object.keys(distTags).length > 0 && (
|
|
26
|
+
<>
|
|
27
|
+
<StyledText variant="subtitle1">{t('versions.current-tags')}</StyledText>
|
|
28
|
+
<VersionsTagList tags={distTags} />
|
|
29
|
+
</>
|
|
30
|
+
)}
|
|
31
|
+
{versions && Object.keys(versions).length > 0 && packageName && (
|
|
32
|
+
<>
|
|
33
|
+
<StyledText variant="subtitle1">{t('versions.version-history')}</StyledText>
|
|
34
|
+
<VersionsHistoryList packageName={packageName} time={time} versions={versions} />
|
|
35
|
+
</>
|
|
36
|
+
)}
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default Versions;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
|
|
4
|
+
import List from 'verdaccio-ui/components/List';
|
|
5
|
+
import ListItem from 'verdaccio-ui/components/ListItem';
|
|
6
|
+
import { formatDateDistance } from 'verdaccio-ui/utils/package';
|
|
7
|
+
|
|
8
|
+
import { Versions, Time } from '../../../../../types/packageMeta';
|
|
9
|
+
|
|
10
|
+
import { Spacer, ListItemText, StyledLink } from './styles';
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
versions: Versions;
|
|
14
|
+
packageName: string;
|
|
15
|
+
time: Time;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const VersionsHistoryList: React.FC<Props> = ({ versions, packageName, time }) => {
|
|
19
|
+
const { t } = useTranslation();
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<List dense={true}>
|
|
23
|
+
{Object.keys(versions)
|
|
24
|
+
.reverse()
|
|
25
|
+
.map((version) => (
|
|
26
|
+
<ListItem className="version-item" key={version}>
|
|
27
|
+
<StyledLink to={`/-/web/detail/${packageName}/v/${version}`}>
|
|
28
|
+
<ListItemText>{version}</ListItemText>
|
|
29
|
+
</StyledLink>
|
|
30
|
+
<Spacer />
|
|
31
|
+
<ListItemText>
|
|
32
|
+
{time[version] ? formatDateDistance(time[version]) : t('versions.not-available')}
|
|
33
|
+
</ListItemText>
|
|
34
|
+
</ListItem>
|
|
35
|
+
))}
|
|
36
|
+
</List>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default VersionsHistoryList;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import List from 'verdaccio-ui/components/List';
|
|
4
|
+
import ListItem from 'verdaccio-ui/components/ListItem';
|
|
5
|
+
|
|
6
|
+
import { DistTags } from '../../../../../types/packageMeta';
|
|
7
|
+
|
|
8
|
+
import { Spacer, ListItemText } from './styles';
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
tags: DistTags;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const VersionsTagList: React.FC<Props> = ({ tags }) => (
|
|
15
|
+
<List dense={true}>
|
|
16
|
+
{Object.keys(tags)
|
|
17
|
+
.reverse()
|
|
18
|
+
.map((tag) => (
|
|
19
|
+
<ListItem className="version-item" key={tag}>
|
|
20
|
+
<ListItemText>{tag}</ListItemText>
|
|
21
|
+
<Spacer />
|
|
22
|
+
<ListItemText>{tags[tag]}</ListItemText>
|
|
23
|
+
</ListItem>
|
|
24
|
+
))}
|
|
25
|
+
</List>
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export default VersionsTagList;
|