@verdaccio/ui-components 5.0.0-next-9.19 → 5.0.0-next-9.21
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/build/api/use-data-mutation.js +1 -4
- package/build/api/use-data-mutation.js.map +1 -1
- package/build/api/use-data-mutation.mjs +1 -4
- package/build/api/use-data-mutation.mjs.map +1 -1
- package/build/api/use-data.d.ts +1 -0
- package/build/api/use-data.js +3 -2
- package/build/api/use-data.js.map +1 -1
- package/build/api/use-data.mjs +3 -3
- package/build/api/use-data.mjs.map +1 -1
- package/build/components/ActionBar/ActionBar.js +4 -2
- package/build/components/ActionBar/ActionBar.js.map +1 -1
- package/build/components/ActionBar/ActionBar.mjs +4 -2
- package/build/components/ActionBar/ActionBar.mjs.map +1 -1
- package/build/components/ActionBar/ActionBarAction.js +1 -1
- package/build/components/ActionBar/ActionBarAction.mjs +1 -1
- package/build/components/AppRoute/AppRoute.js +13 -0
- package/build/components/AppRoute/AppRoute.js.map +1 -1
- package/build/components/AppRoute/AppRoute.mjs +13 -0
- package/build/components/AppRoute/AppRoute.mjs.map +1 -1
- package/build/components/Author/Author.js +1 -1
- package/build/components/Author/Author.mjs +1 -1
- package/build/components/CopyClipboard/CopyToClipBoard.js +5 -0
- package/build/components/CopyClipboard/CopyToClipBoard.js.map +1 -1
- package/build/components/CopyClipboard/CopyToClipBoard.mjs +5 -0
- package/build/components/CopyClipboard/CopyToClipBoard.mjs.map +1 -1
- package/build/components/CopyClipboard/utils.js +14 -1
- package/build/components/CopyClipboard/utils.js.map +1 -1
- package/build/components/CopyClipboard/utils.mjs +14 -1
- package/build/components/CopyClipboard/utils.mjs.map +1 -1
- package/build/components/Dependencies/Dependencies.js +2 -1
- package/build/components/Dependencies/Dependencies.js.map +1 -1
- package/build/components/Dependencies/Dependencies.mjs +2 -1
- package/build/components/Dependencies/Dependencies.mjs.map +1 -1
- package/build/components/Dependencies/DependencyBlock.js +1 -1
- package/build/components/Dependencies/DependencyBlock.mjs +1 -1
- package/build/components/Developers/Title.js +1 -1
- package/build/components/Developers/Title.mjs +1 -1
- package/build/components/Developers/get-unique-developer-values.js +2 -1
- package/build/components/Developers/get-unique-developer-values.js.map +1 -1
- package/build/components/Developers/get-unique-developer-values.mjs +2 -1
- package/build/components/Developers/get-unique-developer-values.mjs.map +1 -1
- package/build/components/Distribution/Dist.js +3 -3
- package/build/components/Distribution/Dist.js.map +1 -1
- package/build/components/Distribution/Dist.mjs +3 -3
- package/build/components/Distribution/Dist.mjs.map +1 -1
- package/build/components/Engines/Engines.js +1 -1
- package/build/components/Engines/Engines.mjs +1 -1
- package/build/components/Forbidden/Forbidden.js +1 -1
- package/build/components/Forbidden/Forbidden.mjs +1 -1
- package/build/components/FundButton/FundButton.js +4 -3
- package/build/components/FundButton/FundButton.js.map +1 -1
- package/build/components/FundButton/FundButton.mjs +4 -3
- package/build/components/FundButton/FundButton.mjs.map +1 -1
- package/build/components/GenericError/GenericError.d.ts +3 -0
- package/build/components/GenericError/GenericError.js +60 -0
- package/build/components/GenericError/GenericError.js.map +1 -0
- package/build/components/GenericError/GenericError.mjs +54 -0
- package/build/components/GenericError/GenericError.mjs.map +1 -0
- package/build/components/GenericError/index.d.ts +1 -0
- package/build/components/GenericError/index.js +2 -0
- package/build/components/GenericError/index.mjs +2 -0
- package/build/components/Help/Help.js +1 -1
- package/build/components/Help/Help.mjs +1 -1
- package/build/components/Install/Install.js +1 -1
- package/build/components/Install/Install.mjs +1 -1
- package/build/components/Install/InstallListItem.js +2 -2
- package/build/components/Install/InstallListItem.js.map +1 -1
- package/build/components/Install/InstallListItem.mjs +2 -2
- package/build/components/Install/InstallListItem.mjs.map +1 -1
- package/build/components/Keywords/KeywordListItems.js +1 -1
- package/build/components/Keywords/KeywordListItems.js.map +1 -1
- package/build/components/Keywords/KeywordListItems.mjs +1 -1
- package/build/components/Keywords/KeywordListItems.mjs.map +1 -1
- package/build/components/Keywords/Keywords.js +2 -2
- package/build/components/Keywords/Keywords.js.map +1 -1
- package/build/components/Keywords/Keywords.mjs +2 -2
- package/build/components/Keywords/Keywords.mjs.map +1 -1
- package/build/components/LoginDialog/LoginDialogCloseButton.js +1 -1
- package/build/components/LoginDialog/LoginDialogCloseButton.mjs +1 -1
- package/build/components/LoginDialog/LoginDialogForm.js +2 -1
- package/build/components/LoginDialog/LoginDialogForm.js.map +1 -1
- package/build/components/LoginDialog/LoginDialogForm.mjs +2 -1
- package/build/components/LoginDialog/LoginDialogForm.mjs.map +1 -1
- package/build/components/LoginForm/Login.d.ts +1 -0
- package/build/components/LoginForm/Login.js +6 -4
- package/build/components/LoginForm/Login.js.map +1 -1
- package/build/components/LoginForm/Login.mjs +9 -7
- package/build/components/LoginForm/Login.mjs.map +1 -1
- package/build/components/LoginForm/PasswordField.js +4 -6
- package/build/components/LoginForm/PasswordField.js.map +1 -1
- package/build/components/LoginForm/PasswordField.mjs +4 -6
- package/build/components/LoginForm/PasswordField.mjs.map +1 -1
- package/build/components/LoginForm/UsernameField.js +4 -6
- package/build/components/LoginForm/UsernameField.js.map +1 -1
- package/build/components/LoginForm/UsernameField.mjs +4 -6
- package/build/components/LoginForm/UsernameField.mjs.map +1 -1
- package/build/components/LoginForm/styles.js +1 -1
- package/build/components/LoginForm/styles.mjs +1 -1
- package/build/components/LoginForm/useLoginForm.js +13 -3
- package/build/components/LoginForm/useLoginForm.js.map +1 -1
- package/build/components/LoginForm/useLoginForm.mjs +14 -4
- package/build/components/LoginForm/useLoginForm.mjs.map +1 -1
- package/build/components/NoItems/NoItems.js +2 -2
- package/build/components/NoItems/NoItems.mjs +1 -1
- package/build/components/NotFound/NotFound.js +1 -1
- package/build/components/NotFound/NotFound.mjs +1 -1
- package/build/components/Package/Package.d.ts +1 -1
- package/build/components/Package/Package.js +28 -29
- package/build/components/Package/Package.js.map +1 -1
- package/build/components/Package/Package.mjs +29 -30
- package/build/components/Package/Package.mjs.map +1 -1
- package/build/components/Person/Person.js +1 -1
- package/build/components/Person/Person.js.map +1 -1
- package/build/components/Person/Person.mjs +1 -1
- package/build/components/Person/Person.mjs.map +1 -1
- package/build/components/RawViewer/RawViewer.js +1 -1
- package/build/components/RawViewer/RawViewer.mjs +1 -1
- package/build/components/RegistryInfoDialog/RegistryInfoDialog.js +1 -1
- package/build/components/RegistryInfoDialog/RegistryInfoDialog.mjs +1 -1
- package/build/components/Repository/Repository.js +5 -8
- package/build/components/Repository/Repository.js.map +1 -1
- package/build/components/Repository/Repository.mjs +5 -8
- package/build/components/Repository/Repository.mjs.map +1 -1
- package/build/components/Search/AutoComplete/AutoComplete.d.ts +1 -0
- package/build/components/Search/AutoComplete/AutoComplete.js +4 -4
- package/build/components/Search/AutoComplete/AutoComplete.js.map +1 -1
- package/build/components/Search/AutoComplete/AutoComplete.mjs +4 -4
- package/build/components/Search/AutoComplete/AutoComplete.mjs.map +1 -1
- package/build/components/Search/Search.js +12 -4
- package/build/components/Search/Search.js.map +1 -1
- package/build/components/Search/Search.mjs +13 -5
- package/build/components/Search/Search.mjs.map +1 -1
- package/build/components/Search/SearchItem.js +1 -1
- package/build/components/Search/SearchItem.mjs +1 -1
- package/build/components/SettingsMenu/SettingsMenu.js +1 -1
- package/build/components/SettingsMenu/SettingsMenu.mjs +1 -1
- package/build/components/SideBarTitle/SideBarTitle.js +2 -2
- package/build/components/SideBarTitle/SideBarTitle.js.map +1 -1
- package/build/components/SideBarTitle/SideBarTitle.mjs +2 -2
- package/build/components/SideBarTitle/SideBarTitle.mjs.map +1 -1
- package/build/components/UpLinks/UpLinks.js +1 -1
- package/build/components/UpLinks/UpLinks.mjs +1 -1
- package/build/components/Versions/HistoryList.js +2 -2
- package/build/components/Versions/HistoryList.js.map +1 -1
- package/build/components/Versions/HistoryList.mjs +2 -2
- package/build/components/Versions/HistoryList.mjs.map +1 -1
- package/build/components/Versions/Versions.js +22 -21
- package/build/components/Versions/Versions.js.map +1 -1
- package/build/components/Versions/Versions.mjs +22 -21
- package/build/components/Versions/Versions.mjs.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.js +4 -0
- package/build/index.mjs +4 -2
- package/build/pages/Stage/StageDetail.d.ts +2 -0
- package/build/pages/Stage/StageDetail.js +8 -0
- package/build/pages/Stage/StageDetail.js.map +1 -0
- package/build/pages/Stage/StageDetail.mjs +8 -0
- package/build/pages/Stage/StageDetail.mjs.map +1 -0
- package/build/pages/Stage/StageList.d.ts +2 -0
- package/build/pages/Stage/StageList.js +8 -0
- package/build/pages/Stage/StageList.js.map +1 -0
- package/build/pages/Stage/StageList.mjs +8 -0
- package/build/pages/Stage/StageList.mjs.map +1 -0
- package/build/pages/Stage/index.d.ts +2 -0
- package/build/pages/Version/Version.js +4 -1
- package/build/pages/Version/Version.js.map +1 -1
- package/build/pages/Version/Version.mjs +4 -1
- package/build/pages/Version/Version.mjs.map +1 -1
- package/build/providers/AuthProvider/AuthProvider.js +9 -7
- package/build/providers/AuthProvider/AuthProvider.js.map +1 -1
- package/build/providers/AuthProvider/AuthProvider.mjs +10 -8
- package/build/providers/AuthProvider/AuthProvider.mjs.map +1 -1
- package/build/providers/AuthProvider/utils.d.ts +12 -0
- package/build/providers/AuthProvider/utils.js +22 -0
- package/build/providers/AuthProvider/utils.js.map +1 -1
- package/build/providers/AuthProvider/utils.mjs +21 -2
- package/build/providers/AuthProvider/utils.mjs.map +1 -1
- package/build/providers/DownloadProvider/DownloadProvider.d.ts +1 -0
- package/build/providers/DownloadProvider/DownloadProvider.js +27 -4
- package/build/providers/DownloadProvider/DownloadProvider.js.map +1 -1
- package/build/providers/DownloadProvider/DownloadProvider.mjs +27 -6
- package/build/providers/DownloadProvider/DownloadProvider.mjs.map +1 -1
- package/build/providers/ManifestsProvider/ManifestsProvider.js +1 -1
- package/build/providers/ManifestsProvider/ManifestsProvider.js.map +1 -1
- package/build/providers/ManifestsProvider/ManifestsProvider.mjs +1 -1
- package/build/providers/ManifestsProvider/ManifestsProvider.mjs.map +1 -1
- package/build/providers/SearchProvider/SearchProvider.d.ts +1 -0
- package/build/providers/SearchProvider/SearchProvider.js +8 -6
- package/build/providers/SearchProvider/SearchProvider.js.map +1 -1
- package/build/providers/SearchProvider/SearchProvider.mjs +8 -6
- package/build/providers/SearchProvider/SearchProvider.mjs.map +1 -1
- package/build/providers/TranslatorProvider/TranslatorProvider.js +5 -3
- package/build/providers/TranslatorProvider/TranslatorProvider.js.map +1 -1
- package/build/providers/TranslatorProvider/TranslatorProvider.mjs +5 -3
- package/build/providers/TranslatorProvider/TranslatorProvider.mjs.map +1 -1
- package/build/providers/VersionProvider/VersionProvider.js +3 -3
- package/build/providers/VersionProvider/VersionProvider.js.map +1 -1
- package/build/providers/VersionProvider/VersionProvider.mjs +3 -3
- package/build/providers/VersionProvider/VersionProvider.mjs.map +1 -1
- package/build/sections/Detail/Tabs.js +1 -1
- package/build/sections/Detail/Tabs.mjs +1 -1
- package/build/sections/Footer/Footer.js +1 -1
- package/build/sections/Footer/Footer.mjs +1 -1
- package/build/sections/Header/Header.d.ts +0 -1
- package/build/sections/Header/Header.js +16 -14
- package/build/sections/Header/Header.js.map +1 -1
- package/build/sections/Header/Header.mjs +17 -15
- package/build/sections/Header/Header.mjs.map +1 -1
- package/build/sections/Header/HeaderGreetings.js +1 -1
- package/build/sections/Header/HeaderGreetings.mjs +1 -1
- package/build/sections/Header/HeaderMenu.js +26 -7
- package/build/sections/Header/HeaderMenu.js.map +1 -1
- package/build/sections/Header/HeaderMenu.mjs +26 -7
- package/build/sections/Header/HeaderMenu.mjs.map +1 -1
- package/build/sections/Header/HeaderRight.js +1 -1
- package/build/sections/Header/HeaderRight.mjs +1 -1
- package/build/sections/Header/HeaderSettingsDialog.js +1 -1
- package/build/sections/Header/HeaderSettingsDialog.mjs +1 -1
- package/build/sections/Header/LanguageSwitch.js +1 -1
- package/build/sections/Header/LanguageSwitch.mjs +1 -1
- package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js +1 -1
- package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.mjs +1 -1
- package/build/sections/Home/Home.js +4 -3
- package/build/sections/Home/Home.js.map +1 -1
- package/build/sections/Home/Home.mjs +5 -4
- package/build/sections/Home/Home.mjs.map +1 -1
- package/build/sections/Security/AddUser.js +33 -18
- package/build/sections/Security/AddUser.js.map +1 -1
- package/build/sections/Security/AddUser.mjs +37 -22
- package/build/sections/Security/AddUser.mjs.map +1 -1
- package/build/sections/Security/ChangePassword.js +17 -15
- package/build/sections/Security/ChangePassword.js.map +1 -1
- package/build/sections/Security/ChangePassword.mjs +19 -17
- package/build/sections/Security/ChangePassword.mjs.map +1 -1
- package/build/sections/Security/Login.js +51 -35
- package/build/sections/Security/Login.js.map +1 -1
- package/build/sections/Security/Login.mjs +54 -38
- package/build/sections/Security/Login.mjs.map +1 -1
- package/build/sections/Security/Success.js +28 -24
- package/build/sections/Security/Success.js.map +1 -1
- package/build/sections/Security/Success.mjs +29 -25
- package/build/sections/Security/Success.mjs.map +1 -1
- package/build/sections/Stage/StageActions.d.ts +15 -0
- package/build/sections/Stage/StageActions.js +101 -0
- package/build/sections/Stage/StageActions.js.map +1 -0
- package/build/sections/Stage/StageActions.mjs +99 -0
- package/build/sections/Stage/StageActions.mjs.map +1 -0
- package/build/sections/Stage/StageDetail.d.ts +3 -0
- package/build/sections/Stage/StageDetail.js +110 -0
- package/build/sections/Stage/StageDetail.js.map +1 -0
- package/build/sections/Stage/StageDetail.mjs +108 -0
- package/build/sections/Stage/StageDetail.mjs.map +1 -0
- package/build/sections/Stage/StageList.d.ts +3 -0
- package/build/sections/Stage/StageList.js +153 -0
- package/build/sections/Stage/StageList.js.map +1 -0
- package/build/sections/Stage/StageList.mjs +151 -0
- package/build/sections/Stage/StageList.mjs.map +1 -0
- package/build/sections/Stage/index.d.ts +6 -0
- package/build/sections/Stage/index.js +13 -0
- package/build/sections/Stage/index.mjs +6 -0
- package/build/sections/Stage/types.d.ts +22 -0
- package/build/sections/Stage/useRequireSession.d.ts +14 -0
- package/build/sections/Stage/useRequireSession.js +33 -0
- package/build/sections/Stage/useRequireSession.js.map +1 -0
- package/build/sections/Stage/useRequireSession.mjs +33 -0
- package/build/sections/Stage/useRequireSession.mjs.map +1 -0
- package/build/sections/Stage/useStage.d.ts +34 -0
- package/build/sections/Stage/useStage.js +71 -0
- package/build/sections/Stage/useStage.js.map +1 -0
- package/build/sections/Stage/useStage.mjs +65 -0
- package/build/sections/Stage/useStage.mjs.map +1 -0
- package/build/store/api.js +7 -4
- package/build/store/api.js.map +1 -1
- package/build/store/api.mjs +7 -4
- package/build/store/api.mjs.map +1 -1
- package/build/types/packageMeta.d.ts +3 -2
- package/build/utils/cli-utils.js +2 -2
- package/build/utils/cli-utils.js.map +1 -1
- package/build/utils/cli-utils.mjs +2 -2
- package/build/utils/cli-utils.mjs.map +1 -1
- package/build/utils/index.js +1 -0
- package/build/utils/index.mjs +2 -2
- package/build/utils/routes.d.ts +5 -1
- package/build/utils/routes.js +4 -0
- package/build/utils/routes.js.map +1 -1
- package/build/utils/routes.mjs +4 -0
- package/build/utils/routes.mjs.map +1 -1
- package/build/utils/schemas.d.ts +1 -0
- package/build/utils/schemas.js +4 -4
- package/build/utils/schemas.js.map +1 -1
- package/build/utils/schemas.mjs +4 -4
- package/build/utils/schemas.mjs.map +1 -1
- package/build/utils/session-id.d.ts +8 -0
- package/build/utils/session-id.js +26 -0
- package/build/utils/session-id.js.map +1 -0
- package/build/utils/session-id.mjs +26 -0
- package/build/utils/session-id.mjs.map +1 -0
- package/build/utils/token.d.ts +1 -0
- package/build/utils/token.js +12 -8
- package/build/utils/token.js.map +1 -1
- package/build/utils/token.mjs +12 -9
- package/build/utils/token.mjs.map +1 -1
- package/build/utils/url.js +1 -1
- package/build/utils/url.js.map +1 -1
- package/build/utils/url.mjs +1 -1
- package/build/utils/url.mjs.map +1 -1
- package/build/utils/utils.d.ts +10 -0
- package/build/utils/utils.js +26 -0
- package/build/utils/utils.js.map +1 -1
- package/build/utils/utils.mjs +25 -1
- package/build/utils/utils.mjs.map +1 -1
- package/package.json +6 -6
|
@@ -29,10 +29,7 @@ function useDataMutation(basePath, route, method = "POST", options = {}) {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
async function tarballFetcher(url, { arg }) {
|
|
32
|
-
return require_api.default.request(arg.link, "GET", {
|
|
33
|
-
headers: { accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3" },
|
|
34
|
-
credentials: "include"
|
|
35
|
-
});
|
|
32
|
+
return require_api.default.request(arg.link, "GET", { headers: { accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3" } });
|
|
36
33
|
}
|
|
37
34
|
function useTarballDownload() {
|
|
38
35
|
const { trigger, isMutating, error } = (0, swr_mutation.default)("tarball-download", tarballFetcher);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-data-mutation.js","names":[],"sources":["../../src/api/use-data-mutation.ts"],"sourcesContent":["import useSWRMutation from 'swr/mutation';\n\nimport API from '../store/api';\nimport type { APIRoute } from '../store/routes';\nimport { HEADERS } from '../store/utils';\n\nexport const fetcher = async <T>(\n url: string,\n method: string,\n body: any,\n options?: { signal?: AbortSignal }\n): Promise<T> => {\n const isGet = method.toUpperCase() === 'GET';\n const finalUrl = url;\n\n return API.request<T>(finalUrl, method, {\n // Only stringify and send body if it's NOT a GET request\n body: isGet ? undefined : JSON.stringify(body),\n headers: {\n Accept: HEADERS.JSON,\n ...(isGet ? {} : { 'Content-Type': HEADERS.JSON }),\n },\n signal: options?.signal,\n });\n};\n\nexport function useDataMutation<T>(\n basePath: string,\n route: APIRoute | string,\n method = 'POST',\n options: { buildUrl?: (basePath: string, route: string) => string } = {}\n) {\n const key = options.buildUrl ? options.buildUrl(basePath, route) : `${basePath}${route}`;\n\n const { data, error, isMutating, trigger } = useSWRMutation<T, any, string, any>(\n key,\n (url, { arg }) => {\n return fetcher<T>(url, method, arg ?? {});\n }\n );\n\n return { data, error, isMutating, trigger };\n}\n\nasync function tarballFetcher(url: string, { arg }: { arg: { link: string } }): Promise<Blob> {\n return API.request<Blob>(arg.link, 'GET', {\n headers: {\n accept:\n 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',\n },\n
|
|
1
|
+
{"version":3,"file":"use-data-mutation.js","names":[],"sources":["../../src/api/use-data-mutation.ts"],"sourcesContent":["import useSWRMutation from 'swr/mutation';\n\nimport API from '../store/api';\nimport type { APIRoute } from '../store/routes';\nimport { HEADERS } from '../store/utils';\n\nexport const fetcher = async <T>(\n url: string,\n method: string,\n body: any,\n options?: { signal?: AbortSignal }\n): Promise<T> => {\n const isGet = method.toUpperCase() === 'GET';\n const finalUrl = url;\n\n return API.request<T>(finalUrl, method, {\n // Only stringify and send body if it's NOT a GET request\n body: isGet ? undefined : JSON.stringify(body),\n headers: {\n Accept: HEADERS.JSON,\n ...(isGet ? {} : { 'Content-Type': HEADERS.JSON }),\n },\n signal: options?.signal,\n });\n};\n\nexport function useDataMutation<T>(\n basePath: string,\n route: APIRoute | string,\n method = 'POST',\n options: { buildUrl?: (basePath: string, route: string) => string } = {}\n) {\n const key = options.buildUrl ? options.buildUrl(basePath, route) : `${basePath}${route}`;\n\n const { data, error, isMutating, trigger } = useSWRMutation<T, any, string, any>(\n key,\n (url, { arg }) => {\n return fetcher<T>(url, method, arg ?? {});\n }\n );\n\n return { data, error, isMutating, trigger };\n}\n\nasync function tarballFetcher(url: string, { arg }: { arg: { link: string } }): Promise<Blob> {\n // no `credentials: 'include'`: auth is the Bearer header (added in API.request),\n // and `include` makes the browser reject the registry's wildcard\n // `Access-Control-Allow-Origin: *` when the UI dev server is a different origin\n // than the registry (pnpm start: :4873 vs :8000)\n return API.request<Blob>(arg.link, 'GET', {\n headers: {\n accept:\n 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',\n },\n });\n}\n\nexport function useTarballDownload() {\n const { trigger, isMutating, error } = useSWRMutation<Blob, any, string, { link: string }>(\n 'tarball-download',\n tarballFetcher\n );\n\n return {\n download: trigger,\n isDownloading: isMutating,\n error,\n };\n}\n"],"mappings":";;;;;;AAMA,IAAa,UAAU,OACrB,KACA,QACA,MACA,YACe;CACf,MAAM,QAAQ,OAAO,YAAY,MAAM;CACvC,MAAM,WAAW;CAEjB,OAAO,YAAA,QAAI,QAAW,UAAU,QAAQ;EAEtC,MAAM,QAAQ,KAAA,IAAY,KAAK,UAAU,IAAI;EAC7C,SAAS;GACP,QAAQ,cAAA,QAAQ;GAChB,GAAI,QAAQ,CAAC,IAAI,EAAE,gBAAgB,cAAA,QAAQ,KAAK;EAClD;EACA,QAAQ,SAAS;CACnB,CAAC;AACH;AAEA,SAAgB,gBACd,UACA,OACA,SAAS,QACT,UAAsE,CAAC,GACvE;CACA,MAAM,MAAM,QAAQ,WAAW,QAAQ,SAAS,UAAU,KAAK,IAAI,GAAG,WAAW;CAEjF,MAAM,EAAE,MAAM,OAAO,YAAY,aAAA,GAAY,aAAA,QAAA,CAC3C,MACC,KAAK,EAAE,UAAU;EAChB,OAAO,QAAW,KAAK,QAAQ,OAAO,CAAC,CAAC;CAC1C,CACF;CAEA,OAAO;EAAE;EAAM;EAAO;EAAY;CAAQ;AAC5C;AAEA,eAAe,eAAe,KAAa,EAAE,OAAiD;CAK5F,OAAO,YAAA,QAAI,QAAc,IAAI,MAAM,OAAO,EACxC,SAAS,EACP,QACE,yHACJ,EACF,CAAC;AACH;AAEA,SAAgB,qBAAqB;CACnC,MAAM,EAAE,SAAS,YAAY,WAAA,GAAU,aAAA,QAAA,CACrC,oBACA,cACF;CAEA,OAAO;EACL,UAAU;EACV,eAAe;EACf;CACF;AACF"}
|
|
@@ -27,10 +27,7 @@ function useDataMutation(basePath, route, method = "POST", options = {}) {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
async function tarballFetcher(url, { arg }) {
|
|
30
|
-
return api_default.request(arg.link, "GET", {
|
|
31
|
-
headers: { accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3" },
|
|
32
|
-
credentials: "include"
|
|
33
|
-
});
|
|
30
|
+
return api_default.request(arg.link, "GET", { headers: { accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3" } });
|
|
34
31
|
}
|
|
35
32
|
function useTarballDownload() {
|
|
36
33
|
const { trigger, isMutating, error } = useSWRMutation("tarball-download", tarballFetcher);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-data-mutation.mjs","names":[],"sources":["../../src/api/use-data-mutation.ts"],"sourcesContent":["import useSWRMutation from 'swr/mutation';\n\nimport API from '../store/api';\nimport type { APIRoute } from '../store/routes';\nimport { HEADERS } from '../store/utils';\n\nexport const fetcher = async <T>(\n url: string,\n method: string,\n body: any,\n options?: { signal?: AbortSignal }\n): Promise<T> => {\n const isGet = method.toUpperCase() === 'GET';\n const finalUrl = url;\n\n return API.request<T>(finalUrl, method, {\n // Only stringify and send body if it's NOT a GET request\n body: isGet ? undefined : JSON.stringify(body),\n headers: {\n Accept: HEADERS.JSON,\n ...(isGet ? {} : { 'Content-Type': HEADERS.JSON }),\n },\n signal: options?.signal,\n });\n};\n\nexport function useDataMutation<T>(\n basePath: string,\n route: APIRoute | string,\n method = 'POST',\n options: { buildUrl?: (basePath: string, route: string) => string } = {}\n) {\n const key = options.buildUrl ? options.buildUrl(basePath, route) : `${basePath}${route}`;\n\n const { data, error, isMutating, trigger } = useSWRMutation<T, any, string, any>(\n key,\n (url, { arg }) => {\n return fetcher<T>(url, method, arg ?? {});\n }\n );\n\n return { data, error, isMutating, trigger };\n}\n\nasync function tarballFetcher(url: string, { arg }: { arg: { link: string } }): Promise<Blob> {\n return API.request<Blob>(arg.link, 'GET', {\n headers: {\n accept:\n 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',\n },\n
|
|
1
|
+
{"version":3,"file":"use-data-mutation.mjs","names":[],"sources":["../../src/api/use-data-mutation.ts"],"sourcesContent":["import useSWRMutation from 'swr/mutation';\n\nimport API from '../store/api';\nimport type { APIRoute } from '../store/routes';\nimport { HEADERS } from '../store/utils';\n\nexport const fetcher = async <T>(\n url: string,\n method: string,\n body: any,\n options?: { signal?: AbortSignal }\n): Promise<T> => {\n const isGet = method.toUpperCase() === 'GET';\n const finalUrl = url;\n\n return API.request<T>(finalUrl, method, {\n // Only stringify and send body if it's NOT a GET request\n body: isGet ? undefined : JSON.stringify(body),\n headers: {\n Accept: HEADERS.JSON,\n ...(isGet ? {} : { 'Content-Type': HEADERS.JSON }),\n },\n signal: options?.signal,\n });\n};\n\nexport function useDataMutation<T>(\n basePath: string,\n route: APIRoute | string,\n method = 'POST',\n options: { buildUrl?: (basePath: string, route: string) => string } = {}\n) {\n const key = options.buildUrl ? options.buildUrl(basePath, route) : `${basePath}${route}`;\n\n const { data, error, isMutating, trigger } = useSWRMutation<T, any, string, any>(\n key,\n (url, { arg }) => {\n return fetcher<T>(url, method, arg ?? {});\n }\n );\n\n return { data, error, isMutating, trigger };\n}\n\nasync function tarballFetcher(url: string, { arg }: { arg: { link: string } }): Promise<Blob> {\n // no `credentials: 'include'`: auth is the Bearer header (added in API.request),\n // and `include` makes the browser reject the registry's wildcard\n // `Access-Control-Allow-Origin: *` when the UI dev server is a different origin\n // than the registry (pnpm start: :4873 vs :8000)\n return API.request<Blob>(arg.link, 'GET', {\n headers: {\n accept:\n 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',\n },\n });\n}\n\nexport function useTarballDownload() {\n const { trigger, isMutating, error } = useSWRMutation<Blob, any, string, { link: string }>(\n 'tarball-download',\n tarballFetcher\n );\n\n return {\n download: trigger,\n isDownloading: isMutating,\n error,\n };\n}\n"],"mappings":";;;;AAMA,IAAa,UAAU,OACrB,KACA,QACA,MACA,YACe;CACf,MAAM,QAAQ,OAAO,YAAY,MAAM;CACvC,MAAM,WAAW;CAEjB,OAAO,YAAI,QAAW,UAAU,QAAQ;EAEtC,MAAM,QAAQ,KAAA,IAAY,KAAK,UAAU,IAAI;EAC7C,SAAS;GACP,QAAQ,QAAQ;GAChB,GAAI,QAAQ,CAAC,IAAI,EAAE,gBAAgB,QAAQ,KAAK;EAClD;EACA,QAAQ,SAAS;CACnB,CAAC;AACH;AAEA,SAAgB,gBACd,UACA,OACA,SAAS,QACT,UAAsE,CAAC,GACvE;CACA,MAAM,MAAM,QAAQ,WAAW,QAAQ,SAAS,UAAU,KAAK,IAAI,GAAG,WAAW;CAEjF,MAAM,EAAE,MAAM,OAAO,YAAY,YAAY,eAC3C,MACC,KAAK,EAAE,UAAU;EAChB,OAAO,QAAW,KAAK,QAAQ,OAAO,CAAC,CAAC;CAC1C,CACF;CAEA,OAAO;EAAE;EAAM;EAAO;EAAY;CAAQ;AAC5C;AAEA,eAAe,eAAe,KAAa,EAAE,OAAiD;CAK5F,OAAO,YAAI,QAAc,IAAI,MAAM,OAAO,EACxC,SAAS,EACP,QACE,yHACJ,EACF,CAAC;AACH;AAEA,SAAgB,qBAAqB;CACnC,MAAM,EAAE,SAAS,YAAY,UAAU,eACrC,oBACA,cACF;CAEA,OAAO;EACL,UAAU;EACV,eAAe;EACf;CACF;AACF"}
|
package/build/api/use-data.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { SWRResponse } from 'swr';
|
|
2
2
|
import type { APIRoute } from '../store/routes';
|
|
3
|
+
export declare function buildUrl(basePath: string, route: APIRoute, packageName?: string, packageVersion?: string): string;
|
|
3
4
|
export declare function useData<T>(basePath: string, route: APIRoute, packageName?: string, packageVersion?: string): Pick<SWRResponse<T>, 'data' | 'error' | 'isLoading' | 'mutate'>;
|
package/build/api/use-data.js
CHANGED
|
@@ -5,8 +5,8 @@ swr = require_runtime.__toESM(swr);
|
|
|
5
5
|
//#region src/api/use-data.ts
|
|
6
6
|
function buildUrl(basePath, route, packageName, packageVersion) {
|
|
7
7
|
let url = `${basePath}${route}`;
|
|
8
|
-
if (packageName) url += packageName;
|
|
9
|
-
if (packageVersion) url += `?v=${packageVersion}`;
|
|
8
|
+
if (packageName) url += packageName.split("/").map((segment) => encodeURIComponent(segment).replace(/%40/g, "@")).join("/");
|
|
9
|
+
if (packageVersion) url += `?v=${encodeURIComponent(packageVersion)}`;
|
|
10
10
|
return url;
|
|
11
11
|
}
|
|
12
12
|
function useData(basePath, route, packageName, packageVersion) {
|
|
@@ -20,6 +20,7 @@ function useData(basePath, route, packageName, packageVersion) {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
|
+
exports.buildUrl = buildUrl;
|
|
23
24
|
exports.useData = useData;
|
|
24
25
|
|
|
25
26
|
//# sourceMappingURL=use-data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-data.js","names":[],"sources":["../../src/api/use-data.ts"],"sourcesContent":["import type { SWRResponse } from 'swr';\nimport useSWR from 'swr';\n\nimport API from '../store/api';\nimport type { APIRoute } from '../store/routes';\n\
|
|
1
|
+
{"version":3,"file":"use-data.js","names":[],"sources":["../../src/api/use-data.ts"],"sourcesContent":["import type { SWRResponse } from 'swr';\nimport useSWR from 'swr';\n\nimport API from '../store/api';\nimport type { APIRoute } from '../store/routes';\n\nexport function buildUrl(\n basePath: string,\n route: APIRoute,\n packageName?: string,\n packageVersion?: string\n): string {\n let url = `${basePath}${route}`;\n if (packageName) {\n // encode each path segment (scoped names keep their `/`); characters like\n // `+` in build-metadata versions would otherwise be decoded as a space.\n // `@` stays literal: it is path-safe and the npm registry convention —\n // clients, proxies and test intercepts all expect `/@scope/pkg`\n url += packageName\n .split('/')\n .map((segment) => encodeURIComponent(segment).replace(/%40/g, '@'))\n .join('/');\n }\n if (packageVersion) {\n url += `?v=${encodeURIComponent(packageVersion)}`;\n }\n return url;\n}\n\nexport function useData<T>(\n basePath: string,\n route: APIRoute,\n packageName?: string,\n packageVersion?: string\n): Pick<SWRResponse<T>, 'data' | 'error' | 'isLoading' | 'mutate'> {\n const url = buildUrl(basePath, route, packageName, packageVersion);\n\n const { data, error, isLoading, mutate } = useSWR<T>(url, () => API.request<T>(url));\n\n return { data, error, isLoading, mutate };\n}\n"],"mappings":";;;;;AAMA,SAAgB,SACd,UACA,OACA,aACA,gBACQ;CACR,IAAI,MAAM,GAAG,WAAW;CACxB,IAAI,aAKF,OAAO,YACJ,MAAM,GAAG,CAAC,CACV,KAAK,YAAY,mBAAmB,OAAO,CAAC,CAAC,QAAQ,QAAQ,GAAG,CAAC,CAAC,CAClE,KAAK,GAAG;CAEb,IAAI,gBACF,OAAO,MAAM,mBAAmB,cAAc;CAEhD,OAAO;AACT;AAEA,SAAgB,QACd,UACA,OACA,aACA,gBACiE;CACjE,MAAM,MAAM,SAAS,UAAU,OAAO,aAAa,cAAc;CAEjE,MAAM,EAAE,MAAM,OAAO,WAAW,YAAA,GAAW,IAAA,QAAA,CAAU,WAAW,YAAA,QAAI,QAAW,GAAG,CAAC;CAEnF,OAAO;EAAE;EAAM;EAAO;EAAW;CAAO;AAC1C"}
|
package/build/api/use-data.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import useSWR from "swr";
|
|
|
3
3
|
//#region src/api/use-data.ts
|
|
4
4
|
function buildUrl(basePath, route, packageName, packageVersion) {
|
|
5
5
|
let url = `${basePath}${route}`;
|
|
6
|
-
if (packageName) url += packageName;
|
|
7
|
-
if (packageVersion) url += `?v=${packageVersion}`;
|
|
6
|
+
if (packageName) url += packageName.split("/").map((segment) => encodeURIComponent(segment).replace(/%40/g, "@")).join("/");
|
|
7
|
+
if (packageVersion) url += `?v=${encodeURIComponent(packageVersion)}`;
|
|
8
8
|
return url;
|
|
9
9
|
}
|
|
10
10
|
function useData(basePath, route, packageName, packageVersion) {
|
|
@@ -18,6 +18,6 @@ function useData(basePath, route, packageName, packageVersion) {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
|
-
export { useData };
|
|
21
|
+
export { buildUrl, useData };
|
|
22
22
|
|
|
23
23
|
//# sourceMappingURL=use-data.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-data.mjs","names":[],"sources":["../../src/api/use-data.ts"],"sourcesContent":["import type { SWRResponse } from 'swr';\nimport useSWR from 'swr';\n\nimport API from '../store/api';\nimport type { APIRoute } from '../store/routes';\n\
|
|
1
|
+
{"version":3,"file":"use-data.mjs","names":[],"sources":["../../src/api/use-data.ts"],"sourcesContent":["import type { SWRResponse } from 'swr';\nimport useSWR from 'swr';\n\nimport API from '../store/api';\nimport type { APIRoute } from '../store/routes';\n\nexport function buildUrl(\n basePath: string,\n route: APIRoute,\n packageName?: string,\n packageVersion?: string\n): string {\n let url = `${basePath}${route}`;\n if (packageName) {\n // encode each path segment (scoped names keep their `/`); characters like\n // `+` in build-metadata versions would otherwise be decoded as a space.\n // `@` stays literal: it is path-safe and the npm registry convention —\n // clients, proxies and test intercepts all expect `/@scope/pkg`\n url += packageName\n .split('/')\n .map((segment) => encodeURIComponent(segment).replace(/%40/g, '@'))\n .join('/');\n }\n if (packageVersion) {\n url += `?v=${encodeURIComponent(packageVersion)}`;\n }\n return url;\n}\n\nexport function useData<T>(\n basePath: string,\n route: APIRoute,\n packageName?: string,\n packageVersion?: string\n): Pick<SWRResponse<T>, 'data' | 'error' | 'isLoading' | 'mutate'> {\n const url = buildUrl(basePath, route, packageName, packageVersion);\n\n const { data, error, isLoading, mutate } = useSWR<T>(url, () => API.request<T>(url));\n\n return { data, error, isLoading, mutate };\n}\n"],"mappings":";;;AAMA,SAAgB,SACd,UACA,OACA,aACA,gBACQ;CACR,IAAI,MAAM,GAAG,WAAW;CACxB,IAAI,aAKF,OAAO,YACJ,MAAM,GAAG,CAAC,CACV,KAAK,YAAY,mBAAmB,OAAO,CAAC,CAAC,QAAQ,QAAQ,GAAG,CAAC,CAAC,CAClE,KAAK,GAAG;CAEb,IAAI,gBACF,OAAO,MAAM,mBAAmB,cAAc;CAEhD,OAAO;AACT;AAEA,SAAgB,QACd,UACA,OACA,aACA,gBACiE;CACjE,MAAM,MAAM,SAAS,UAAU,OAAO,aAAa,cAAc;CAEjE,MAAM,EAAE,MAAM,OAAO,WAAW,WAAW,OAAU,WAAW,YAAI,QAAW,GAAG,CAAC;CAEnF,OAAO;EAAE;EAAM;EAAO;EAAW;CAAO;AAC1C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const require_runtime = require("../../_virtual/_rolldown/runtime.js");
|
|
2
2
|
const require_url = require("../../utils/url.js");
|
|
3
|
+
const require_utils = require("../../utils/utils.js");
|
|
3
4
|
require("../../utils/index.js");
|
|
4
5
|
const require_RawViewer = require("../RawViewer/RawViewer.js");
|
|
5
6
|
require("../RawViewer/index.js");
|
|
@@ -21,9 +22,10 @@ var ActionBar = ({ showRaw, showDownloadTarball = true, packageMeta }) => {
|
|
|
21
22
|
type: "VISIT_HOMEPAGE",
|
|
22
23
|
link: homepage
|
|
23
24
|
});
|
|
24
|
-
|
|
25
|
+
const bugsUrl = require_utils.getBugsUrl(bugs);
|
|
26
|
+
if (bugsUrl && require_url.isURL(bugsUrl)) actions.push({
|
|
25
27
|
type: "OPEN_AN_ISSUE",
|
|
26
|
-
link:
|
|
28
|
+
link: bugsUrl
|
|
27
29
|
});
|
|
28
30
|
if (dist?.tarball && require_url.isURL(dist.tarball) && showDownloadTarball) actions.push({
|
|
29
31
|
type: "DOWNLOAD_TARBALL",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBar.js","names":[],"sources":["../../../src/components/ActionBar/ActionBar.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport React, { useState } from 'react';\n\nimport { url } from '../../utils';\nimport RawViewer from '../RawViewer';\nimport type { ActionBarActionProps } from './ActionBarAction';\nimport ActionBarAction from './ActionBarAction';\n\nexport type Props = {\n showRaw?: boolean;\n showDownloadTarball?: boolean;\n packageMeta: any;\n};\n\nconst ActionBar: React.FC<Props> = ({ showRaw, showDownloadTarball = true, packageMeta }) => {\n const [isRawViewerOpen, setIsRawViewerOpen] = useState(false);\n\n if (!packageMeta?.latest) {\n return null;\n }\n\n const { homepage, bugs, dist } = packageMeta.latest;\n\n const actions: ActionBarActionProps[] = [];\n\n if (homepage && url.isURL(homepage)) {\n actions.push({ type: 'VISIT_HOMEPAGE', link: homepage });\n }\n\n
|
|
1
|
+
{"version":3,"file":"ActionBar.js","names":[],"sources":["../../../src/components/ActionBar/ActionBar.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport React, { useState } from 'react';\n\nimport { url, utils } from '../../utils';\nimport RawViewer from '../RawViewer';\nimport type { ActionBarActionProps } from './ActionBarAction';\nimport ActionBarAction from './ActionBarAction';\n\nexport type Props = {\n showRaw?: boolean;\n showDownloadTarball?: boolean;\n packageMeta: any;\n};\n\nconst ActionBar: React.FC<Props> = ({ showRaw, showDownloadTarball = true, packageMeta }) => {\n const [isRawViewerOpen, setIsRawViewerOpen] = useState(false);\n\n if (!packageMeta?.latest) {\n return null;\n }\n\n const { homepage, bugs, dist } = packageMeta.latest;\n\n const actions: ActionBarActionProps[] = [];\n\n if (homepage && url.isURL(homepage)) {\n actions.push({ type: 'VISIT_HOMEPAGE', link: homepage });\n }\n\n // bugs can be the object form or a plain url string, both valid in npm\n const bugsUrl = utils.getBugsUrl(bugs);\n if (bugsUrl && url.isURL(bugsUrl)) {\n actions.push({ type: 'OPEN_AN_ISSUE', link: bugsUrl });\n }\n\n if (dist?.tarball && url.isURL(dist.tarball) && showDownloadTarball) {\n actions.push({ type: 'DOWNLOAD_TARBALL', link: dist.tarball });\n }\n\n if (showRaw) {\n actions.push({ type: 'RAW_DATA', action: () => setIsRawViewerOpen(true) });\n }\n\n return (\n <Box alignItems=\"center\" display=\"flex\" sx={{ my: 2 }}>\n <Stack direction=\"row\" spacing={1}>\n {actions.map((action) => (\n <ActionBarAction key={action.type} {...action} />\n ))}\n {isRawViewerOpen && (\n <RawViewer\n isOpen={isRawViewerOpen}\n onClose={() => {\n setIsRawViewerOpen(false);\n }}\n packageMeta={packageMeta}\n />\n )}\n </Stack>\n </Box>\n );\n};\n\nexport default ActionBar;\n"],"mappings":";;;;;;;;;;;;;;;AAeA,IAAM,aAA8B,EAAE,SAAS,sBAAsB,MAAM,kBAAkB;CAC3F,MAAM,CAAC,iBAAiB,uBAAA,GAAsB,MAAA,SAAA,CAAS,KAAK;CAE5D,IAAI,CAAC,aAAa,QAChB,OAAO;CAGT,MAAM,EAAE,UAAU,MAAM,SAAS,YAAY;CAE7C,MAAM,UAAkC,CAAC;CAEzC,IAAI,YAAA,YAAA,MAAsB,QAAQ,GAChC,QAAQ,KAAK;EAAE,MAAM;EAAkB,MAAM;CAAS,CAAC;CAIzD,MAAM,UAAA,cAAA,WAA2B,IAAI;CACrC,IAAI,WAAA,YAAA,MAAqB,OAAO,GAC9B,QAAQ,KAAK;EAAE,MAAM;EAAiB,MAAM;CAAQ,CAAC;CAGvD,IAAI,MAAM,WAAA,YAAA,MAAqB,KAAK,OAAO,KAAK,qBAC9C,QAAQ,KAAK;EAAE,MAAM;EAAoB,MAAM,KAAK;CAAQ,CAAC;CAG/D,IAAI,SACF,QAAQ,KAAK;EAAE,MAAM;EAAY,cAAc,mBAAmB,IAAI;CAAE,CAAC;CAG3E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAA,SAAD;EAAK,YAAW;EAAS,SAAQ;EAAO,IAAI,EAAE,IAAI,EAAE;EAClD,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,oBAAA,SAAD;GAAO,WAAU;GAAM,SAAS;GAAhC,UAAA,CACG,QAAQ,KAAK,WACZ,iBAAA,GAAA,kBAAA,IAAA,CAAC,wBAAA,SAAD,EAAmC,GAAI,OAAS,GAA1B,OAAO,IAAmB,CACjD,GACA,mBACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAA,SAAD;IACE,QAAQ;IACR,eAAe;KACb,mBAAmB,KAAK;IAC1B;IACa;GACd,CAAA,CAEE;;CACJ,CAAA;AAET"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isURL } from "../../utils/url.mjs";
|
|
2
|
+
import { getBugsUrl } from "../../utils/utils.mjs";
|
|
2
3
|
import "../../utils/index.mjs";
|
|
3
4
|
import RawViewer from "../RawViewer/RawViewer.mjs";
|
|
4
5
|
import "../RawViewer/index.mjs";
|
|
@@ -17,9 +18,10 @@ var ActionBar = ({ showRaw, showDownloadTarball = true, packageMeta }) => {
|
|
|
17
18
|
type: "VISIT_HOMEPAGE",
|
|
18
19
|
link: homepage
|
|
19
20
|
});
|
|
20
|
-
|
|
21
|
+
const bugsUrl = getBugsUrl(bugs);
|
|
22
|
+
if (bugsUrl && isURL(bugsUrl)) actions.push({
|
|
21
23
|
type: "OPEN_AN_ISSUE",
|
|
22
|
-
link:
|
|
24
|
+
link: bugsUrl
|
|
23
25
|
});
|
|
24
26
|
if (dist?.tarball && isURL(dist.tarball) && showDownloadTarball) actions.push({
|
|
25
27
|
type: "DOWNLOAD_TARBALL",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBar.mjs","names":[],"sources":["../../../src/components/ActionBar/ActionBar.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport React, { useState } from 'react';\n\nimport { url } from '../../utils';\nimport RawViewer from '../RawViewer';\nimport type { ActionBarActionProps } from './ActionBarAction';\nimport ActionBarAction from './ActionBarAction';\n\nexport type Props = {\n showRaw?: boolean;\n showDownloadTarball?: boolean;\n packageMeta: any;\n};\n\nconst ActionBar: React.FC<Props> = ({ showRaw, showDownloadTarball = true, packageMeta }) => {\n const [isRawViewerOpen, setIsRawViewerOpen] = useState(false);\n\n if (!packageMeta?.latest) {\n return null;\n }\n\n const { homepage, bugs, dist } = packageMeta.latest;\n\n const actions: ActionBarActionProps[] = [];\n\n if (homepage && url.isURL(homepage)) {\n actions.push({ type: 'VISIT_HOMEPAGE', link: homepage });\n }\n\n
|
|
1
|
+
{"version":3,"file":"ActionBar.mjs","names":[],"sources":["../../../src/components/ActionBar/ActionBar.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport React, { useState } from 'react';\n\nimport { url, utils } from '../../utils';\nimport RawViewer from '../RawViewer';\nimport type { ActionBarActionProps } from './ActionBarAction';\nimport ActionBarAction from './ActionBarAction';\n\nexport type Props = {\n showRaw?: boolean;\n showDownloadTarball?: boolean;\n packageMeta: any;\n};\n\nconst ActionBar: React.FC<Props> = ({ showRaw, showDownloadTarball = true, packageMeta }) => {\n const [isRawViewerOpen, setIsRawViewerOpen] = useState(false);\n\n if (!packageMeta?.latest) {\n return null;\n }\n\n const { homepage, bugs, dist } = packageMeta.latest;\n\n const actions: ActionBarActionProps[] = [];\n\n if (homepage && url.isURL(homepage)) {\n actions.push({ type: 'VISIT_HOMEPAGE', link: homepage });\n }\n\n // bugs can be the object form or a plain url string, both valid in npm\n const bugsUrl = utils.getBugsUrl(bugs);\n if (bugsUrl && url.isURL(bugsUrl)) {\n actions.push({ type: 'OPEN_AN_ISSUE', link: bugsUrl });\n }\n\n if (dist?.tarball && url.isURL(dist.tarball) && showDownloadTarball) {\n actions.push({ type: 'DOWNLOAD_TARBALL', link: dist.tarball });\n }\n\n if (showRaw) {\n actions.push({ type: 'RAW_DATA', action: () => setIsRawViewerOpen(true) });\n }\n\n return (\n <Box alignItems=\"center\" display=\"flex\" sx={{ my: 2 }}>\n <Stack direction=\"row\" spacing={1}>\n {actions.map((action) => (\n <ActionBarAction key={action.type} {...action} />\n ))}\n {isRawViewerOpen && (\n <RawViewer\n isOpen={isRawViewerOpen}\n onClose={() => {\n setIsRawViewerOpen(false);\n }}\n packageMeta={packageMeta}\n />\n )}\n </Stack>\n </Box>\n );\n};\n\nexport default ActionBar;\n"],"mappings":";;;;;;;;;;;AAeA,IAAM,aAA8B,EAAE,SAAS,sBAAsB,MAAM,kBAAkB;CAC3F,MAAM,CAAC,iBAAiB,sBAAsB,SAAS,KAAK;CAE5D,IAAI,CAAC,aAAa,QAChB,OAAO;CAGT,MAAM,EAAE,UAAU,MAAM,SAAS,YAAY;CAE7C,MAAM,UAAkC,CAAC;CAEzC,IAAI,YAAY,MAAU,QAAQ,GAChC,QAAQ,KAAK;EAAE,MAAM;EAAkB,MAAM;CAAS,CAAC;CAIzD,MAAM,UAAU,WAAiB,IAAI;CACrC,IAAI,WAAW,MAAU,OAAO,GAC9B,QAAQ,KAAK;EAAE,MAAM;EAAiB,MAAM;CAAQ,CAAC;CAGvD,IAAI,MAAM,WAAW,MAAU,KAAK,OAAO,KAAK,qBAC9C,QAAQ,KAAK;EAAE,MAAM;EAAoB,MAAM,KAAK;CAAQ,CAAC;CAG/D,IAAI,SACF,QAAQ,KAAK;EAAE,MAAM;EAAY,cAAc,mBAAmB,IAAI;CAAE,CAAC;CAG3E,OACE,oBAAC,KAAD;EAAK,YAAW;EAAS,SAAQ;EAAO,IAAI,EAAE,IAAI,EAAE;EAClD,UAAA,qBAAC,OAAD;GAAO,WAAU;GAAM,SAAS;GAAhC,UAAA,CACG,QAAQ,KAAK,WACZ,oBAAC,iBAAD,EAAmC,GAAI,OAAS,GAA1B,OAAO,IAAmB,CACjD,GACA,mBACC,oBAAC,WAAD;IACE,QAAQ;IACR,eAAe;KACb,mBAAmB,KAAK;IAC1B;IACa;GACd,CAAA,CAEE;;CACJ,CAAA;AAET"}
|
|
@@ -11,8 +11,8 @@ let _mui_material_Tooltip = require("@mui/material/Tooltip");
|
|
|
11
11
|
_mui_material_Tooltip = require_runtime.__toESM(_mui_material_Tooltip);
|
|
12
12
|
let react = require("react");
|
|
13
13
|
react = require_runtime.__toESM(react);
|
|
14
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
15
14
|
let react_i18next = require("react-i18next");
|
|
15
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
16
16
|
let _mui_icons_material_BugReport = require("@mui/icons-material/BugReport");
|
|
17
17
|
_mui_icons_material_BugReport = require_runtime.__toESM(_mui_icons_material_BugReport);
|
|
18
18
|
let _mui_icons_material_CloudDownload = require("@mui/icons-material/CloudDownload");
|
|
@@ -7,8 +7,8 @@ import "../LinkExternal/index.mjs";
|
|
|
7
7
|
import styled from "@emotion/styled";
|
|
8
8
|
import Tooltip from "@mui/material/Tooltip";
|
|
9
9
|
import { useCallback } from "react";
|
|
10
|
-
import { jsx } from "react/jsx-runtime";
|
|
11
10
|
import { useTranslation } from "react-i18next";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
12
|
import BugReportIcon from "@mui/icons-material/BugReport";
|
|
13
13
|
import DownloadIcon from "@mui/icons-material/CloudDownload";
|
|
14
14
|
import HomeIcon from "@mui/icons-material/Home";
|
|
@@ -20,11 +20,14 @@ var Login = require_loadable.default(() => Promise.resolve().then(() => require(
|
|
|
20
20
|
var Success = require_loadable.default(() => Promise.resolve().then(() => require("../../pages/Security/Success.js")));
|
|
21
21
|
var AddUser = require_loadable.default(() => Promise.resolve().then(() => require("../../pages/Security/AddUser.js")));
|
|
22
22
|
var ChangePassword = require_loadable.default(() => Promise.resolve().then(() => require("../../pages/Security/ChangePassword.js")));
|
|
23
|
+
var StageList = require_loadable.default(() => Promise.resolve().then(() => require("../../pages/Stage/StageList.js")));
|
|
24
|
+
var StageDetail = require_loadable.default(() => Promise.resolve().then(() => require("../../pages/Stage/StageDetail.js")));
|
|
23
25
|
var versionElement = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_VersionProvider.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VersionPage, {}) });
|
|
24
26
|
var AppRoute = () => {
|
|
25
27
|
const { configOptions } = require_AppConfigurationProvider.useConfig();
|
|
26
28
|
const createUserEnabled = configOptions?.flags?.createUser;
|
|
27
29
|
const changePasswordEnabled = configOptions?.flags?.changePassword;
|
|
30
|
+
const stageEnabled = configOptions?.flags?.stage;
|
|
28
31
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(swr.SWRConfig, {
|
|
29
32
|
value: {
|
|
30
33
|
revalidateOnFocus: false,
|
|
@@ -51,6 +54,16 @@ var AppRoute = () => {
|
|
|
51
54
|
element: versionElement,
|
|
52
55
|
path: require_routes.Route.PACKAGE
|
|
53
56
|
}),
|
|
57
|
+
stageEnabled && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_router.Route, {
|
|
58
|
+
element: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_router.Outlet, {}),
|
|
59
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_router.Route, {
|
|
60
|
+
element: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StageList, {}),
|
|
61
|
+
path: require_routes.Route.STAGE
|
|
62
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_router.Route, {
|
|
63
|
+
element: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StageDetail, {}),
|
|
64
|
+
path: require_routes.Route.STAGE_DETAIL
|
|
65
|
+
})]
|
|
66
|
+
}),
|
|
54
67
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_router.Route, {
|
|
55
68
|
element: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_router.Outlet, {}),
|
|
56
69
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppRoute.js","names":[],"sources":["../../../src/components/AppRoute/AppRoute.tsx"],"sourcesContent":["import React from 'react';\nimport { Outlet, Route as RouterRoute, Routes } from 'react-router';\nimport { SWRConfig } from 'swr';\n\nimport { ManifestsProvider, VersionProvider } from '../../providers';\nimport { useConfig } from '../../providers/AppConfigurationProvider/AppConfigurationProvider';\nimport { Route } from '../../utils';\nimport loadable from '../../utils/loadable';\nimport NotFound from '../NotFound';\n\nconst VersionPage = loadable(() => import('../../pages/Version'));\nconst Front = loadable(() => import('../../pages/Front'));\nconst Login = loadable(() => import('../../pages/Security/Login'));\nconst Success = loadable(() => import('../../pages/Security/Success'));\nconst AddUser = loadable(() => import('../../pages/Security/AddUser'));\nconst ChangePassword = loadable(() => import('../../pages/Security/ChangePassword'));\n\nconst versionElement = (\n <VersionProvider>\n <VersionPage />\n </VersionProvider>\n);\n\nconst AppRoute: React.FC = () => {\n const { configOptions } = useConfig();\n const createUserEnabled = configOptions?.flags?.createUser;\n const changePasswordEnabled = configOptions?.flags?.changePassword;\n return (\n <SWRConfig value={{ revalidateOnFocus: false, revalidateOnReconnect: false }}>\n <Routes>\n <RouterRoute\n element={\n <ManifestsProvider>\n <Front />\n </ManifestsProvider>\n }\n path={Route.ROOT}\n />\n <RouterRoute element={versionElement} path={Route.SCOPE_PACKAGE_VERSION} />\n <RouterRoute element={versionElement} path={Route.SCOPE_PACKAGE} />\n <RouterRoute element={versionElement} path={Route.PACKAGE_VERSION} />\n <RouterRoute element={versionElement} path={Route.PACKAGE} />\n <RouterRoute element={<Outlet />}>\n <RouterRoute element={<Login />} path={Route.LOGIN} />\n <RouterRoute element={<Success />} path={Route.SUCCESS} />\n {createUserEnabled && <RouterRoute element={<AddUser />} path={Route.ADD_USER} />}\n {changePasswordEnabled && (\n <RouterRoute element={<ChangePassword />} path={Route.CHANGE_PASSWORD} />\n )}\n </RouterRoute>\n <RouterRoute element={<NotFound />} path=\"*\" />\n </Routes>\n </SWRConfig>\n );\n};\n\nexport default AppRoute;\n"],"mappings":";;;;;;;;;;;;;;;;AAUA,IAAM,cAAc,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,8BAAA,CAAA,CAA6B;AAChE,IAAM,QAAQ,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,4BAAA,CAAA,CAA2B;AACxD,IAAM,QAAQ,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,+BAAA,CAAA,CAAoC;AACjE,IAAM,UAAU,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,iCAAA,CAAA,CAAsC;AACrE,IAAM,UAAU,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,iCAAA,CAAA,CAAsC;AACrE,IAAM,iBAAiB,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,wCAAA,CAAA,CAA6C;
|
|
1
|
+
{"version":3,"file":"AppRoute.js","names":[],"sources":["../../../src/components/AppRoute/AppRoute.tsx"],"sourcesContent":["import React from 'react';\nimport { Outlet, Route as RouterRoute, Routes } from 'react-router';\nimport { SWRConfig } from 'swr';\n\nimport { ManifestsProvider, VersionProvider } from '../../providers';\nimport { useConfig } from '../../providers/AppConfigurationProvider/AppConfigurationProvider';\nimport { Route } from '../../utils';\nimport loadable from '../../utils/loadable';\nimport NotFound from '../NotFound';\n\nconst VersionPage = loadable(() => import('../../pages/Version'));\nconst Front = loadable(() => import('../../pages/Front'));\nconst Login = loadable(() => import('../../pages/Security/Login'));\nconst Success = loadable(() => import('../../pages/Security/Success'));\nconst AddUser = loadable(() => import('../../pages/Security/AddUser'));\nconst ChangePassword = loadable(() => import('../../pages/Security/ChangePassword'));\nconst StageList = loadable(() => import('../../pages/Stage/StageList'));\nconst StageDetail = loadable(() => import('../../pages/Stage/StageDetail'));\n\nconst versionElement = (\n <VersionProvider>\n <VersionPage />\n </VersionProvider>\n);\n\nconst AppRoute: React.FC = () => {\n const { configOptions } = useConfig();\n const createUserEnabled = configOptions?.flags?.createUser;\n const changePasswordEnabled = configOptions?.flags?.changePassword;\n const stageEnabled = configOptions?.flags?.stage;\n return (\n <SWRConfig value={{ revalidateOnFocus: false, revalidateOnReconnect: false }}>\n <Routes>\n <RouterRoute\n element={\n <ManifestsProvider>\n <Front />\n </ManifestsProvider>\n }\n path={Route.ROOT}\n />\n <RouterRoute element={versionElement} path={Route.SCOPE_PACKAGE_VERSION} />\n <RouterRoute element={versionElement} path={Route.SCOPE_PACKAGE} />\n <RouterRoute element={versionElement} path={Route.PACKAGE_VERSION} />\n <RouterRoute element={versionElement} path={Route.PACKAGE} />\n {stageEnabled && (\n <RouterRoute element={<Outlet />}>\n <RouterRoute element={<StageList />} path={Route.STAGE} />\n <RouterRoute element={<StageDetail />} path={Route.STAGE_DETAIL} />\n </RouterRoute>\n )}\n <RouterRoute element={<Outlet />}>\n <RouterRoute element={<Login />} path={Route.LOGIN} />\n <RouterRoute element={<Success />} path={Route.SUCCESS} />\n {createUserEnabled && <RouterRoute element={<AddUser />} path={Route.ADD_USER} />}\n {changePasswordEnabled && (\n <RouterRoute element={<ChangePassword />} path={Route.CHANGE_PASSWORD} />\n )}\n </RouterRoute>\n <RouterRoute element={<NotFound />} path=\"*\" />\n </Routes>\n </SWRConfig>\n );\n};\n\nexport default AppRoute;\n"],"mappings":";;;;;;;;;;;;;;;;AAUA,IAAM,cAAc,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,8BAAA,CAAA,CAA6B;AAChE,IAAM,QAAQ,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,4BAAA,CAAA,CAA2B;AACxD,IAAM,QAAQ,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,+BAAA,CAAA,CAAoC;AACjE,IAAM,UAAU,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,iCAAA,CAAA,CAAsC;AACrE,IAAM,UAAU,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,iCAAA,CAAA,CAAsC;AACrE,IAAM,iBAAiB,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,wCAAA,CAAA,CAA6C;AACnF,IAAM,YAAY,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,gCAAA,CAAA,CAAqC;AACtE,IAAM,cAAc,iBAAA,cAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAe,kCAAA,CAAA,CAAuC;AAE1E,IAAM,iBACJ,iBAAA,GAAA,kBAAA,IAAA,CAAC,wBAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD,CAAc,CAAA,EACC,CAAA;AAGnB,IAAM,iBAA2B;CAC/B,MAAM,EAAE,kBAAkB,iCAAA,UAAU;CACpC,MAAM,oBAAoB,eAAe,OAAO;CAChD,MAAM,wBAAwB,eAAe,OAAO;CACpD,MAAM,eAAe,eAAe,OAAO;CAC3C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,IAAA,WAAD;EAAW,OAAO;GAAE,mBAAmB;GAAO,uBAAuB;EAAM;EACzE,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,aAAA,QAAD,EAAA,UAAA;GACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,OAAD;IACE,SACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,CAAQ,CAAA,EACS,CAAA;IAErB,MAAM,eAAA,MAAM;GACb,CAAA;GACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,OAAD;IAAa,SAAS;IAAgB,MAAM,eAAA,MAAM;GAAwB,CAAA;GAC1E,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,OAAD;IAAa,SAAS;IAAgB,MAAM,eAAA,MAAM;GAAgB,CAAA;GAClE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,OAAD;IAAa,SAAS;IAAgB,MAAM,eAAA,MAAM;GAAkB,CAAA;GACpE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,OAAD;IAAa,SAAS;IAAgB,MAAM,eAAA,MAAM;GAAU,CAAA;GAC3D,gBACC,iBAAA,GAAA,kBAAA,KAAA,CAAC,aAAA,OAAD;IAAa,SAAS,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,QAAD,CAAS,CAAA;IAA/B,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,OAAD;KAAa,SAAS,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD,CAAY,CAAA;KAAG,MAAM,eAAA,MAAM;IAAQ,CAAA,GACzD,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,OAAD;KAAa,SAAS,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD,CAAc,CAAA;KAAG,MAAM,eAAA,MAAM;IAAe,CAAA,CACvD;;GAEf,iBAAA,GAAA,kBAAA,KAAA,CAAC,aAAA,OAAD;IAAa,SAAS,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,QAAD,CAAS,CAAA;IAA/B,UAAA;KACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,OAAD;MAAa,SAAS,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,CAAQ,CAAA;MAAG,MAAM,eAAA,MAAM;KAAQ,CAAA;KACrD,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,OAAD;MAAa,SAAS,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD,CAAU,CAAA;MAAG,MAAM,eAAA,MAAM;KAAU,CAAA;KACxD,qBAAqB,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,OAAD;MAAa,SAAS,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD,CAAU,CAAA;MAAG,MAAM,eAAA,MAAM;KAAW,CAAA;KAC/E,yBACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,OAAD;MAAa,SAAS,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAD,CAAiB,CAAA;MAAG,MAAM,eAAA,MAAM;KAAkB,CAAA;IAE/D;;GACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,OAAD;IAAa,SAAS,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAA,SAAD,CAAW,CAAA;IAAG,MAAK;GAAK,CAAA;EACxC,EAAA,CAAA;CACC,CAAA;AAEf"}
|
|
@@ -18,11 +18,14 @@ var Login = loadable_default(() => import("../../pages/Security/Login.mjs"));
|
|
|
18
18
|
var Success = loadable_default(() => import("../../pages/Security/Success.mjs"));
|
|
19
19
|
var AddUser = loadable_default(() => import("../../pages/Security/AddUser.mjs"));
|
|
20
20
|
var ChangePassword = loadable_default(() => import("../../pages/Security/ChangePassword.mjs"));
|
|
21
|
+
var StageList = loadable_default(() => import("../../pages/Stage/StageList.mjs"));
|
|
22
|
+
var StageDetail = loadable_default(() => import("../../pages/Stage/StageDetail.mjs"));
|
|
21
23
|
var versionElement = /* @__PURE__ */ jsx(VersionProvider, { children: /* @__PURE__ */ jsx(VersionPage, {}) });
|
|
22
24
|
var AppRoute = () => {
|
|
23
25
|
const { configOptions } = useConfig();
|
|
24
26
|
const createUserEnabled = configOptions?.flags?.createUser;
|
|
25
27
|
const changePasswordEnabled = configOptions?.flags?.changePassword;
|
|
28
|
+
const stageEnabled = configOptions?.flags?.stage;
|
|
26
29
|
return /* @__PURE__ */ jsx(SWRConfig, {
|
|
27
30
|
value: {
|
|
28
31
|
revalidateOnFocus: false,
|
|
@@ -49,6 +52,16 @@ var AppRoute = () => {
|
|
|
49
52
|
element: versionElement,
|
|
50
53
|
path: Route$1.PACKAGE
|
|
51
54
|
}),
|
|
55
|
+
stageEnabled && /* @__PURE__ */ jsxs(Route, {
|
|
56
|
+
element: /* @__PURE__ */ jsx(Outlet, {}),
|
|
57
|
+
children: [/* @__PURE__ */ jsx(Route, {
|
|
58
|
+
element: /* @__PURE__ */ jsx(StageList, {}),
|
|
59
|
+
path: Route$1.STAGE
|
|
60
|
+
}), /* @__PURE__ */ jsx(Route, {
|
|
61
|
+
element: /* @__PURE__ */ jsx(StageDetail, {}),
|
|
62
|
+
path: Route$1.STAGE_DETAIL
|
|
63
|
+
})]
|
|
64
|
+
}),
|
|
52
65
|
/* @__PURE__ */ jsxs(Route, {
|
|
53
66
|
element: /* @__PURE__ */ jsx(Outlet, {}),
|
|
54
67
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppRoute.mjs","names":[],"sources":["../../../src/components/AppRoute/AppRoute.tsx"],"sourcesContent":["import React from 'react';\nimport { Outlet, Route as RouterRoute, Routes } from 'react-router';\nimport { SWRConfig } from 'swr';\n\nimport { ManifestsProvider, VersionProvider } from '../../providers';\nimport { useConfig } from '../../providers/AppConfigurationProvider/AppConfigurationProvider';\nimport { Route } from '../../utils';\nimport loadable from '../../utils/loadable';\nimport NotFound from '../NotFound';\n\nconst VersionPage = loadable(() => import('../../pages/Version'));\nconst Front = loadable(() => import('../../pages/Front'));\nconst Login = loadable(() => import('../../pages/Security/Login'));\nconst Success = loadable(() => import('../../pages/Security/Success'));\nconst AddUser = loadable(() => import('../../pages/Security/AddUser'));\nconst ChangePassword = loadable(() => import('../../pages/Security/ChangePassword'));\n\nconst versionElement = (\n <VersionProvider>\n <VersionPage />\n </VersionProvider>\n);\n\nconst AppRoute: React.FC = () => {\n const { configOptions } = useConfig();\n const createUserEnabled = configOptions?.flags?.createUser;\n const changePasswordEnabled = configOptions?.flags?.changePassword;\n return (\n <SWRConfig value={{ revalidateOnFocus: false, revalidateOnReconnect: false }}>\n <Routes>\n <RouterRoute\n element={\n <ManifestsProvider>\n <Front />\n </ManifestsProvider>\n }\n path={Route.ROOT}\n />\n <RouterRoute element={versionElement} path={Route.SCOPE_PACKAGE_VERSION} />\n <RouterRoute element={versionElement} path={Route.SCOPE_PACKAGE} />\n <RouterRoute element={versionElement} path={Route.PACKAGE_VERSION} />\n <RouterRoute element={versionElement} path={Route.PACKAGE} />\n <RouterRoute element={<Outlet />}>\n <RouterRoute element={<Login />} path={Route.LOGIN} />\n <RouterRoute element={<Success />} path={Route.SUCCESS} />\n {createUserEnabled && <RouterRoute element={<AddUser />} path={Route.ADD_USER} />}\n {changePasswordEnabled && (\n <RouterRoute element={<ChangePassword />} path={Route.CHANGE_PASSWORD} />\n )}\n </RouterRoute>\n <RouterRoute element={<NotFound />} path=\"*\" />\n </Routes>\n </SWRConfig>\n );\n};\n\nexport default AppRoute;\n"],"mappings":";;;;;;;;;;;;;;AAUA,IAAM,cAAc,uBAAe,OAAO,gCAAsB;AAChE,IAAM,QAAQ,uBAAe,OAAO,8BAAoB;AACxD,IAAM,QAAQ,uBAAe,OAAO,iCAA6B;AACjE,IAAM,UAAU,uBAAe,OAAO,mCAA+B;AACrE,IAAM,UAAU,uBAAe,OAAO,mCAA+B;AACrE,IAAM,iBAAiB,uBAAe,OAAO,0CAAsC;
|
|
1
|
+
{"version":3,"file":"AppRoute.mjs","names":[],"sources":["../../../src/components/AppRoute/AppRoute.tsx"],"sourcesContent":["import React from 'react';\nimport { Outlet, Route as RouterRoute, Routes } from 'react-router';\nimport { SWRConfig } from 'swr';\n\nimport { ManifestsProvider, VersionProvider } from '../../providers';\nimport { useConfig } from '../../providers/AppConfigurationProvider/AppConfigurationProvider';\nimport { Route } from '../../utils';\nimport loadable from '../../utils/loadable';\nimport NotFound from '../NotFound';\n\nconst VersionPage = loadable(() => import('../../pages/Version'));\nconst Front = loadable(() => import('../../pages/Front'));\nconst Login = loadable(() => import('../../pages/Security/Login'));\nconst Success = loadable(() => import('../../pages/Security/Success'));\nconst AddUser = loadable(() => import('../../pages/Security/AddUser'));\nconst ChangePassword = loadable(() => import('../../pages/Security/ChangePassword'));\nconst StageList = loadable(() => import('../../pages/Stage/StageList'));\nconst StageDetail = loadable(() => import('../../pages/Stage/StageDetail'));\n\nconst versionElement = (\n <VersionProvider>\n <VersionPage />\n </VersionProvider>\n);\n\nconst AppRoute: React.FC = () => {\n const { configOptions } = useConfig();\n const createUserEnabled = configOptions?.flags?.createUser;\n const changePasswordEnabled = configOptions?.flags?.changePassword;\n const stageEnabled = configOptions?.flags?.stage;\n return (\n <SWRConfig value={{ revalidateOnFocus: false, revalidateOnReconnect: false }}>\n <Routes>\n <RouterRoute\n element={\n <ManifestsProvider>\n <Front />\n </ManifestsProvider>\n }\n path={Route.ROOT}\n />\n <RouterRoute element={versionElement} path={Route.SCOPE_PACKAGE_VERSION} />\n <RouterRoute element={versionElement} path={Route.SCOPE_PACKAGE} />\n <RouterRoute element={versionElement} path={Route.PACKAGE_VERSION} />\n <RouterRoute element={versionElement} path={Route.PACKAGE} />\n {stageEnabled && (\n <RouterRoute element={<Outlet />}>\n <RouterRoute element={<StageList />} path={Route.STAGE} />\n <RouterRoute element={<StageDetail />} path={Route.STAGE_DETAIL} />\n </RouterRoute>\n )}\n <RouterRoute element={<Outlet />}>\n <RouterRoute element={<Login />} path={Route.LOGIN} />\n <RouterRoute element={<Success />} path={Route.SUCCESS} />\n {createUserEnabled && <RouterRoute element={<AddUser />} path={Route.ADD_USER} />}\n {changePasswordEnabled && (\n <RouterRoute element={<ChangePassword />} path={Route.CHANGE_PASSWORD} />\n )}\n </RouterRoute>\n <RouterRoute element={<NotFound />} path=\"*\" />\n </Routes>\n </SWRConfig>\n );\n};\n\nexport default AppRoute;\n"],"mappings":";;;;;;;;;;;;;;AAUA,IAAM,cAAc,uBAAe,OAAO,gCAAsB;AAChE,IAAM,QAAQ,uBAAe,OAAO,8BAAoB;AACxD,IAAM,QAAQ,uBAAe,OAAO,iCAA6B;AACjE,IAAM,UAAU,uBAAe,OAAO,mCAA+B;AACrE,IAAM,UAAU,uBAAe,OAAO,mCAA+B;AACrE,IAAM,iBAAiB,uBAAe,OAAO,0CAAsC;AACnF,IAAM,YAAY,uBAAe,OAAO,kCAA8B;AACtE,IAAM,cAAc,uBAAe,OAAO,oCAAgC;AAE1E,IAAM,iBACJ,oBAAC,iBAAD,EAAA,UACE,oBAAC,aAAD,CAAc,CAAA,EACC,CAAA;AAGnB,IAAM,iBAA2B;CAC/B,MAAM,EAAE,kBAAkB,UAAU;CACpC,MAAM,oBAAoB,eAAe,OAAO;CAChD,MAAM,wBAAwB,eAAe,OAAO;CACpD,MAAM,eAAe,eAAe,OAAO;CAC3C,OACE,oBAAC,WAAD;EAAW,OAAO;GAAE,mBAAmB;GAAO,uBAAuB;EAAM;EACzE,UAAA,qBAAC,QAAD,EAAA,UAAA;GACE,oBAAC,OAAD;IACE,SACE,oBAAC,mBAAD,EAAA,UACE,oBAAC,OAAD,CAAQ,CAAA,EACS,CAAA;IAErB,MAAM,QAAM;GACb,CAAA;GACD,oBAAC,OAAD;IAAa,SAAS;IAAgB,MAAM,QAAM;GAAwB,CAAA;GAC1E,oBAAC,OAAD;IAAa,SAAS;IAAgB,MAAM,QAAM;GAAgB,CAAA;GAClE,oBAAC,OAAD;IAAa,SAAS;IAAgB,MAAM,QAAM;GAAkB,CAAA;GACpE,oBAAC,OAAD;IAAa,SAAS;IAAgB,MAAM,QAAM;GAAU,CAAA;GAC3D,gBACC,qBAAC,OAAD;IAAa,SAAS,oBAAC,QAAD,CAAS,CAAA;IAA/B,UAAA,CACE,oBAAC,OAAD;KAAa,SAAS,oBAAC,WAAD,CAAY,CAAA;KAAG,MAAM,QAAM;IAAQ,CAAA,GACzD,oBAAC,OAAD;KAAa,SAAS,oBAAC,aAAD,CAAc,CAAA;KAAG,MAAM,QAAM;IAAe,CAAA,CACvD;;GAEf,qBAAC,OAAD;IAAa,SAAS,oBAAC,QAAD,CAAS,CAAA;IAA/B,UAAA;KACE,oBAAC,OAAD;MAAa,SAAS,oBAAC,OAAD,CAAQ,CAAA;MAAG,MAAM,QAAM;KAAQ,CAAA;KACrD,oBAAC,OAAD;MAAa,SAAS,oBAAC,SAAD,CAAU,CAAA;MAAG,MAAM,QAAM;KAAU,CAAA;KACxD,qBAAqB,oBAAC,OAAD;MAAa,SAAS,oBAAC,SAAD,CAAU,CAAA;MAAG,MAAM,QAAM;KAAW,CAAA;KAC/E,yBACC,oBAAC,OAAD;MAAa,SAAS,oBAAC,gBAAD,CAAiB,CAAA;MAAG,MAAM,QAAM;KAAkB,CAAA;IAE/D;;GACb,oBAAC,OAAD;IAAa,SAAS,oBAAC,UAAD,CAAW,CAAA;IAAG,MAAK;GAAK,CAAA;EACxC,EAAA,CAAA;CACC,CAAA;AAEf"}
|
|
@@ -4,8 +4,8 @@ require("../Person/index.js");
|
|
|
4
4
|
const require_styles = require("./styles.js");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_runtime.__toESM(react);
|
|
7
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
7
|
let react_i18next = require("react-i18next");
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
let _mui_material_List = require("@mui/material/List");
|
|
10
10
|
_mui_material_List = require_runtime.__toESM(_mui_material_List);
|
|
11
11
|
//#region src/components/Author/Author.tsx
|
|
@@ -2,8 +2,8 @@ import Person from "../Person/Person.mjs";
|
|
|
2
2
|
import "../Person/index.mjs";
|
|
3
3
|
import { AuthorListItem, StyledText } from "./styles.mjs";
|
|
4
4
|
import "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
5
|
import { useTranslation } from "react-i18next";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import List from "@mui/material/List";
|
|
8
8
|
//#region src/components/Author/Author.tsx
|
|
9
9
|
var Author = ({ packageMeta }) => {
|
|
@@ -10,6 +10,7 @@ let _mui_material_Tooltip = require("@mui/material/Tooltip");
|
|
|
10
10
|
_mui_material_Tooltip = require_runtime.__toESM(_mui_material_Tooltip);
|
|
11
11
|
let react = require("react");
|
|
12
12
|
react = require_runtime.__toESM(react);
|
|
13
|
+
let react_i18next = require("react-i18next");
|
|
13
14
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
15
|
//#region src/components/CopyClipboard/CopyToClipBoard.tsx
|
|
15
16
|
var Wrapper = (0, _emotion_styled.default)("div")({
|
|
@@ -26,18 +27,22 @@ var Content = (0, _emotion_styled.default)("span")(({ theme }) => ({
|
|
|
26
27
|
fontSize: theme.fontSize.sm
|
|
27
28
|
}));
|
|
28
29
|
function CopyToClipBoard({ text, children, dataTestId, title, ...props }) {
|
|
30
|
+
const { t } = (0, react_i18next.useTranslation)();
|
|
31
|
+
const accessibleName = title ?? t("copy-to-clipboard");
|
|
29
32
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Wrapper, {
|
|
30
33
|
...props,
|
|
31
34
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Content, { children: children ?? text }), title ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Tooltip.default, {
|
|
32
35
|
disableFocusListener: true,
|
|
33
36
|
title,
|
|
34
37
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_IconButton.default, {
|
|
38
|
+
"aria-label": accessibleName,
|
|
35
39
|
"data-testid": dataTestId,
|
|
36
40
|
onClick: require_utils.copyToClipBoardUtility(text),
|
|
37
41
|
size: "small",
|
|
38
42
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_icons_material_FileCopy.default, { fontSize: "small" })
|
|
39
43
|
})
|
|
40
44
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_IconButton.default, {
|
|
45
|
+
"aria-label": accessibleName,
|
|
41
46
|
"data-testid": dataTestId,
|
|
42
47
|
onClick: require_utils.copyToClipBoardUtility(text),
|
|
43
48
|
size: "small",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToClipBoard.js","names":[],"sources":["../../../src/components/CopyClipboard/CopyToClipBoard.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport FileCopy from '@mui/icons-material/FileCopy';\nimport IconButton from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\nimport React from 'react';\n\nimport type { Theme } from '../../Theme';\nimport { copyToClipBoardUtility } from './utils';\n\ninterface Props {\n text: string;\n title?: string;\n dataTestId: string;\n children?: React.ReactNode;\n}\n\nconst Wrapper = styled('div')({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n});\n\nconst Content = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n display: 'inline-block',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n height: 'auto',\n whiteSpace: 'break-spaces',\n fontSize: theme.fontSize.sm,\n}));\n\nfunction CopyToClipBoard({ text, children, dataTestId, title, ...props }: Props) {\n return (\n <Wrapper {...props}>\n <Content>{children ?? text}</Content>\n {title ? (\n <Tooltip disableFocusListener={true} title={title}>\n <IconButton
|
|
1
|
+
{"version":3,"file":"CopyToClipBoard.js","names":[],"sources":["../../../src/components/CopyClipboard/CopyToClipBoard.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport FileCopy from '@mui/icons-material/FileCopy';\nimport IconButton from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { copyToClipBoardUtility } from './utils';\n\ninterface Props {\n text: string;\n title?: string;\n dataTestId: string;\n children?: React.ReactNode;\n}\n\nconst Wrapper = styled('div')({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n});\n\nconst Content = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n display: 'inline-block',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n height: 'auto',\n whiteSpace: 'break-spaces',\n fontSize: theme.fontSize.sm,\n}));\n\nfunction CopyToClipBoard({ text, children, dataTestId, title, ...props }: Props) {\n const { t } = useTranslation();\n // without a title the icon button had no accessible name at all\n const accessibleName = title ?? t('copy-to-clipboard');\n return (\n <Wrapper {...props}>\n <Content>{children ?? text}</Content>\n {title ? (\n <Tooltip disableFocusListener={true} title={title}>\n <IconButton\n aria-label={accessibleName}\n data-testid={dataTestId}\n onClick={copyToClipBoardUtility(text)}\n size=\"small\"\n >\n <FileCopy fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n ) : (\n <IconButton\n aria-label={accessibleName}\n data-testid={dataTestId}\n onClick={copyToClipBoardUtility(text)}\n size=\"small\"\n >\n <FileCopy fontSize=\"small\" />\n </IconButton>\n )}\n </Wrapper>\n );\n}\n\nexport default CopyToClipBoard;\n"],"mappings":";;;;;;;;;;;;;;;AAiBA,IAAM,WAAA,GAAU,gBAAA,QAAA,CAAO,KAAK,CAAC,CAAC;CAC5B,SAAS;CACT,YAAY;CACZ,gBAAgB;AAClB,CAAC;AAED,IAAM,WAAA,GAAU,gBAAA,QAAA,CAAO,MAAM,CAAC,EAAqB,EAAE,aAAa;CAChE,SAAS;CACT,UAAU;CACV,cAAc;CACd,QAAQ;CACR,YAAY;CACZ,UAAU,MAAM,SAAS;AAC3B,EAAE;AAEF,SAAS,gBAAgB,EAAE,MAAM,UAAU,YAAY,OAAO,GAAG,SAAgB;CAC/E,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAE7B,MAAM,iBAAiB,SAAS,EAAE,mBAAmB;CACrD,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,SAAD;EAAS,GAAI;EAAb,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD,EAAA,UAAU,YAAY,KAAc,CAAA,GACnC,QACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,sBAAA,SAAD;GAAS,sBAAsB;GAAa;GAC1C,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,yBAAA,SAAD;IACE,cAAY;IACZ,eAAa;IACb,SAAS,cAAA,uBAAuB,IAAI;IACpC,MAAK;IAEL,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,6BAAA,SAAD,EAAU,UAAS,QAAS,CAAA;GAClB,CAAA;EACL,CAAA,IAET,iBAAA,GAAA,kBAAA,IAAA,CAAC,yBAAA,SAAD;GACE,cAAY;GACZ,eAAa;GACb,SAAS,cAAA,uBAAuB,IAAI;GACpC,MAAK;GAEL,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,6BAAA,SAAD,EAAU,UAAS,QAAS,CAAA;EAClB,CAAA,CAEP;;AAEb"}
|
|
@@ -4,6 +4,7 @@ import FileCopy from "@mui/icons-material/FileCopy";
|
|
|
4
4
|
import IconButton from "@mui/material/IconButton";
|
|
5
5
|
import Tooltip from "@mui/material/Tooltip";
|
|
6
6
|
import "react";
|
|
7
|
+
import { useTranslation } from "react-i18next";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
//#region src/components/CopyClipboard/CopyToClipBoard.tsx
|
|
9
10
|
var Wrapper = styled("div")({
|
|
@@ -20,18 +21,22 @@ var Content = styled("span")(({ theme }) => ({
|
|
|
20
21
|
fontSize: theme.fontSize.sm
|
|
21
22
|
}));
|
|
22
23
|
function CopyToClipBoard({ text, children, dataTestId, title, ...props }) {
|
|
24
|
+
const { t } = useTranslation();
|
|
25
|
+
const accessibleName = title ?? t("copy-to-clipboard");
|
|
23
26
|
return /* @__PURE__ */ jsxs(Wrapper, {
|
|
24
27
|
...props,
|
|
25
28
|
children: [/* @__PURE__ */ jsx(Content, { children: children ?? text }), title ? /* @__PURE__ */ jsx(Tooltip, {
|
|
26
29
|
disableFocusListener: true,
|
|
27
30
|
title,
|
|
28
31
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
32
|
+
"aria-label": accessibleName,
|
|
29
33
|
"data-testid": dataTestId,
|
|
30
34
|
onClick: copyToClipBoardUtility(text),
|
|
31
35
|
size: "small",
|
|
32
36
|
children: /* @__PURE__ */ jsx(FileCopy, { fontSize: "small" })
|
|
33
37
|
})
|
|
34
38
|
}) : /* @__PURE__ */ jsx(IconButton, {
|
|
39
|
+
"aria-label": accessibleName,
|
|
35
40
|
"data-testid": dataTestId,
|
|
36
41
|
onClick: copyToClipBoardUtility(text),
|
|
37
42
|
size: "small",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToClipBoard.mjs","names":[],"sources":["../../../src/components/CopyClipboard/CopyToClipBoard.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport FileCopy from '@mui/icons-material/FileCopy';\nimport IconButton from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\nimport React from 'react';\n\nimport type { Theme } from '../../Theme';\nimport { copyToClipBoardUtility } from './utils';\n\ninterface Props {\n text: string;\n title?: string;\n dataTestId: string;\n children?: React.ReactNode;\n}\n\nconst Wrapper = styled('div')({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n});\n\nconst Content = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n display: 'inline-block',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n height: 'auto',\n whiteSpace: 'break-spaces',\n fontSize: theme.fontSize.sm,\n}));\n\nfunction CopyToClipBoard({ text, children, dataTestId, title, ...props }: Props) {\n return (\n <Wrapper {...props}>\n <Content>{children ?? text}</Content>\n {title ? (\n <Tooltip disableFocusListener={true} title={title}>\n <IconButton
|
|
1
|
+
{"version":3,"file":"CopyToClipBoard.mjs","names":[],"sources":["../../../src/components/CopyClipboard/CopyToClipBoard.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport FileCopy from '@mui/icons-material/FileCopy';\nimport IconButton from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { copyToClipBoardUtility } from './utils';\n\ninterface Props {\n text: string;\n title?: string;\n dataTestId: string;\n children?: React.ReactNode;\n}\n\nconst Wrapper = styled('div')({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n});\n\nconst Content = styled('span')<{ theme?: Theme }>(({ theme }) => ({\n display: 'inline-block',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n height: 'auto',\n whiteSpace: 'break-spaces',\n fontSize: theme.fontSize.sm,\n}));\n\nfunction CopyToClipBoard({ text, children, dataTestId, title, ...props }: Props) {\n const { t } = useTranslation();\n // without a title the icon button had no accessible name at all\n const accessibleName = title ?? t('copy-to-clipboard');\n return (\n <Wrapper {...props}>\n <Content>{children ?? text}</Content>\n {title ? (\n <Tooltip disableFocusListener={true} title={title}>\n <IconButton\n aria-label={accessibleName}\n data-testid={dataTestId}\n onClick={copyToClipBoardUtility(text)}\n size=\"small\"\n >\n <FileCopy fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n ) : (\n <IconButton\n aria-label={accessibleName}\n data-testid={dataTestId}\n onClick={copyToClipBoardUtility(text)}\n size=\"small\"\n >\n <FileCopy fontSize=\"small\" />\n </IconButton>\n )}\n </Wrapper>\n );\n}\n\nexport default CopyToClipBoard;\n"],"mappings":";;;;;;;;;AAiBA,IAAM,UAAU,OAAO,KAAK,CAAC,CAAC;CAC5B,SAAS;CACT,YAAY;CACZ,gBAAgB;AAClB,CAAC;AAED,IAAM,UAAU,OAAO,MAAM,CAAC,EAAqB,EAAE,aAAa;CAChE,SAAS;CACT,UAAU;CACV,cAAc;CACd,QAAQ;CACR,YAAY;CACZ,UAAU,MAAM,SAAS;AAC3B,EAAE;AAEF,SAAS,gBAAgB,EAAE,MAAM,UAAU,YAAY,OAAO,GAAG,SAAgB;CAC/E,MAAM,EAAE,MAAM,eAAe;CAE7B,MAAM,iBAAiB,SAAS,EAAE,mBAAmB;CACrD,OACE,qBAAC,SAAD;EAAS,GAAI;EAAb,UAAA,CACE,oBAAC,SAAD,EAAA,UAAU,YAAY,KAAc,CAAA,GACnC,QACC,oBAAC,SAAD;GAAS,sBAAsB;GAAa;GAC1C,UAAA,oBAAC,YAAD;IACE,cAAY;IACZ,eAAa;IACb,SAAS,uBAAuB,IAAI;IACpC,MAAK;IAEL,UAAA,oBAAC,UAAD,EAAU,UAAS,QAAS,CAAA;GAClB,CAAA;EACL,CAAA,IAET,oBAAC,YAAD;GACE,cAAY;GACZ,eAAa;GACb,SAAS,uBAAuB,IAAI;GACpC,MAAK;GAEL,UAAA,oBAAC,UAAD,EAAU,UAAS,QAAS,CAAA;EAClB,CAAA,CAEP;;AAEb"}
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
//#region src/components/CopyClipboard/utils.ts
|
|
2
|
+
function execCommandCopy(str) {
|
|
3
|
+
if (!document.body) return;
|
|
4
|
+
const textarea = document.createElement("textarea");
|
|
5
|
+
textarea.value = str;
|
|
6
|
+
textarea.style.position = "fixed";
|
|
7
|
+
textarea.style.opacity = "0";
|
|
8
|
+
textarea.setAttribute("readonly", "");
|
|
9
|
+
document.body.appendChild(textarea);
|
|
10
|
+
textarea.select();
|
|
11
|
+
document.execCommand("copy");
|
|
12
|
+
document.body.removeChild(textarea);
|
|
13
|
+
}
|
|
2
14
|
var copyToClipBoardUtility = (str) => (event) => {
|
|
3
15
|
event.preventDefault();
|
|
4
|
-
navigator.clipboard.writeText(str);
|
|
16
|
+
if (navigator.clipboard?.writeText) navigator.clipboard.writeText(str).catch(() => execCommandCopy(str));
|
|
17
|
+
else execCommandCopy(str);
|
|
5
18
|
};
|
|
6
19
|
//#endregion
|
|
7
20
|
exports.copyToClipBoardUtility = copyToClipBoardUtility;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/CopyClipboard/utils.ts"],"sourcesContent":["import type { SyntheticEvent } from 'react';\n\nexport const copyToClipBoardUtility =\n (str: string): ((e: SyntheticEvent<HTMLElement>) => void) =>\n (event: SyntheticEvent<HTMLElement>): void => {\n event.preventDefault();\n\n
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/CopyClipboard/utils.ts"],"sourcesContent":["import type { SyntheticEvent } from 'react';\n\n// clipboard-api-free fallback: outside a secure context (plain-http deployments,\n// very common for LAN registries) `navigator.clipboard` is undefined. The\n// hidden-textarea approach needs no Selection/Range juggling — and\n// window.getSelection() can legitimately return null.\nfunction execCommandCopy(str: string): void {\n if (!document.body) {\n return;\n }\n const textarea = document.createElement('textarea');\n textarea.value = str;\n // keep it out of sight without display:none (which would prevent selection)\n textarea.style.position = 'fixed';\n textarea.style.opacity = '0';\n textarea.setAttribute('readonly', '');\n document.body.appendChild(textarea);\n textarea.select();\n document.execCommand('copy');\n document.body.removeChild(textarea);\n}\n\nexport const copyToClipBoardUtility =\n (str: string): ((e: SyntheticEvent<HTMLElement>) => void) =>\n (event: SyntheticEvent<HTMLElement>): void => {\n event.preventDefault();\n\n if (navigator.clipboard?.writeText) {\n navigator.clipboard.writeText(str).catch(() => execCommandCopy(str));\n } else {\n execCommandCopy(str);\n }\n };\n"],"mappings":";AAMA,SAAS,gBAAgB,KAAmB;CAC1C,IAAI,CAAC,SAAS,MACZ;CAEF,MAAM,WAAW,SAAS,cAAc,UAAU;CAClD,SAAS,QAAQ;CAEjB,SAAS,MAAM,WAAW;CAC1B,SAAS,MAAM,UAAU;CACzB,SAAS,aAAa,YAAY,EAAE;CACpC,SAAS,KAAK,YAAY,QAAQ;CAClC,SAAS,OAAO;CAChB,SAAS,YAAY,MAAM;CAC3B,SAAS,KAAK,YAAY,QAAQ;AACpC;AAEA,IAAa,0BACV,SACA,UAA6C;CAC5C,MAAM,eAAe;CAErB,IAAI,UAAU,WAAW,WACvB,UAAU,UAAU,UAAU,GAAG,CAAC,CAAC,YAAY,gBAAgB,GAAG,CAAC;MAEnE,gBAAgB,GAAG;AAEvB"}
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
//#region src/components/CopyClipboard/utils.ts
|
|
2
|
+
function execCommandCopy(str) {
|
|
3
|
+
if (!document.body) return;
|
|
4
|
+
const textarea = document.createElement("textarea");
|
|
5
|
+
textarea.value = str;
|
|
6
|
+
textarea.style.position = "fixed";
|
|
7
|
+
textarea.style.opacity = "0";
|
|
8
|
+
textarea.setAttribute("readonly", "");
|
|
9
|
+
document.body.appendChild(textarea);
|
|
10
|
+
textarea.select();
|
|
11
|
+
document.execCommand("copy");
|
|
12
|
+
document.body.removeChild(textarea);
|
|
13
|
+
}
|
|
2
14
|
var copyToClipBoardUtility = (str) => (event) => {
|
|
3
15
|
event.preventDefault();
|
|
4
|
-
navigator.clipboard.writeText(str);
|
|
16
|
+
if (navigator.clipboard?.writeText) navigator.clipboard.writeText(str).catch(() => execCommandCopy(str));
|
|
17
|
+
else execCommandCopy(str);
|
|
5
18
|
};
|
|
6
19
|
//#endregion
|
|
7
20
|
export { copyToClipBoardUtility };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","names":[],"sources":["../../../src/components/CopyClipboard/utils.ts"],"sourcesContent":["import type { SyntheticEvent } from 'react';\n\nexport const copyToClipBoardUtility =\n (str: string): ((e: SyntheticEvent<HTMLElement>) => void) =>\n (event: SyntheticEvent<HTMLElement>): void => {\n event.preventDefault();\n\n
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":[],"sources":["../../../src/components/CopyClipboard/utils.ts"],"sourcesContent":["import type { SyntheticEvent } from 'react';\n\n// clipboard-api-free fallback: outside a secure context (plain-http deployments,\n// very common for LAN registries) `navigator.clipboard` is undefined. The\n// hidden-textarea approach needs no Selection/Range juggling — and\n// window.getSelection() can legitimately return null.\nfunction execCommandCopy(str: string): void {\n if (!document.body) {\n return;\n }\n const textarea = document.createElement('textarea');\n textarea.value = str;\n // keep it out of sight without display:none (which would prevent selection)\n textarea.style.position = 'fixed';\n textarea.style.opacity = '0';\n textarea.setAttribute('readonly', '');\n document.body.appendChild(textarea);\n textarea.select();\n document.execCommand('copy');\n document.body.removeChild(textarea);\n}\n\nexport const copyToClipBoardUtility =\n (str: string): ((e: SyntheticEvent<HTMLElement>) => void) =>\n (event: SyntheticEvent<HTMLElement>): void => {\n event.preventDefault();\n\n if (navigator.clipboard?.writeText) {\n navigator.clipboard.writeText(str).catch(() => execCommandCopy(str));\n } else {\n execCommandCopy(str);\n }\n };\n"],"mappings":";AAMA,SAAS,gBAAgB,KAAmB;CAC1C,IAAI,CAAC,SAAS,MACZ;CAEF,MAAM,WAAW,SAAS,cAAc,UAAU;CAClD,SAAS,QAAQ;CAEjB,SAAS,MAAM,WAAW;CAC1B,SAAS,MAAM,UAAU;CACzB,SAAS,aAAa,YAAY,EAAE;CACpC,SAAS,KAAK,YAAY,QAAQ;CAClC,SAAS,OAAO;CAChB,SAAS,YAAY,MAAM;CAC3B,SAAS,KAAK,YAAY,QAAQ;AACpC;AAEA,IAAa,0BACV,SACA,UAA6C;CAC5C,MAAM,eAAe;CAErB,IAAI,UAAU,WAAW,WACvB,UAAU,UAAU,UAAU,GAAG,CAAC,CAAC,YAAY,gBAAgB,GAAG,CAAC;MAEnE,gBAAgB,GAAG;AAEvB"}
|
|
@@ -5,10 +5,10 @@ const require_DependencyBlock = require("./DependencyBlock.js");
|
|
|
5
5
|
const require_utits = require("./utits.js");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
react = require_runtime.__toESM(react);
|
|
8
|
+
let react_i18next = require("react-i18next");
|
|
8
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
10
|
let _mui_material_Box = require("@mui/material/Box");
|
|
10
11
|
_mui_material_Box = require_runtime.__toESM(_mui_material_Box);
|
|
11
|
-
let react_i18next = require("react-i18next");
|
|
12
12
|
let _mui_material_Card = require("@mui/material/Card");
|
|
13
13
|
_mui_material_Card = require_runtime.__toESM(_mui_material_Card);
|
|
14
14
|
let _mui_material_CardContent = require("@mui/material/CardContent");
|
|
@@ -16,6 +16,7 @@ _mui_material_CardContent = require_runtime.__toESM(_mui_material_CardContent);
|
|
|
16
16
|
//#region src/components/Dependencies/Dependencies.tsx
|
|
17
17
|
var Dependencies = ({ packageMeta }) => {
|
|
18
18
|
const { t } = (0, react_i18next.useTranslation)();
|
|
19
|
+
if (!packageMeta?.latest) return null;
|
|
19
20
|
const { latest } = packageMeta;
|
|
20
21
|
const { dependencies, devDependencies, peerDependencies, optionalDependencies, bundleDependencies, name } = latest;
|
|
21
22
|
const dependencyMap = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dependencies.js","names":[],"sources":["../../../src/components/Dependencies/Dependencies.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport Card from '@mui/material/Card';\nimport CardContent from '@mui/material/CardContent';\nimport React, { Fragment } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport NoItems from '../NoItems';\nimport { DependencyBlock } from './DependencyBlock';\nimport { hasKeys } from './utits';\n\nconst Dependencies: React.FC<{ packageMeta: any }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n\n const { latest } = packageMeta;\n // FIXME: add dependencies to package meta type\n // @ts-ignore\n const {\n dependencies,\n devDependencies,\n peerDependencies,\n optionalDependencies,\n bundleDependencies,\n name,\n } = latest;\n const dependencyMap = {\n dependencies,\n devDependencies,\n peerDependencies,\n optionalDependencies,\n bundleDependencies,\n };\n const hasDependencies =\n hasKeys(dependencies) ||\n hasKeys(bundleDependencies) ||\n hasKeys(optionalDependencies) ||\n hasKeys(devDependencies) ||\n hasKeys(peerDependencies);\n if (hasDependencies) {\n return (\n <Card sx={{ mb: 2 }}>\n <CardContent>\n <Box data-testid=\"dependencies-box\" sx={{ m: 2 }}>\n {Object.entries(dependencyMap).map(([dependencyType, dependencies]) => {\n if (!dependencies || Object.keys(dependencies).length === 0) {\n return null;\n }\n return (\n <Fragment key={dependencyType}>\n <DependencyBlock\n dependencies={dependencies}\n key={dependencyType}\n title={dependencyType}\n />\n </Fragment>\n );\n })}\n </Box>\n </CardContent>\n </Card>\n );\n }\n\n return (\n <Card sx={{ mb: 2 }}>\n <CardContent>\n <NoItems text={t('dependencies.has-no-dependencies', { package: name })} />\n </CardContent>\n </Card>\n );\n};\n\nexport default Dependencies;\n"],"mappings":";;;;;;;;;;;;;;;;AAUA,IAAM,gBAAgD,EAAE,kBAAkB;CACxE,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAE7B,MAAM,EAAE,WAAW;CAGnB,MAAM,EACJ,cACA,iBACA,kBACA,sBACA,oBACA,SACE;CACJ,MAAM,gBAAgB;EACpB;EACA;EACA;EACA;EACA;CACF;CAOA,IALE,cAAA,QAAQ,YAAY,KACpB,cAAA,QAAQ,kBAAkB,KAC1B,cAAA,QAAQ,oBAAoB,KAC5B,cAAA,QAAQ,eAAe,KACvB,cAAA,QAAQ,gBAAgB,GAExB,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,mBAAA,SAAD;EAAM,IAAI,EAAE,IAAI,EAAE;EAChB,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAA,SAAD;GAAK,eAAY;GAAmB,IAAI,EAAE,GAAG,EAAE;GAC5C,UAAA,OAAO,QAAQ,aAAa,CAAC,CAAC,KAAK,CAAC,gBAAgB,kBAAkB;IACrE,IAAI,CAAC,gBAAgB,OAAO,KAAK,YAAY,CAAC,CAAC,WAAW,GACxD,OAAO;IAET,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAA,UAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,wBAAA,iBAAD;KACgB;KAEd,OAAO;IACR,GAFM,cAEN,EACO,GANK,cAML;GAEd,CAAC;EACE,CAAA,EACM,CAAA;CACT,CAAA;CAIV,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,mBAAA,SAAD;EAAM,IAAI,EAAE,IAAI,EAAE;EAChB,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAA,SAAD,EAAS,MAAM,EAAE,oCAAoC,EAAE,SAAS,KAAK,CAAC,EAAI,CAAA,EAC/D,CAAA;CACT,CAAA;AAEV"}
|
|
1
|
+
{"version":3,"file":"Dependencies.js","names":[],"sources":["../../../src/components/Dependencies/Dependencies.tsx"],"sourcesContent":["import Box from '@mui/material/Box';\nimport Card from '@mui/material/Card';\nimport CardContent from '@mui/material/CardContent';\nimport React, { Fragment } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport NoItems from '../NoItems';\nimport { DependencyBlock } from './DependencyBlock';\nimport { hasKeys } from './utits';\n\nconst Dependencies: React.FC<{ packageMeta: any }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n\n if (!packageMeta?.latest) {\n return null;\n }\n\n const { latest } = packageMeta;\n // FIXME: add dependencies to package meta type\n // @ts-ignore\n const {\n dependencies,\n devDependencies,\n peerDependencies,\n optionalDependencies,\n bundleDependencies,\n name,\n } = latest;\n const dependencyMap = {\n dependencies,\n devDependencies,\n peerDependencies,\n optionalDependencies,\n bundleDependencies,\n };\n const hasDependencies =\n hasKeys(dependencies) ||\n hasKeys(bundleDependencies) ||\n hasKeys(optionalDependencies) ||\n hasKeys(devDependencies) ||\n hasKeys(peerDependencies);\n if (hasDependencies) {\n return (\n <Card sx={{ mb: 2 }}>\n <CardContent>\n <Box data-testid=\"dependencies-box\" sx={{ m: 2 }}>\n {Object.entries(dependencyMap).map(([dependencyType, dependencies]) => {\n if (!dependencies || Object.keys(dependencies).length === 0) {\n return null;\n }\n return (\n <Fragment key={dependencyType}>\n <DependencyBlock\n dependencies={dependencies}\n key={dependencyType}\n title={dependencyType}\n />\n </Fragment>\n );\n })}\n </Box>\n </CardContent>\n </Card>\n );\n }\n\n return (\n <Card sx={{ mb: 2 }}>\n <CardContent>\n <NoItems text={t('dependencies.has-no-dependencies', { package: name })} />\n </CardContent>\n </Card>\n );\n};\n\nexport default Dependencies;\n"],"mappings":";;;;;;;;;;;;;;;;AAUA,IAAM,gBAAgD,EAAE,kBAAkB;CACxE,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAE7B,IAAI,CAAC,aAAa,QAChB,OAAO;CAGT,MAAM,EAAE,WAAW;CAGnB,MAAM,EACJ,cACA,iBACA,kBACA,sBACA,oBACA,SACE;CACJ,MAAM,gBAAgB;EACpB;EACA;EACA;EACA;EACA;CACF;CAOA,IALE,cAAA,QAAQ,YAAY,KACpB,cAAA,QAAQ,kBAAkB,KAC1B,cAAA,QAAQ,oBAAoB,KAC5B,cAAA,QAAQ,eAAe,KACvB,cAAA,QAAQ,gBAAgB,GAExB,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,mBAAA,SAAD;EAAM,IAAI,EAAE,IAAI,EAAE;EAChB,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAA,SAAD;GAAK,eAAY;GAAmB,IAAI,EAAE,GAAG,EAAE;GAC5C,UAAA,OAAO,QAAQ,aAAa,CAAC,CAAC,KAAK,CAAC,gBAAgB,kBAAkB;IACrE,IAAI,CAAC,gBAAgB,OAAO,KAAK,YAAY,CAAC,CAAC,WAAW,GACxD,OAAO;IAET,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAA,UAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,wBAAA,iBAAD;KACgB;KAEd,OAAO;IACR,GAFM,cAEN,EACO,GANK,cAML;GAEd,CAAC;EACE,CAAA,EACM,CAAA;CACT,CAAA;CAIV,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,mBAAA,SAAD;EAAM,IAAI,EAAE,IAAI,EAAE;EAChB,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAA,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAA,SAAD,EAAS,MAAM,EAAE,oCAAoC,EAAE,SAAS,KAAK,CAAC,EAAI,CAAA,EAC/D,CAAA;CACT,CAAA;AAEV"}
|
|
@@ -3,14 +3,15 @@ import "../NoItems/index.mjs";
|
|
|
3
3
|
import { DependencyBlock } from "./DependencyBlock.mjs";
|
|
4
4
|
import { hasKeys } from "./utits.mjs";
|
|
5
5
|
import { Fragment } from "react";
|
|
6
|
+
import { useTranslation } from "react-i18next";
|
|
6
7
|
import { jsx } from "react/jsx-runtime";
|
|
7
8
|
import Box from "@mui/material/Box";
|
|
8
|
-
import { useTranslation } from "react-i18next";
|
|
9
9
|
import Card from "@mui/material/Card";
|
|
10
10
|
import CardContent from "@mui/material/CardContent";
|
|
11
11
|
//#region src/components/Dependencies/Dependencies.tsx
|
|
12
12
|
var Dependencies = ({ packageMeta }) => {
|
|
13
13
|
const { t } = useTranslation();
|
|
14
|
+
if (!packageMeta?.latest) return null;
|
|
14
15
|
const { latest } = packageMeta;
|
|
15
16
|
const { dependencies, devDependencies, peerDependencies, optionalDependencies, bundleDependencies, name } = latest;
|
|
16
17
|
const dependencyMap = {
|