@verdaccio/ui-components 4.0.0-next-8.2 → 4.0.0-next-8.4
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 +4 -269
- 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 +56 -54
- 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 +45 -52
- 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/src/components/SideBarTitle/SideBarTitle.d.ts +1 -1
- package/build/src/components/SideBarTitle/SideBarTitle.stories.d.ts +1 -0
- 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/SideBarTitle/SideBarTitle.stories.tsx +17 -4
- package/src/components/SideBarTitle/SideBarTitle.tsx +5 -3
- 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 +11 -7
- 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/utils/token.js
CHANGED
|
@@ -1,35 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.isTokenExpire = isTokenExpire;
|
|
7
|
-
var _jsBase = require("js-base64");
|
|
8
|
-
var _isNumber = _interopRequireDefault(require("lodash/isNumber"));
|
|
9
|
-
var _isString = _interopRequireDefault(require("lodash/isString"));
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
function isTokenExpire(token) {
|
|
12
|
-
if (!(0, _isString.default)(token)) {
|
|
1
|
+
import { Base64 } from 'js-base64';
|
|
2
|
+
import isNumber from 'lodash/isNumber';
|
|
3
|
+
import isString from 'lodash/isString';
|
|
4
|
+
export function isTokenExpire(token) {
|
|
5
|
+
if (!isString(token)) {
|
|
13
6
|
return true;
|
|
14
7
|
}
|
|
15
|
-
|
|
8
|
+
var [, payload] = token.split('.');
|
|
16
9
|
if (!payload) {
|
|
17
10
|
return true;
|
|
18
11
|
}
|
|
19
|
-
|
|
12
|
+
var exp;
|
|
20
13
|
try {
|
|
21
|
-
exp = JSON.parse(
|
|
14
|
+
exp = JSON.parse(Base64.decode(payload)).exp;
|
|
22
15
|
} catch (error) {
|
|
23
16
|
// eslint-disable-next-line no-console
|
|
24
17
|
console.error('Invalid token:', error, token);
|
|
25
18
|
return true;
|
|
26
19
|
}
|
|
27
|
-
if (!exp || !(
|
|
20
|
+
if (!exp || !isNumber(exp)) {
|
|
28
21
|
return true;
|
|
29
22
|
}
|
|
30
23
|
// Report as expire before (real expire time - 30s)
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
var jsTimestamp = exp * 1000 - 30000;
|
|
25
|
+
var expired = Date.now() >= jsTimestamp;
|
|
33
26
|
return expired;
|
|
34
27
|
}
|
|
35
28
|
//# sourceMappingURL=token.js.map
|
package/build/utils/url.js
CHANGED
|
@@ -1,37 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.downloadFile = downloadFile;
|
|
7
|
-
exports.extractFileName = extractFileName;
|
|
8
|
-
exports.isEmail = isEmail;
|
|
9
|
-
exports.isURL = isURL;
|
|
10
|
-
var _isEmail = _interopRequireDefault(require("validator/lib/isEmail"));
|
|
11
|
-
var _isURL = _interopRequireDefault(require("validator/lib/isURL"));
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
function isURL(url) {
|
|
14
|
-
return (0, _isURL.default)(url || '', {
|
|
1
|
+
import isEmailValidator from 'validator/lib/isEmail';
|
|
2
|
+
import isURLValidator from 'validator/lib/isURL';
|
|
3
|
+
export function isURL(url) {
|
|
4
|
+
return isURLValidator(url || '', {
|
|
15
5
|
protocols: ['http', 'https', 'git+https', 'git'],
|
|
16
6
|
require_protocol: true,
|
|
17
7
|
require_tld: false
|
|
18
8
|
});
|
|
19
9
|
}
|
|
20
|
-
function isEmail(email) {
|
|
21
|
-
return (
|
|
10
|
+
export function isEmail(email) {
|
|
11
|
+
return isEmailValidator(email || '');
|
|
22
12
|
}
|
|
23
|
-
function extractFileName(url) {
|
|
13
|
+
export function extractFileName(url) {
|
|
24
14
|
return url.substring(url.lastIndexOf('/') + 1);
|
|
25
15
|
}
|
|
26
16
|
function blobToFile(blob, fileName) {
|
|
27
17
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
|
-
|
|
18
|
+
var b = blob;
|
|
29
19
|
b.lastModified = Date.now();
|
|
30
20
|
b.name = fileName;
|
|
31
21
|
return b;
|
|
32
22
|
}
|
|
33
|
-
function downloadFile(fileStream, fileName) {
|
|
34
|
-
|
|
23
|
+
export function downloadFile(fileStream, fileName) {
|
|
24
|
+
var file;
|
|
35
25
|
// File constructor is not supported by Edge
|
|
36
26
|
// https://developer.mozilla.org/en-US/docs/Web/API/File#Browser_compatibility
|
|
37
27
|
// @ts-ignore. Please see: https://github.com/microsoft/TypeScript/issues/33792
|
|
@@ -46,8 +36,8 @@ function downloadFile(fileStream, fileName) {
|
|
|
46
36
|
lastModified: Date.now()
|
|
47
37
|
});
|
|
48
38
|
}
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
var objectURL = URL.createObjectURL(file);
|
|
40
|
+
var fileLink = document.createElement('a');
|
|
51
41
|
fileLink.href = objectURL;
|
|
52
42
|
fileLink.download = fileName;
|
|
53
43
|
|
package/build/utils/utils.js
CHANGED
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.formatDateDistance = formatDateDistance;
|
|
10
|
-
exports.formatLicense = formatLicense;
|
|
11
|
-
exports.formatRepository = formatRepository;
|
|
12
|
-
exports.getAuthorName = getAuthorName;
|
|
13
|
-
exports.getLastUpdatedPackageTime = getLastUpdatedPackageTime;
|
|
14
|
-
exports.getRecentReleases = getRecentReleases;
|
|
15
|
-
exports.getUplink = getUplink;
|
|
16
|
-
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
17
|
-
var _localizedFormat = _interopRequireDefault(require("dayjs/plugin/localizedFormat"));
|
|
18
|
-
var _relativeTime = _interopRequireDefault(require("dayjs/plugin/relativeTime"));
|
|
19
|
-
var _i18next = _interopRequireDefault(require("i18next"));
|
|
20
|
-
var _isString = _interopRequireDefault(require("lodash/isString"));
|
|
21
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
-
const TIMEFORMAT = exports.TIMEFORMAT = 'L LTS';
|
|
23
|
-
_dayjs.default.extend(_relativeTime.default);
|
|
24
|
-
_dayjs.default.extend(_localizedFormat.default);
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import localizedFormat from 'dayjs/plugin/localizedFormat';
|
|
3
|
+
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
4
|
+
import i18next from 'i18next';
|
|
5
|
+
import isString from 'lodash/isString';
|
|
6
|
+
export var TIMEFORMAT = 'L LTS';
|
|
7
|
+
dayjs.extend(relativeTime);
|
|
8
|
+
dayjs.extend(localizedFormat);
|
|
25
9
|
|
|
26
10
|
/**
|
|
27
11
|
* Formats license field for webui.
|
|
@@ -29,11 +13,11 @@ _dayjs.default.extend(_localizedFormat.default);
|
|
|
29
13
|
*/
|
|
30
14
|
// License should use type License defined above, but conflicts with the unit test that provide array or empty object
|
|
31
15
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
32
|
-
function formatLicense(license) {
|
|
33
|
-
if ((
|
|
16
|
+
export function formatLicense(license) {
|
|
17
|
+
if (isString(license)) {
|
|
34
18
|
return license;
|
|
35
19
|
}
|
|
36
|
-
if (license
|
|
20
|
+
if (license !== null && license !== void 0 && license.type) {
|
|
37
21
|
return license.type;
|
|
38
22
|
}
|
|
39
23
|
return;
|
|
@@ -45,30 +29,31 @@ function formatLicense(license) {
|
|
|
45
29
|
|
|
46
30
|
// Repository should use type Repository defined above, but conflicts with the unit test that provide array or empty object
|
|
47
31
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
48
|
-
function formatRepository(repository) {
|
|
49
|
-
if ((
|
|
32
|
+
export function formatRepository(repository) {
|
|
33
|
+
if (isString(repository)) {
|
|
50
34
|
return repository;
|
|
51
35
|
}
|
|
52
|
-
if (repository
|
|
36
|
+
if (repository !== null && repository !== void 0 && repository.url) {
|
|
53
37
|
return repository.url;
|
|
54
38
|
}
|
|
55
39
|
return null;
|
|
56
40
|
}
|
|
57
|
-
function formatDate(lastUpdate) {
|
|
58
|
-
return (
|
|
41
|
+
export function formatDate(lastUpdate) {
|
|
42
|
+
return dayjs(new Date(lastUpdate)).format(TIMEFORMAT);
|
|
59
43
|
}
|
|
60
|
-
function formatDateDistance(lastUpdate) {
|
|
61
|
-
return (
|
|
44
|
+
export function formatDateDistance(lastUpdate) {
|
|
45
|
+
return dayjs(new Date(lastUpdate)).fromNow();
|
|
62
46
|
}
|
|
63
47
|
|
|
64
48
|
/**
|
|
65
49
|
* For <LastSync /> component
|
|
66
50
|
* @param {array} uplinks
|
|
67
51
|
*/
|
|
68
|
-
function getLastUpdatedPackageTime(
|
|
69
|
-
|
|
52
|
+
export function getLastUpdatedPackageTime() {
|
|
53
|
+
var uplinks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
54
|
+
var lastUpdate = 0;
|
|
70
55
|
Object.keys(uplinks).forEach(function computeUplink(upLinkName) {
|
|
71
|
-
|
|
56
|
+
var status = uplinks[upLinkName];
|
|
72
57
|
if (status.fetched > lastUpdate) {
|
|
73
58
|
lastUpdate = status.fetched;
|
|
74
59
|
}
|
|
@@ -81,36 +66,37 @@ function getLastUpdatedPackageTime(uplinks = {}) {
|
|
|
81
66
|
* @param {Object} time
|
|
82
67
|
* @returns {Array} last 3 releases
|
|
83
68
|
*/
|
|
84
|
-
function getRecentReleases(
|
|
85
|
-
|
|
69
|
+
export function getRecentReleases() {
|
|
70
|
+
var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
71
|
+
var recent = Object.keys(time).map(version => ({
|
|
86
72
|
version,
|
|
87
73
|
time: formatDate(time[version])
|
|
88
74
|
}));
|
|
89
75
|
return recent.slice(recent.length - 3, recent.length).reverse();
|
|
90
76
|
}
|
|
91
|
-
function getAuthorName(authorName) {
|
|
77
|
+
export function getAuthorName(authorName) {
|
|
92
78
|
if (!authorName) {
|
|
93
|
-
return
|
|
79
|
+
return i18next.t('author-unknown');
|
|
94
80
|
}
|
|
95
81
|
if (authorName.toLowerCase() === 'anonymous') {
|
|
96
|
-
return
|
|
82
|
+
return i18next.t('author-anonymous');
|
|
97
83
|
}
|
|
98
84
|
return authorName;
|
|
99
85
|
}
|
|
100
|
-
function getUplink(upLinkName, packageName) {
|
|
86
|
+
export function getUplink(upLinkName, packageName) {
|
|
101
87
|
// TODO: make this a config like "uplinks: npmjs: web: https://www.npmjs.com/package/"
|
|
102
88
|
switch (upLinkName) {
|
|
103
89
|
case 'npmjs':
|
|
104
|
-
return
|
|
90
|
+
return "https://www.npmjs.com/package/".concat(packageName);
|
|
105
91
|
}
|
|
106
92
|
return null;
|
|
107
93
|
}
|
|
108
|
-
function fileSizeSI(a, b, c, d, e) {
|
|
94
|
+
export function fileSizeSI(a, b, c, d, e) {
|
|
109
95
|
b = Math;
|
|
110
96
|
c = b.log;
|
|
111
97
|
d = 1e3;
|
|
112
98
|
e = c(a) / c(d) | 0;
|
|
113
|
-
|
|
99
|
+
var size = a / b.pow(d, e);
|
|
114
100
|
// no decimals for Bytes
|
|
115
101
|
if (e === 0) {
|
|
116
102
|
return Math.floor(size) + ' Bytes';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/ui-components",
|
|
3
|
-
"version": "4.0.0-next-8.
|
|
3
|
+
"version": "4.0.0-next-8.4",
|
|
4
4
|
"description": "theme ui component",
|
|
5
5
|
"author": "Juan Picado <juanpicado19@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"main": "./build/index.js",
|
|
9
9
|
"types": "build/index.d.ts",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@emotion/react": "11.
|
|
12
|
-
"@emotion/styled": "11.
|
|
11
|
+
"@emotion/react": "11.11.4",
|
|
12
|
+
"@emotion/styled": "11.11.5",
|
|
13
13
|
"@fontsource/material-icons": "^4.5.4",
|
|
14
14
|
"@fontsource/roboto": "^4.5.8",
|
|
15
15
|
"@microlink/react-json-view": "^1.23.3",
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@babel/core": "7.24.9",
|
|
50
50
|
"@emotion/babel-plugin": "11.12.0",
|
|
51
|
-
"@emotion/jest": "11.13.0",
|
|
52
51
|
"@storybook/addon-actions": "^6.5.15",
|
|
53
52
|
"@storybook/addon-essentials": "^6.5.15",
|
|
54
53
|
"@storybook/addon-interactions": "^6.5.15",
|
|
@@ -56,25 +55,28 @@
|
|
|
56
55
|
"@storybook/builder-webpack5": "^6.5.15",
|
|
57
56
|
"@storybook/manager-webpack5": "^6.5.15",
|
|
58
57
|
"@storybook/react": "^6.5.15",
|
|
59
|
-
"@storybook/testing-library": "^0.2.0",
|
|
60
58
|
"@testing-library/dom": "10.4.0",
|
|
61
59
|
"@testing-library/jest-dom": "6.4.8",
|
|
62
60
|
"@testing-library/react": "16.0.0",
|
|
63
61
|
"@types/hast": "^2.0.0",
|
|
64
62
|
"@types/react-router": "^5.1.20",
|
|
65
63
|
"@types/unist": "^2.0.0",
|
|
66
|
-
"@verdaccio/types": "13.0.0-next-8.
|
|
64
|
+
"@verdaccio/types": "13.0.0-next-8.2",
|
|
65
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
66
|
+
"jsdom": "^24.0.0",
|
|
67
67
|
"babel-loader": "9.1.3",
|
|
68
68
|
"mockdate": "3.0.5",
|
|
69
|
+
"mutationobserver-shim": "0.3.7",
|
|
69
70
|
"msw": "0.49.3",
|
|
70
|
-
"typescript": "4.9.5"
|
|
71
|
+
"typescript": "4.9.5",
|
|
72
|
+
"vitest": "2.1.2",
|
|
73
|
+
"whatwg-fetch": "3.6.20"
|
|
71
74
|
},
|
|
72
75
|
"msw": {
|
|
73
76
|
"workerDirectory": "public"
|
|
74
77
|
},
|
|
75
78
|
"scripts": {
|
|
76
|
-
"test": "cross-env TZ=UTC
|
|
77
|
-
"test:html": "cross-env TZ=UTC jest --config jest/jest.config.js --coverage-reporters=html",
|
|
79
|
+
"test": "cross-env TZ=UTC vitest run",
|
|
78
80
|
"clean": "rimraf ./build",
|
|
79
81
|
"type-check": "tsc --noEmit -p tsconfig.build.json",
|
|
80
82
|
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemoryRouter } from 'react-router';
|
|
3
|
+
import { vi } from 'vitest';
|
|
3
4
|
|
|
4
5
|
import { store } from '../';
|
|
5
6
|
import { act, renderWithStore, screen, waitFor } from '../test/test-react-testing-library';
|
|
@@ -7,8 +8,8 @@ import AppRoute from './AppRoute';
|
|
|
7
8
|
|
|
8
9
|
// force the windows to expand to display items
|
|
9
10
|
// https://github.com/bvaughn/react-virtualized/issues/493#issuecomment-640084107
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
vi.spyOn(HTMLElement.prototype, 'offsetHeight', 'get').mockReturnValue(600);
|
|
12
|
+
vi.spyOn(HTMLElement.prototype, 'offsetWidth', 'get').mockReturnValue(600);
|
|
12
13
|
|
|
13
14
|
function appTest(path: string) {
|
|
14
15
|
renderWithStore(
|
|
@@ -19,10 +20,10 @@ function appTest(path: string) {
|
|
|
19
20
|
);
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
// See
|
|
23
|
+
// See vi/server-handlers.ts for test routes
|
|
23
24
|
describe('AppRoute', () => {
|
|
24
25
|
afterEach(() => {
|
|
25
|
-
|
|
26
|
+
vi.clearAllMocks();
|
|
26
27
|
});
|
|
27
28
|
|
|
28
29
|
test('renders Front component for ROOT path', async () => {
|
package/src/Theme/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { vi } from 'vitest';
|
|
2
3
|
|
|
3
4
|
import { cleanup, render, screen } from '../../test/test-react-testing-library';
|
|
4
5
|
import { PackageMetaInterface } from '../../types/packageMeta';
|
|
@@ -10,7 +11,7 @@ const withAuthorComponent = (packageMeta: PackageMetaInterface): JSX.Element =>
|
|
|
10
11
|
|
|
11
12
|
describe('<Author /> component', () => {
|
|
12
13
|
beforeEach(() => {
|
|
13
|
-
|
|
14
|
+
vi.resetAllMocks();
|
|
14
15
|
cleanup();
|
|
15
16
|
});
|
|
16
17
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { vi } from 'vitest';
|
|
2
3
|
|
|
3
4
|
import { fireEvent, render, screen } from '../../test/test-react-testing-library';
|
|
4
5
|
import CopyToClipBoard from './CopyToClipBoard';
|
|
5
6
|
|
|
6
7
|
Object.assign(navigator, {
|
|
7
|
-
clipboard: { writeText:
|
|
8
|
+
clipboard: { writeText: vi.fn().mockImplementation(() => Promise.resolve()) },
|
|
8
9
|
});
|
|
9
10
|
|
|
10
11
|
describe('CopyToClipBoard component', () => {
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HashRouter } from 'react-router-dom';
|
|
3
|
+
import { vi } from 'vitest';
|
|
3
4
|
|
|
4
5
|
import { render, screen } from '../../test/test-react-testing-library';
|
|
5
6
|
import Dependencies from './Dependencies';
|
|
6
7
|
|
|
8
|
+
const replaceMock = vi.fn(() => []);
|
|
9
|
+
Object.defineProperty(window, 'location', {
|
|
10
|
+
writable: true,
|
|
11
|
+
value: { ...window.location, replace: replaceMock, href: '' },
|
|
12
|
+
});
|
|
13
|
+
|
|
7
14
|
describe('<Dependencies /> component', () => {
|
|
8
15
|
test('Renders a message when there are no dependencies', () => {
|
|
9
16
|
const packageMeta = {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemoryRouter, Route } from 'react-router';
|
|
3
|
+
import { vi } from 'vitest';
|
|
3
4
|
|
|
4
5
|
import { fireEvent, render, screen } from '../../test/test-react-testing-library';
|
|
5
6
|
import { DependencyBlock } from './DependencyBlock';
|
|
6
7
|
|
|
7
|
-
const mockHistory =
|
|
8
|
+
const mockHistory = vi.fn();
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
vi.mock('react-router-dom', () => ({
|
|
10
11
|
useHistory: () => ({
|
|
11
12
|
push: mockHistory,
|
|
12
13
|
}),
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { vi } from 'vitest';
|
|
2
3
|
|
|
3
4
|
import { cleanup, render } from '../../test/test-react-testing-library';
|
|
4
5
|
import { PackageMetaInterface } from '../../types/packageMeta';
|
|
5
6
|
import Engine from './Engines';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
vi.mock('./img/node.png', () => '');
|
|
9
|
+
vi.mock('../Install/img/npm.svg', () => '');
|
|
9
10
|
|
|
10
11
|
const mockPackageMeta = (
|
|
11
12
|
engines?: PackageMetaInterface['latest']['engines']
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { vi } from 'vitest';
|
|
2
3
|
|
|
3
4
|
import { render, screen } from '../../test/test-react-testing-library';
|
|
4
5
|
import ErrorBoundary from './ErrorBoundary';
|
|
@@ -20,7 +21,7 @@ describe('ErrorBoundary component', () => {
|
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
// Suppress error messages for this test
|
|
23
|
-
const spy =
|
|
24
|
+
const spy = vi.spyOn(console, 'error');
|
|
24
25
|
spy.mockImplementation(() => {});
|
|
25
26
|
|
|
26
27
|
render(
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemoryRouter } from 'react-router';
|
|
3
|
+
import { vi } from 'vitest';
|
|
3
4
|
|
|
4
5
|
import { fireEvent, render, screen } from '../../test/test-react-testing-library';
|
|
5
6
|
import Forbidden from './Forbidden';
|
|
6
7
|
|
|
7
|
-
const mockHistory =
|
|
8
|
+
const mockHistory = vi.fn();
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
vi.mock('react-router-dom', () => ({
|
|
10
11
|
useHistory: () => ({
|
|
11
12
|
push: mockHistory,
|
|
12
13
|
}),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { vi } from 'vitest';
|
|
2
3
|
|
|
3
4
|
import { fireEvent, render, screen } from '../../test/test-react-testing-library';
|
|
4
5
|
import HeaderInfoDialog from './HeaderInfoDialog';
|
|
5
6
|
|
|
6
7
|
describe('HeaderInfoDialog', () => {
|
|
7
|
-
const onCloseDialog =
|
|
8
|
+
const onCloseDialog = vi.fn();
|
|
8
9
|
|
|
9
10
|
const tabs = [{ label: 'Tab 1' }, { label: 'Tab 2' }];
|
|
10
11
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { vi } from 'vitest';
|
|
2
3
|
|
|
3
4
|
import { api, store } from '../../';
|
|
4
5
|
import {
|
|
@@ -13,14 +14,14 @@ import LoginDialog from './LoginDialog';
|
|
|
13
14
|
|
|
14
15
|
describe('<LoginDialog /> component', () => {
|
|
15
16
|
beforeEach(() => {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
vi.resetModules();
|
|
18
|
+
vi.resetAllMocks();
|
|
18
19
|
cleanup();
|
|
19
20
|
});
|
|
20
21
|
|
|
21
22
|
test('should render the component in default state', () => {
|
|
22
23
|
const props = {
|
|
23
|
-
onClose:
|
|
24
|
+
onClose: vi.fn(),
|
|
24
25
|
};
|
|
25
26
|
const { container } = renderWithStore(<LoginDialog onClose={props.onClose} />, store);
|
|
26
27
|
expect(container.firstChild).toMatchSnapshot();
|
|
@@ -29,7 +30,7 @@ describe('<LoginDialog /> component', () => {
|
|
|
29
30
|
test('should load the component with the open prop', async () => {
|
|
30
31
|
const props = {
|
|
31
32
|
open: true,
|
|
32
|
-
onClose:
|
|
33
|
+
onClose: vi.fn(),
|
|
33
34
|
};
|
|
34
35
|
|
|
35
36
|
const { getByTestId } = renderWithStore(
|
|
@@ -44,7 +45,7 @@ describe('<LoginDialog /> component', () => {
|
|
|
44
45
|
test('onClose: should close the login modal', async () => {
|
|
45
46
|
const props = {
|
|
46
47
|
open: true,
|
|
47
|
-
onClose:
|
|
48
|
+
onClose: vi.fn(),
|
|
48
49
|
};
|
|
49
50
|
|
|
50
51
|
const { getByTestId } = renderWithStore(
|
|
@@ -65,10 +66,10 @@ describe('<LoginDialog /> component', () => {
|
|
|
65
66
|
test('setCredentials - should set username and password in state', async () => {
|
|
66
67
|
const props = {
|
|
67
68
|
open: true,
|
|
68
|
-
onClose:
|
|
69
|
+
onClose: vi.fn(),
|
|
69
70
|
};
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
vi.spyOn(api, 'request').mockImplementation(() =>
|
|
72
73
|
Promise.resolve({
|
|
73
74
|
username: 'xyz',
|
|
74
75
|
token: 'djsadaskljd',
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MemoryRouter } from 'react-router';
|
|
3
|
+
import { vi } from 'vitest';
|
|
3
4
|
|
|
4
5
|
import { fireEvent, render, screen } from '../../test/test-react-testing-library';
|
|
5
6
|
import NotFound from './NotFound';
|
|
6
7
|
|
|
7
|
-
const mockHistory =
|
|
8
|
+
const mockHistory = vi.fn();
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
vi.mock('react-router-dom', () => ({
|
|
10
11
|
useHistory: () => ({
|
|
11
12
|
push: mockHistory,
|
|
12
13
|
}),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BrowserRouter } from 'react-router-dom';
|
|
3
|
+
import { vi } from 'vitest';
|
|
3
4
|
|
|
4
5
|
import { store } from '../../store';
|
|
5
6
|
import { cleanup, renderWithStore } from '../../test/test-react-testing-library';
|
|
@@ -18,7 +19,7 @@ describe('<PackageList /> component', () => {
|
|
|
18
19
|
|
|
19
20
|
test('should load the component with packages', () => {
|
|
20
21
|
// Mock <Autosizer /> width
|
|
21
|
-
|
|
22
|
+
vi.spyOn(HTMLElement.prototype, 'offsetWidth', 'get').mockReturnValue(600);
|
|
22
23
|
|
|
23
24
|
const props = {
|
|
24
25
|
packages: [
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BrowserRouter as Router } from 'react-router-dom';
|
|
3
|
+
import { vi } from 'vitest';
|
|
3
4
|
|
|
4
5
|
import { api, store } from '../../';
|
|
5
6
|
import { fireEvent, renderWithStore, screen, waitFor } from '../../test/test-react-testing-library';
|
|
6
7
|
import Search from './Search';
|
|
7
8
|
import { cleanDescription } from './utils';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return fn;
|
|
13
|
-
})
|
|
14
|
-
);
|
|
10
|
+
vi.mock('lodash/debounce', () => ({
|
|
11
|
+
default: vi.fn((fn) => {
|
|
12
|
+
// Immediately execute the function for testing
|
|
13
|
+
return (...args: any[]) => fn(...args);
|
|
14
|
+
}),
|
|
15
|
+
}));
|
|
15
16
|
|
|
16
17
|
/* eslint-disable verdaccio/jsx-spread */
|
|
17
18
|
const ComponentToBeRendered: React.FC = () => (
|
|
@@ -22,7 +23,7 @@ const ComponentToBeRendered: React.FC = () => (
|
|
|
22
23
|
|
|
23
24
|
describe('<Search /> component', () => {
|
|
24
25
|
beforeEach(() => {
|
|
25
|
-
|
|
26
|
+
vi.spyOn(api, 'request').mockImplementation(() =>
|
|
26
27
|
Promise.resolve([
|
|
27
28
|
{
|
|
28
29
|
name: 'verdaccio-ui/types',
|
|
@@ -37,7 +38,7 @@ describe('<Search /> component', () => {
|
|
|
37
38
|
});
|
|
38
39
|
|
|
39
40
|
afterEach(() => {
|
|
40
|
-
|
|
41
|
+
vi.clearAllMocks();
|
|
41
42
|
});
|
|
42
43
|
|
|
43
44
|
test('should load the component in default state', () => {
|
|
@@ -17,7 +17,7 @@ export const Commonjs: Story = {
|
|
|
17
17
|
render: () => (
|
|
18
18
|
<SideBarTittle
|
|
19
19
|
isLatest={false}
|
|
20
|
-
|
|
20
|
+
moduleTypes={['commonjs']}
|
|
21
21
|
packageName="jquery"
|
|
22
22
|
time="2012-12-31T06:54:14.275Z"
|
|
23
23
|
version="1.0.0"
|
|
@@ -30,7 +30,7 @@ export const ES6: Story = {
|
|
|
30
30
|
render: () => (
|
|
31
31
|
<SideBarTittle
|
|
32
32
|
isLatest={true}
|
|
33
|
-
|
|
33
|
+
moduleTypes={['module']}
|
|
34
34
|
packageName="react"
|
|
35
35
|
time="2012-12-31T06:54:14.275Z"
|
|
36
36
|
version="14.0.0"
|
|
@@ -38,13 +38,26 @@ export const ES6: Story = {
|
|
|
38
38
|
),
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
export const CommonjsAndES6: Story = {
|
|
42
|
+
name: 'CommonJS and ES6 package',
|
|
43
|
+
render: () => (
|
|
44
|
+
<SideBarTittle
|
|
45
|
+
isLatest={true}
|
|
46
|
+
moduleTypes={['commonjs', 'module']}
|
|
47
|
+
packageName="jquery"
|
|
48
|
+
time="2012-12-31T06:54:14.275Z"
|
|
49
|
+
version="1.0.0"
|
|
50
|
+
/>
|
|
51
|
+
),
|
|
52
|
+
};
|
|
53
|
+
|
|
41
54
|
export const Description: Story = {
|
|
42
55
|
name: 'With description',
|
|
43
56
|
render: () => (
|
|
44
57
|
<SideBarTittle
|
|
45
58
|
description="Storybook's CLI - easiest method of adding storybook to your projects"
|
|
46
59
|
isLatest={true}
|
|
47
|
-
|
|
60
|
+
moduleTypes={['module']}
|
|
48
61
|
packageName="storybook"
|
|
49
62
|
time="2012-12-31T06:54:14.275Z"
|
|
50
63
|
version="14.0.0"
|
|
@@ -59,7 +72,7 @@ export const WithTypes: Story = {
|
|
|
59
72
|
description="Storybook's CLI - easiest method of adding storybook to your projects"
|
|
60
73
|
hasTypes={true}
|
|
61
74
|
isLatest={true}
|
|
62
|
-
|
|
75
|
+
moduleTypes={['module']}
|
|
63
76
|
packageName="storybook"
|
|
64
77
|
time="2012-12-31T06:54:14.275Z"
|
|
65
78
|
version="14.0.0"
|