@verdaccio/ui-components 4.0.0-next-8.2 → 4.0.0-next-8.3
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 +9 -1
- package/CHANGELOG.md +2 -273
- package/build/AppTest/AppRoute.js +18 -27
- package/build/AppTest/pages/Front/Home.js +2 -8
- package/build/AppTest/pages/Front/index.js +1 -13
- package/build/AppTest/pages/Version/Version.js +15 -19
- package/build/AppTest/pages/Version/index.js +1 -13
- package/build/Theme/ResetStyles.js +10 -16
- package/build/Theme/StyleBaseline.js +6 -13
- package/build/Theme/ThemeProvider.js +25 -33
- package/build/Theme/colors.js +1 -7
- package/build/Theme/index.js +5 -44
- package/build/Theme/theme.js +26 -32
- package/build/components/ActionBar/ActionBar.js +26 -33
- package/build/components/ActionBar/ActionBarAction.js +59 -59
- package/build/components/ActionBar/index.js +1 -13
- package/build/components/Author/Author.js +17 -23
- package/build/components/Author/index.js +1 -13
- package/build/components/Author/styles.js +5 -12
- package/build/components/CopyClipboard/CopyToClipBoard.js +40 -40
- package/build/components/CopyClipboard/index.js +2 -20
- package/build/components/CopyClipboard/utils.js +1 -8
- package/build/components/Dependencies/Dependencies.js +27 -34
- package/build/components/Dependencies/DependencyBlock.js +29 -35
- package/build/components/Dependencies/index.js +1 -13
- package/build/components/Dependencies/types.js +1 -5
- package/build/components/Dependencies/utits.js +1 -7
- package/build/components/Deprecated/Deprecated.js +10 -16
- package/build/components/Deprecated/index.js +1 -13
- package/build/components/Developers/DeveloperType.js +1 -7
- package/build/components/Developers/Developers.js +29 -37
- package/build/components/Developers/Title.js +26 -29
- package/build/components/Developers/get-unique-developer-values.js +1 -7
- package/build/components/Developers/index.js +2 -20
- package/build/components/Distribution/Dist.js +29 -32
- package/build/components/Distribution/index.js +1 -13
- package/build/components/Distribution/styles.js +7 -14
- package/build/components/Engines/Engines.js +53 -54
- package/build/components/Engines/index.js +1 -13
- package/build/components/Engines/styles.js +5 -12
- package/build/components/ErrorBoundary/ErrorBoundary.js +5 -14
- package/build/components/ErrorBoundary/index.js +1 -13
- package/build/components/Forbidden/Forbidden.js +33 -35
- package/build/components/Forbidden/index.js +1 -13
- package/build/components/FundButton/FundButton.js +42 -41
- package/build/components/FundButton/index.js +1 -13
- package/build/components/HeaderInfoDialog/HeaderInfoDialog.js +39 -41
- package/build/components/HeaderInfoDialog/index.js +1 -13
- package/build/components/Heading/Heading.js +12 -17
- package/build/components/Heading/index.js +1 -13
- package/build/components/Help/Help.js +23 -31
- package/build/components/Help/index.js +1 -13
- package/build/components/Help/styles.js +3 -10
- package/build/components/Icons/DevsIcons/CommonJS.js +4 -11
- package/build/components/Icons/DevsIcons/ES6Module.js +4 -11
- package/build/components/Icons/DevsIcons/Git.js +4 -11
- package/build/components/Icons/DevsIcons/NodeJS.js +4 -11
- package/build/components/Icons/DevsIcons/TypeScript.js +4 -11
- package/build/components/Icons/DevsIcons/index.js +5 -40
- package/build/components/Icons/Earth.js +13 -19
- package/build/components/Icons/FileBinary.js +6 -12
- package/build/components/Icons/Law.js +6 -12
- package/build/components/Icons/License.js +7 -13
- package/build/components/Icons/License.js.map +1 -1
- package/build/components/Icons/Managers/Npm.js +4 -11
- package/build/components/Icons/Managers/Pnpm.js +4 -11
- package/build/components/Icons/Managers/Yarn.js +4 -11
- package/build/components/Icons/Managers/index.js +3 -26
- package/build/components/Icons/SvgIcon.js +27 -23
- package/build/components/Icons/Time.js +8 -14
- package/build/components/Icons/Version.js +6 -12
- package/build/components/Icons/index.js +8 -79
- package/build/components/Install/Install.js +32 -39
- package/build/components/Install/InstallListItem.js +47 -52
- package/build/components/Install/index.js +1 -13
- package/build/components/Keywords/KeywordListItems.js +11 -17
- package/build/components/Keywords/Keywords.js +20 -25
- package/build/components/Keywords/index.js +1 -13
- package/build/components/Label/Label.js +17 -18
- package/build/components/Label/index.js +1 -13
- package/build/components/Link/Link.js +16 -22
- package/build/components/Link/index.js +1 -13
- package/build/components/LinkExternal/LinkExternal.js +15 -19
- package/build/components/LinkExternal/index.js +1 -13
- package/build/components/Loading/Loading.js +8 -15
- package/build/components/Loading/Spinner/Spinner.js +41 -35
- package/build/components/Loading/Spinner/index.js +1 -13
- package/build/components/Loading/index.js +1 -13
- package/build/components/Loading/styles.js +15 -19
- package/build/components/LoginDialog/LoginDialog.js +72 -68
- package/build/components/LoginDialog/LoginDialogCloseButton.js +28 -31
- package/build/components/LoginDialog/LoginDialogForm.js +46 -45
- package/build/components/LoginDialog/LoginDialogFormError.js +34 -36
- package/build/components/LoginDialog/LoginDialogHeader.js +42 -42
- package/build/components/LoginDialog/index.js +1 -13
- package/build/components/Logo/Logo.js +44 -47
- package/build/components/Logo/index.js +1 -13
- package/build/components/MenuItem/MenuItem.js +7 -16
- package/build/components/MenuItem/index.js +1 -13
- package/build/components/NoItems/NoItems.js +16 -17
- package/build/components/NoItems/index.js +1 -13
- package/build/components/NotFound/NotFound.js +31 -35
- package/build/components/NotFound/index.js +1 -13
- package/build/components/Package/Package.js +105 -100
- package/build/components/Package/index.js +1 -20
- package/build/components/Package/styles.js +78 -73
- package/build/components/PackageList/PackageList.js +56 -57
- package/build/components/PackageList/index.js +1 -13
- package/build/components/Person/Person.js +22 -28
- package/build/components/Person/PersonTooltip.js +17 -21
- package/build/components/Person/index.js +1 -13
- package/build/components/Person/utils.js +6 -14
- package/build/components/RawViewer/RawViewer.js +27 -33
- package/build/components/RawViewer/index.js +1 -13
- package/build/components/Readme/Readme.js +21 -27
- package/build/components/Readme/Readme.js.map +1 -1
- package/build/components/Readme/Readme.spec.js +10 -13
- package/build/components/Readme/Readme.spec.js.map +1 -1
- package/build/components/Readme/index.js +1 -13
- package/build/components/Readme/types.js +1 -5
- package/build/components/Readme/utils.js +8 -16
- package/build/components/RegistryInfoDialog/RegistryInfoDialog.js +18 -24
- package/build/components/RegistryInfoDialog/index.js +1 -13
- package/build/components/RegistryInfoDialog/styles.js +34 -32
- package/build/components/RegistryInfoDialog/types.js +1 -5
- package/build/components/Repository/Repository.js +36 -41
- package/build/components/Repository/index.js +1 -13
- package/build/components/Search/AutoComplete/AutoComplete.js +22 -31
- package/build/components/Search/AutoComplete/index.js +1 -13
- package/build/components/Search/AutoComplete/styles.js +2 -9
- package/build/components/Search/Search.js +71 -69
- package/build/components/Search/SearchItem.js +87 -79
- package/build/components/Search/index.js +1 -13
- package/build/components/Search/styles.js +7 -14
- package/build/components/Search/utils.js +3 -9
- package/build/components/SettingsMenu/SettingsMenu.js +56 -57
- package/build/components/SettingsMenu/index.js +1 -13
- package/build/components/SideBarTitle/SideBarTitle.js +52 -51
- package/build/components/SideBarTitle/index.js +1 -13
- package/build/components/SideBarTitle/utils.js +6 -15
- package/build/components/TextField/TextField.js +22 -21
- package/build/components/TextField/index.js +1 -13
- package/build/components/UpLinks/UpLinks.js +32 -38
- package/build/components/UpLinks/UplinkLink.js +12 -18
- package/build/components/UpLinks/index.js +1 -13
- package/build/components/UpLinks/styles.js +28 -29
- package/build/components/Versions/HistoryList.js +56 -60
- package/build/components/Versions/TagList.js +29 -33
- package/build/components/Versions/Versions.js +44 -52
- package/build/components/Versions/index.js +1 -13
- package/build/components/Versions/styles.js +26 -27
- package/build/components/Versions/types.js +1 -5
- package/build/hooks/index.js +2 -20
- package/build/hooks/useLocalStorage.js +7 -12
- package/build/hooks/useOnClickOutside.js +4 -9
- package/build/index.js +63 -530
- package/build/layouts/Version/Version.js +9 -16
- package/build/layouts/Version/index.js +1 -13
- package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js +24 -31
- package/build/providers/AppConfigurationProvider/index.js +1 -20
- package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js +15 -24
- package/build/providers/PersistenceSettingProvider/index.js +1 -20
- package/build/providers/TranslatorProvider/TranslatorProvider.js +24 -30
- package/build/providers/TranslatorProvider/TranslatorProvider.spec.js +19 -22
- package/build/providers/TranslatorProvider/index.js +1 -26
- package/build/providers/VersionProvider/VersionProvider.js +27 -29
- package/build/providers/VersionProvider/index.js +1 -20
- package/build/providers/index.js +3 -38
- package/build/sections/Detail/ContainerContent.js +20 -28
- package/build/sections/Detail/Detail.js +22 -30
- package/build/sections/Detail/ReadmeSection.js +8 -14
- package/build/sections/Detail/Tabs.js +20 -26
- package/build/sections/Detail/index.js +1 -13
- package/build/sections/Footer/Footer.js +73 -70
- package/build/sections/Footer/index.js +1 -13
- package/build/sections/Footer/styles.js +62 -57
- package/build/sections/Header/Header.js +34 -42
- package/build/sections/Header/HeaderGreetings.js +12 -18
- package/build/sections/Header/HeaderLeft.js +25 -29
- package/build/sections/Header/HeaderMenu.js +23 -29
- package/build/sections/Header/HeaderRight.js +41 -49
- package/build/sections/Header/HeaderSettingsDialog.js +60 -58
- package/build/sections/Header/HeaderToolTip.js +13 -17
- package/build/sections/Header/HeaderToolTipIcon.js +23 -31
- package/build/sections/Header/LanguageSwitch.js +51 -54
- package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js +75 -80
- package/build/sections/Header/RegistryInfoContent/index.js +1 -13
- package/build/sections/Header/RegistryInfoContent/styles.js +12 -16
- package/build/sections/Header/index.js +1 -13
- package/build/sections/Header/styles.js +32 -36
- package/build/sections/Home/Home.js +14 -19
- package/build/sections/Home/index.js +1 -13
- package/build/sections/SideBar/Sidebar.js +40 -47
- package/build/sections/SideBar/index.js +1 -13
- package/build/sections/index.js +2 -20
- package/build/src/Theme/index.d.ts +1 -1
- package/build/store/api.js +28 -29
- package/build/store/index.js +3 -51
- package/build/store/models/configuration.js +20 -22
- package/build/store/models/download.js +26 -27
- package/build/store/models/index.js +13 -19
- package/build/store/models/login.js +60 -63
- package/build/store/models/manifest.js +57 -58
- package/build/store/models/packages.js +29 -27
- package/build/store/models/routes.js +1 -7
- package/build/store/models/search.js +62 -61
- package/build/store/models/utils.js +1 -7
- package/build/store/storage.js +4 -11
- package/build/store/store.js +6 -13
- package/build/test/i18n-config.js +4 -11
- package/build/test/test-react-testing-library.js +32 -50
- package/build/types/index.js +1 -5
- package/build/types/packageMeta.js +1 -5
- package/build/utils/__partials__/packageMeta.js +1 -7
- package/build/utils/cli-utils.js +12 -32
- package/build/utils/index.js +8 -74
- package/build/utils/loadable.js +6 -14
- package/build/utils/routes.js +1 -7
- package/build/utils/token.js +11 -18
- package/build/utils/url.js +12 -22
- package/build/utils/utils.js +32 -46
- package/package.json +11 -9
- package/src/AppTest/AppRoute.test.tsx +5 -4
- package/src/Theme/index.ts +1 -1
- package/src/components/Author/Author.test.tsx +2 -1
- package/src/components/CopyClipboard/CopyToClipBoard.test.tsx +2 -1
- package/src/components/Dependencies/Dependencies.test.tsx +7 -0
- package/src/components/Dependencies/DependencyBlock.test.tsx +3 -2
- package/src/components/Engines/Engines.test.tsx +3 -2
- package/src/components/ErrorBoundary/ErrorBoundary.test.tsx +2 -1
- package/src/components/Forbidden/Forbidden.test.tsx +3 -2
- package/src/components/HeaderInfoDialog/HeaderInfoDialog.test.tsx +2 -1
- package/src/components/LoginDialog/LoginDialog.test.tsx +8 -7
- package/src/components/NotFound/Notfound.test.tsx +3 -2
- package/src/components/PackageList/Packagelist.test.tsx +2 -1
- package/src/components/Search/Search.test.tsx +9 -8
- package/src/components/Versions/Versions.test.tsx +8 -8
- package/src/providers/TranslatorProvider/TranslatorProvider.spec.tsx +2 -1
- package/src/providers/VersionProvider/VersionProvider.tsx +5 -2
- package/src/sections/Home/Home.test.tsx +7 -3
- package/src/sections/SideBar/Sidebar.test.tsx +8 -7
- package/src/sections/SideBar/Sidebar.tsx +1 -0
- package/src/store/api.test.ts +8 -6
- package/src/store/models/login.test.ts +24 -20
- package/src/test/test-react-testing-library.tsx +3 -5
- package/src/utils/cli-utils.test.ts +10 -9
- package/src/utils/token.test.ts +5 -3
- package/tsconfig.build.json +1 -1
- package/vitest/api/glob-sidebar.json +12520 -0
- package/vitest/api/got-sidebar.json +23346 -0
- package/vitest/api/home-packages.json +40 -0
- package/vitest/api/jquery-readme.js +3 -0
- package/vitest/api/jquery-sidebar.json +5908 -0
- package/vitest/api/search-verdaccio.json +1192 -0
- package/vitest/api/storybook-readme.js +3 -0
- package/vitest/api/storybook-sidebar.json +53782 -0
- package/vitest/api/storybook-v.json +53782 -0
- package/vitest/identity.js +29 -0
- package/vitest/react-markdown.tsx +7 -0
- package/vitest/server-handlers.ts +82 -0
- package/vitest/server.ts +6 -0
- package/vitest/setup-env.ts +33 -0
- package/vitest/setup.ts +40 -0
- package/vitest/unit/components/__mocks__/token.ts +33 -0
- package/vitest/unit/empty-string.ts +1 -0
- package/vitest/unit/empty.ts +1 -0
- package/vitest/vitestSerializer.ts +31 -0
- package/vitest.config.mjs +39 -0
- package/build/__mocks__/react-markdown.js +0 -18
- package/build/__mocks__/remark-plugin.js +0 -8
- package/build/src/__mocks__/react-markdown.d.ts +0 -4
- package/build/src/__mocks__/remark-plugin.d.ts +0 -1
- package/src/__mocks__/react-markdown.tsx +0 -8
- package/src/__mocks__/remark-plugin.ts +0 -1
package/build/Theme/theme.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
const colors = {
|
|
1
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
import { createTheme } from '@mui/material/styles';
|
|
7
|
+
import { PRIMARY_COLOR } from './colors';
|
|
8
|
+
var colors = {
|
|
10
9
|
black: '#000',
|
|
11
10
|
white: '#fff',
|
|
12
11
|
red: '#d32f2f',
|
|
@@ -27,22 +26,19 @@ const colors = {
|
|
|
27
26
|
love: '#e25555',
|
|
28
27
|
nobel01: '#999999',
|
|
29
28
|
nobel02: '#9f9f9f',
|
|
30
|
-
primary:
|
|
29
|
+
primary: PRIMARY_COLOR,
|
|
31
30
|
secondary: '#20232a',
|
|
32
31
|
background: '#f4f4f4',
|
|
33
32
|
dodgerBlue: '#1ba1f2',
|
|
34
33
|
cyanBlue: '#253341'
|
|
35
34
|
};
|
|
36
|
-
|
|
37
|
-
light: {
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
dark: {
|
|
41
|
-
...colors,
|
|
35
|
+
var themeModes = {
|
|
36
|
+
light: _objectSpread({}, colors),
|
|
37
|
+
dark: _objectSpread(_objectSpread({}, colors), {}, {
|
|
42
38
|
primary: '#ffffff',
|
|
43
39
|
secondary: '#424242',
|
|
44
40
|
background: '#1a202c'
|
|
45
|
-
}
|
|
41
|
+
})
|
|
46
42
|
};
|
|
47
43
|
function applyPrimaryColor(mode, primaryColor) {
|
|
48
44
|
if (mode === 'light') {
|
|
@@ -50,7 +46,7 @@ function applyPrimaryColor(mode, primaryColor) {
|
|
|
50
46
|
}
|
|
51
47
|
return themeModes[mode];
|
|
52
48
|
}
|
|
53
|
-
|
|
49
|
+
var fontSize = {
|
|
54
50
|
xxl: 26,
|
|
55
51
|
xl: 24,
|
|
56
52
|
lg: 21,
|
|
@@ -59,13 +55,13 @@ const fontSize = {
|
|
|
59
55
|
sm: 14,
|
|
60
56
|
ssm: 12
|
|
61
57
|
};
|
|
62
|
-
|
|
58
|
+
var fontWeight = {
|
|
63
59
|
light: 300,
|
|
64
60
|
regular: 400,
|
|
65
61
|
semiBold: 500,
|
|
66
62
|
bold: 700
|
|
67
63
|
};
|
|
68
|
-
|
|
64
|
+
export var breakPoints = {
|
|
69
65
|
xsmall: 400,
|
|
70
66
|
small: 576,
|
|
71
67
|
medium: 768,
|
|
@@ -73,20 +69,20 @@ const breakPoints = exports.breakPoints = {
|
|
|
73
69
|
container: 1240,
|
|
74
70
|
xlarge: 1275
|
|
75
71
|
};
|
|
76
|
-
|
|
72
|
+
var customizedTheme = {
|
|
77
73
|
fontSize,
|
|
78
74
|
fontWeight,
|
|
79
75
|
breakPoints
|
|
80
76
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return
|
|
77
|
+
export var getTheme = (themeMode, primaryColor) => {
|
|
78
|
+
var palette = applyPrimaryColor(themeMode, primaryColor);
|
|
79
|
+
return createTheme(_objectSpread({
|
|
84
80
|
typography: {
|
|
85
81
|
fontFamily: ['-apple-system', 'BlinkMacSystemFont', '"Helvetica Neue"', 'Arial', 'sans-serif'].join(',')
|
|
86
82
|
},
|
|
87
|
-
palette: {
|
|
88
|
-
mode: themeMode
|
|
89
|
-
|
|
83
|
+
palette: _objectSpread(_objectSpread({
|
|
84
|
+
mode: themeMode
|
|
85
|
+
}, palette), {}, {
|
|
90
86
|
primary: {
|
|
91
87
|
main: palette.primary
|
|
92
88
|
},
|
|
@@ -99,7 +95,7 @@ const getTheme = (themeMode, primaryColor) => {
|
|
|
99
95
|
background: {
|
|
100
96
|
default: palette.background
|
|
101
97
|
}
|
|
102
|
-
},
|
|
98
|
+
}),
|
|
103
99
|
// Looks better in darkmode without background opacity
|
|
104
100
|
// https://mui.com/material-ui/migration/v5-component-changes/#change-dark-mode-background-opacity
|
|
105
101
|
components: {
|
|
@@ -110,9 +106,7 @@ const getTheme = (themeMode, primaryColor) => {
|
|
|
110
106
|
}
|
|
111
107
|
}
|
|
112
108
|
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
});
|
|
109
|
+
}
|
|
110
|
+
}, customizedTheme));
|
|
116
111
|
};
|
|
117
|
-
exports.getTheme = getTheme;
|
|
118
112
|
//# sourceMappingURL=theme.js.map
|
|
@@ -1,47 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const ActionBar = ({
|
|
18
|
-
showRaw,
|
|
19
|
-
showDownloadTarball = true,
|
|
20
|
-
packageMeta
|
|
21
|
-
}) => {
|
|
22
|
-
const [isRawViewerOpen, setIsRawViewerOpen] = (0, _react.useState)(false);
|
|
23
|
-
if (!packageMeta?.latest) {
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
/* eslint-disable verdaccio/jsx-spread */
|
|
3
|
+
import Box from '@mui/material/Box';
|
|
4
|
+
import Stack from '@mui/material/Stack';
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
|
+
import { url } from '../../utils';
|
|
7
|
+
import RawViewer from '../RawViewer';
|
|
8
|
+
import ActionBarAction from './ActionBarAction';
|
|
9
|
+
var ActionBar = _ref => {
|
|
10
|
+
var {
|
|
11
|
+
showRaw,
|
|
12
|
+
showDownloadTarball = true,
|
|
13
|
+
packageMeta
|
|
14
|
+
} = _ref;
|
|
15
|
+
var [isRawViewerOpen, setIsRawViewerOpen] = useState(false);
|
|
16
|
+
if (!(packageMeta !== null && packageMeta !== void 0 && packageMeta.latest)) {
|
|
24
17
|
return null;
|
|
25
18
|
}
|
|
26
|
-
|
|
19
|
+
var {
|
|
27
20
|
homepage,
|
|
28
21
|
bugs,
|
|
29
22
|
dist
|
|
30
23
|
} = packageMeta.latest;
|
|
31
|
-
|
|
32
|
-
if (homepage &&
|
|
24
|
+
var actions = [];
|
|
25
|
+
if (homepage && url.isURL(homepage)) {
|
|
33
26
|
actions.push({
|
|
34
27
|
type: 'VISIT_HOMEPAGE',
|
|
35
28
|
link: homepage
|
|
36
29
|
});
|
|
37
30
|
}
|
|
38
|
-
if (bugs
|
|
31
|
+
if (bugs !== null && bugs !== void 0 && bugs.url && url.isURL(bugs.url)) {
|
|
39
32
|
actions.push({
|
|
40
33
|
type: 'OPEN_AN_ISSUE',
|
|
41
34
|
link: bugs.url
|
|
42
35
|
});
|
|
43
36
|
}
|
|
44
|
-
if (dist
|
|
37
|
+
if (dist !== null && dist !== void 0 && dist.tarball && url.isURL(dist.tarball) && showDownloadTarball) {
|
|
45
38
|
actions.push({
|
|
46
39
|
type: 'DOWNLOAD_TARBALL',
|
|
47
40
|
link: dist.tarball
|
|
@@ -53,18 +46,18 @@ const ActionBar = ({
|
|
|
53
46
|
action: () => setIsRawViewerOpen(true)
|
|
54
47
|
});
|
|
55
48
|
}
|
|
56
|
-
return /*#__PURE__*/
|
|
49
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
57
50
|
alignItems: "center",
|
|
58
51
|
display: "flex",
|
|
59
52
|
sx: {
|
|
60
53
|
my: 2
|
|
61
54
|
}
|
|
62
|
-
}, /*#__PURE__*/
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
63
56
|
direction: "row",
|
|
64
57
|
spacing: 1
|
|
65
|
-
}, actions.map(action => /*#__PURE__*/
|
|
58
|
+
}, actions.map(action => /*#__PURE__*/React.createElement(ActionBarAction, _extends({
|
|
66
59
|
key: action.type
|
|
67
|
-
}, action))), isRawViewerOpen && /*#__PURE__*/
|
|
60
|
+
}, action))), isRawViewerOpen && /*#__PURE__*/React.createElement(RawViewer, {
|
|
68
61
|
isOpen: isRawViewerOpen,
|
|
69
62
|
onClose: () => {
|
|
70
63
|
setIsRawViewerOpen(false);
|
|
@@ -72,5 +65,5 @@ const ActionBar = ({
|
|
|
72
65
|
packageMeta: packageMeta
|
|
73
66
|
})));
|
|
74
67
|
};
|
|
75
|
-
|
|
68
|
+
export default ActionBar;
|
|
76
69
|
//# sourceMappingURL=ActionBar.js.map
|
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
var _reactI18next = require("react-i18next");
|
|
17
|
-
var _reactRedux = require("react-redux");
|
|
18
|
-
var _LinkExternal = _interopRequireDefault(require("../LinkExternal"));
|
|
19
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
-
const Fab = exports.Fab = /*#__PURE__*/(0, _base.default)(_Fab.default, process.env.NODE_ENV === "production" ? {
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
2
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
3
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
4
|
+
import BugReportIcon from '@mui/icons-material/BugReport';
|
|
5
|
+
import DownloadIcon from '@mui/icons-material/CloudDownload';
|
|
6
|
+
import HomeIcon from '@mui/icons-material/Home';
|
|
7
|
+
import RawOnIcon from '@mui/icons-material/RawOn';
|
|
8
|
+
import CircularProgress from '@mui/material/CircularProgress';
|
|
9
|
+
import FabMUI from '@mui/material/Fab';
|
|
10
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
11
|
+
import React, { useCallback } from 'react';
|
|
12
|
+
import { useTranslation } from 'react-i18next';
|
|
13
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
14
|
+
import LinkExternal from '../LinkExternal';
|
|
15
|
+
export var Fab = /*#__PURE__*/_styled(FabMUI, process.env.NODE_ENV === "production" ? {
|
|
23
16
|
target: "e1yxykdq0"
|
|
24
17
|
} : {
|
|
25
18
|
target: "e1yxykdq0",
|
|
26
19
|
label: "Fab"
|
|
27
|
-
})(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
20
|
+
})(_ref => {
|
|
21
|
+
var {
|
|
22
|
+
theme
|
|
23
|
+
} = _ref;
|
|
24
|
+
return {
|
|
25
|
+
backgroundColor: theme.palette.mode === 'light' ? theme.palette.primary.main : theme.palette.cyanBlue,
|
|
26
|
+
'&:hover': {
|
|
27
|
+
color: theme.palette.mode === 'light' ? theme.palette.primary.main : theme.palette.cyanBlue
|
|
28
|
+
},
|
|
29
|
+
color: theme.palette.white
|
|
30
|
+
};
|
|
31
|
+
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0FjdGlvbkJhci9BY3Rpb25CYXJBY3Rpb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWdCbUIiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvQWN0aW9uQmFyL0FjdGlvbkJhckFjdGlvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgQnVnUmVwb3J0SWNvbiBmcm9tICdAbXVpL2ljb25zLW1hdGVyaWFsL0J1Z1JlcG9ydCc7XG5pbXBvcnQgRG93bmxvYWRJY29uIGZyb20gJ0BtdWkvaWNvbnMtbWF0ZXJpYWwvQ2xvdWREb3dubG9hZCc7XG5pbXBvcnQgSG9tZUljb24gZnJvbSAnQG11aS9pY29ucy1tYXRlcmlhbC9Ib21lJztcbmltcG9ydCBSYXdPbkljb24gZnJvbSAnQG11aS9pY29ucy1tYXRlcmlhbC9SYXdPbic7XG5pbXBvcnQgQ2lyY3VsYXJQcm9ncmVzcyBmcm9tICdAbXVpL21hdGVyaWFsL0NpcmN1bGFyUHJvZ3Jlc3MnO1xuaW1wb3J0IEZhYk1VSSBmcm9tICdAbXVpL21hdGVyaWFsL0ZhYic7XG5pbXBvcnQgVG9vbHRpcCBmcm9tICdAbXVpL21hdGVyaWFsL1Rvb2x0aXAnO1xuaW1wb3J0IFJlYWN0LCB7IHV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PC9Ub29sdGlwPlxuICAgICAgKTtcbiAgICBjYXNlICdSQVdfREFUQSc6XG4gICAgICByZXR1cm4gKFxuICAgICAgICA8VG9vbHRpcCB0aXRsZT17dCgnYWN0aW9uLWJhci1hY3Rpb24ucmF3JykgYXMgc3RyaW5nfT5cbiAgICAgICAgICA8RmFiIGRhdGEtdGVzdGlkPVwicmF3LWJ0blwiIG9uQ2xpY2s9e2FjdGlvbn0gc2l6ZT1cInNtYWxsXCI+XG4gICAgICAgICAgICA8UmF3T25JY29uIC8+XG4gICAgICAgICAgPC9GYWI+XG4gICAgICAgIDwvVG9vbHRpcD5cbiAgICAgICk7XG4gIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IEFjdGlvbkJhckFjdGlvbjtcbiJdfQ== */");
|
|
36
32
|
/* eslint-disable react/jsx-no-bind */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
var ActionBarAction = _ref2 => {
|
|
34
|
+
var {
|
|
35
|
+
type,
|
|
36
|
+
link,
|
|
37
|
+
action
|
|
38
|
+
} = _ref2;
|
|
39
|
+
var {
|
|
43
40
|
t
|
|
44
|
-
} =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
} = useTranslation();
|
|
42
|
+
var dispatch = useDispatch();
|
|
43
|
+
var isLoading = useSelector(state => {
|
|
44
|
+
var _state$loading;
|
|
45
|
+
return state === null || state === void 0 || (_state$loading = state.loading) === null || _state$loading === void 0 ? void 0 : _state$loading.models.download;
|
|
46
|
+
});
|
|
47
|
+
var handleDownload = useCallback(/*#__PURE__*/_asyncToGenerator(function* () {
|
|
48
48
|
dispatch.download.getTarball({
|
|
49
49
|
link
|
|
50
50
|
});
|
|
51
|
-
}, [dispatch, link]);
|
|
51
|
+
}), [dispatch, link]);
|
|
52
52
|
switch (type) {
|
|
53
53
|
case 'VISIT_HOMEPAGE':
|
|
54
|
-
return /*#__PURE__*/
|
|
54
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
55
55
|
title: t('action-bar-action.visit-home-page')
|
|
56
|
-
}, /*#__PURE__*/
|
|
56
|
+
}, /*#__PURE__*/React.createElement(LinkExternal, {
|
|
57
57
|
to: link,
|
|
58
58
|
variant: "button"
|
|
59
|
-
}, /*#__PURE__*/
|
|
59
|
+
}, /*#__PURE__*/React.createElement(Fab, {
|
|
60
60
|
size: "small"
|
|
61
|
-
}, /*#__PURE__*/
|
|
61
|
+
}, /*#__PURE__*/React.createElement(HomeIcon, null))));
|
|
62
62
|
case 'OPEN_AN_ISSUE':
|
|
63
|
-
return /*#__PURE__*/
|
|
63
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
64
64
|
title: t('action-bar-action.open-an-issue')
|
|
65
|
-
}, /*#__PURE__*/
|
|
65
|
+
}, /*#__PURE__*/React.createElement(LinkExternal, {
|
|
66
66
|
to: link,
|
|
67
67
|
variant: "button"
|
|
68
|
-
}, /*#__PURE__*/
|
|
68
|
+
}, /*#__PURE__*/React.createElement(Fab, {
|
|
69
69
|
size: "small"
|
|
70
|
-
}, /*#__PURE__*/
|
|
70
|
+
}, /*#__PURE__*/React.createElement(BugReportIcon, null))));
|
|
71
71
|
case 'DOWNLOAD_TARBALL':
|
|
72
|
-
return /*#__PURE__*/
|
|
72
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
73
73
|
title: t('action-bar-action.download-tarball')
|
|
74
|
-
}, isLoading ? /*#__PURE__*/
|
|
74
|
+
}, isLoading ? /*#__PURE__*/React.createElement(CircularProgress, {
|
|
75
75
|
sx: {
|
|
76
76
|
marginX: 0
|
|
77
77
|
}
|
|
78
|
-
}, /*#__PURE__*/
|
|
78
|
+
}, /*#__PURE__*/React.createElement(Fab, {
|
|
79
79
|
"data-testid": "download-tarball-btn",
|
|
80
80
|
onClick: handleDownload,
|
|
81
81
|
size: "small"
|
|
82
|
-
}, /*#__PURE__*/
|
|
82
|
+
}, /*#__PURE__*/React.createElement(DownloadIcon, null))) : /*#__PURE__*/React.createElement(Fab, {
|
|
83
83
|
"data-testid": "download-tarball-btn",
|
|
84
84
|
onClick: handleDownload,
|
|
85
85
|
size: "small"
|
|
86
|
-
}, /*#__PURE__*/
|
|
86
|
+
}, /*#__PURE__*/React.createElement(DownloadIcon, null)));
|
|
87
87
|
case 'RAW_DATA':
|
|
88
|
-
return /*#__PURE__*/
|
|
88
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
89
89
|
title: t('action-bar-action.raw')
|
|
90
|
-
}, /*#__PURE__*/
|
|
90
|
+
}, /*#__PURE__*/React.createElement(Fab, {
|
|
91
91
|
"data-testid": "raw-btn",
|
|
92
92
|
onClick: action,
|
|
93
93
|
size: "small"
|
|
94
|
-
}, /*#__PURE__*/
|
|
94
|
+
}, /*#__PURE__*/React.createElement(RawOnIcon, null)));
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
|
|
97
|
+
export default ActionBarAction;
|
|
98
98
|
//# sourceMappingURL=ActionBarAction.js.map
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "default", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _ActionBar.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _ActionBar = _interopRequireDefault(require("./ActionBar"));
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1
|
+
export { default } from './ActionBar';
|
|
14
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
var _styles = require("./styles");
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
const Author = ({
|
|
14
|
-
packageMeta
|
|
15
|
-
}) => {
|
|
16
|
-
const {
|
|
1
|
+
import List from '@mui/material/List';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import Person from '../Person';
|
|
5
|
+
import { AuthorListItem, StyledText } from './styles';
|
|
6
|
+
var Author = _ref => {
|
|
7
|
+
var {
|
|
8
|
+
packageMeta
|
|
9
|
+
} = _ref;
|
|
10
|
+
var {
|
|
17
11
|
t
|
|
18
|
-
} =
|
|
12
|
+
} = useTranslation();
|
|
19
13
|
if (!packageMeta) {
|
|
20
14
|
return null;
|
|
21
15
|
}
|
|
22
|
-
|
|
16
|
+
var {
|
|
23
17
|
author,
|
|
24
18
|
name: packageName,
|
|
25
19
|
version
|
|
@@ -27,20 +21,20 @@ const Author = ({
|
|
|
27
21
|
if (!author) {
|
|
28
22
|
return null;
|
|
29
23
|
}
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
-
subheader: /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/React.createElement(List, {
|
|
25
|
+
subheader: /*#__PURE__*/React.createElement(StyledText, {
|
|
32
26
|
variant: 'subtitle1'
|
|
33
27
|
}, t('sidebar.author.title'))
|
|
34
|
-
}, /*#__PURE__*/
|
|
28
|
+
}, /*#__PURE__*/React.createElement(AuthorListItem, {
|
|
35
29
|
sx: {
|
|
36
30
|
my: 1
|
|
37
31
|
}
|
|
38
|
-
}, /*#__PURE__*/
|
|
32
|
+
}, /*#__PURE__*/React.createElement(Person, {
|
|
39
33
|
packageName: packageName,
|
|
40
34
|
person: author,
|
|
41
35
|
version: version,
|
|
42
36
|
withText: true
|
|
43
37
|
})));
|
|
44
38
|
};
|
|
45
|
-
|
|
39
|
+
export default Author;
|
|
46
40
|
//# sourceMappingURL=Author.js.map
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "default", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Author.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _Author = _interopRequireDefault(require("./Author"));
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1
|
+
export { default } from './Author';
|
|
14
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.StyledText = exports.AuthorListItem = void 0;
|
|
7
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
8
|
-
var _material = require("@mui/material");
|
|
9
|
-
var _ListItem = _interopRequireDefault(require("@mui/material/ListItem"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
11
2
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
12
|
-
|
|
3
|
+
import { Typography } from '@mui/material';
|
|
4
|
+
import ListItem from '@mui/material/ListItem';
|
|
5
|
+
export var StyledText = /*#__PURE__*/_styled(Typography, process.env.NODE_ENV === "production" ? {
|
|
13
6
|
target: "e4ifo371"
|
|
14
7
|
} : {
|
|
15
8
|
target: "e4ifo371",
|
|
@@ -17,7 +10,7 @@ const StyledText = exports.StyledText = /*#__PURE__*/(0, _base.default)(_materia
|
|
|
17
10
|
})(props => ({
|
|
18
11
|
fontWeight: props.theme.fontWeight.bold
|
|
19
12
|
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F1dGhvci9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBTTBCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0F1dGhvci9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBUeXBvZ3JhcGh5IH0gZnJvbSAnQG11aS9tYXRlcmlhbCc7XG5pbXBvcnQgTGlzdEl0ZW0gZnJvbSAnQG11aS9tYXRlcmlhbC9MaXN0SXRlbSc7XG5cbmltcG9ydCB7IFRoZW1lIH0gZnJvbSAnLi4vLi4vVGhlbWUnO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVGV4dCA9IHN0eWxlZChUeXBvZ3JhcGh5KTx7IHRoZW1lPzogVGhlbWUgfT4oKHByb3BzKSA9PiAoe1xuICBmb250V2VpZ2h0OiBwcm9wcy50aGVtZS5mb250V2VpZ2h0LmJvbGQsXG59KSk7XG5cbmV4cG9ydCBjb25zdCBBdXRob3JMaXN0SXRlbSA9IHN0eWxlZChMaXN0SXRlbSkoe1xuICBwYWRkaW5nOiAwLFxuICAnOmhvdmVyJzoge1xuICAgIGJhY2tncm91bmRDb2xvcjogJ3RyYW5zcGFyZW50JyxcbiAgfSxcbn0pO1xuIl19 */");
|
|
20
|
-
|
|
13
|
+
export var AuthorListItem = /*#__PURE__*/_styled(ListItem, process.env.NODE_ENV === "production" ? {
|
|
21
14
|
target: "e4ifo370"
|
|
22
15
|
} : {
|
|
23
16
|
target: "e4ifo370",
|