@verdaccio/ui-components 5.0.0-next-9.16 → 5.0.0-next-9.18
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/Theme/ThemeProvider.js.map +1 -1
- package/build/Theme/ThemeProvider.mjs.map +1 -1
- package/build/Theme/theme.js.map +1 -1
- package/build/_virtual/_rolldown/runtime.js +1 -1
- package/build/api/use-data-mutation.js +2 -1
- package/build/api/use-data-mutation.js.map +1 -1
- package/build/api/use-data-mutation.mjs +2 -1
- package/build/api/use-data-mutation.mjs.map +1 -1
- package/build/api/use-data.js.map +1 -1
- package/build/components/ActionBar/ActionBar.js.map +1 -1
- package/build/components/ActionBar/ActionBar.mjs.map +1 -1
- package/build/components/ActionBar/ActionBarAction.js +0 -1
- package/build/components/ActionBar/ActionBarAction.js.map +1 -1
- package/build/components/ActionBar/ActionBarAction.mjs +0 -1
- package/build/components/ActionBar/ActionBarAction.mjs.map +1 -1
- package/build/components/AppRoute/AppRoute.js.map +1 -1
- package/build/components/AppRoute/AppRoute.mjs.map +1 -1
- package/build/components/Author/Author.js.map +1 -1
- package/build/components/Author/Author.mjs.map +1 -1
- package/build/components/Author/styles.js.map +1 -1
- package/build/components/CopyClipboard/CopyToClipBoard.js.map +1 -1
- package/build/components/CopyClipboard/CopyToClipBoard.mjs.map +1 -1
- package/build/components/Dependencies/Dependencies.js.map +1 -1
- package/build/components/Dependencies/Dependencies.mjs.map +1 -1
- package/build/components/Dependencies/DependencyBlock.js.map +1 -1
- package/build/components/Dependencies/DependencyBlock.mjs.map +1 -1
- package/build/components/Deprecated/Deprecated.js.map +1 -1
- package/build/components/Deprecated/Deprecated.mjs.map +1 -1
- package/build/components/Developers/Developers.js.map +1 -1
- package/build/components/Developers/Developers.mjs.map +1 -1
- package/build/components/Developers/Title.js.map +1 -1
- package/build/components/Developers/Title.mjs.map +1 -1
- package/build/components/Distribution/Dist.js.map +1 -1
- package/build/components/Distribution/Dist.mjs.map +1 -1
- package/build/components/Distribution/styles.js.map +1 -1
- package/build/components/Engines/Engines.js.map +1 -1
- package/build/components/Engines/Engines.mjs.map +1 -1
- package/build/components/Engines/styles.js.map +1 -1
- package/build/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/build/components/ErrorBoundary/ErrorBoundary.mjs.map +1 -1
- package/build/components/Forbidden/Forbidden.js.map +1 -1
- package/build/components/Forbidden/Forbidden.mjs.map +1 -1
- package/build/components/FundButton/FundButton.js.map +1 -1
- package/build/components/FundButton/FundButton.mjs.map +1 -1
- package/build/components/HeaderInfoDialog/HeaderInfoDialog.js.map +1 -1
- package/build/components/HeaderInfoDialog/HeaderInfoDialog.mjs.map +1 -1
- package/build/components/Help/Help.js.map +1 -1
- package/build/components/Help/Help.mjs.map +1 -1
- package/build/components/Help/styles.js.map +1 -1
- package/build/components/Icons/Earth.js.map +1 -1
- package/build/components/Icons/Earth.mjs.map +1 -1
- package/build/components/Icons/FileBinary.js.map +1 -1
- package/build/components/Icons/FileBinary.mjs.map +1 -1
- package/build/components/Icons/Law.js.map +1 -1
- package/build/components/Icons/Law.mjs.map +1 -1
- package/build/components/Icons/License.js.map +1 -1
- package/build/components/Icons/License.mjs.map +1 -1
- package/build/components/Icons/SvgIcon.js.map +1 -1
- package/build/components/Icons/Time.js.map +1 -1
- package/build/components/Icons/Time.mjs.map +1 -1
- package/build/components/Icons/Version.js.map +1 -1
- package/build/components/Icons/Version.mjs.map +1 -1
- package/build/components/Install/Install.js.map +1 -1
- package/build/components/Install/Install.mjs.map +1 -1
- package/build/components/Install/InstallListItem.js.map +1 -1
- package/build/components/Install/InstallListItem.mjs.map +1 -1
- package/build/components/Keywords/KeywordListItems.js.map +1 -1
- package/build/components/Keywords/KeywordListItems.mjs.map +1 -1
- package/build/components/Keywords/Keywords.js.map +1 -1
- package/build/components/Keywords/Keywords.mjs.map +1 -1
- package/build/components/Label/Label.js.map +1 -1
- package/build/components/Label/Label.mjs.map +1 -1
- package/build/components/Link/Link.js.map +1 -1
- package/build/components/Link/Link.mjs.map +1 -1
- package/build/components/Loading/Loading.js.map +1 -1
- package/build/components/Loading/Loading.mjs.map +1 -1
- package/build/components/Loading/Spinner/Spinner.js.map +1 -1
- package/build/components/Loading/Spinner/Spinner.mjs.map +1 -1
- package/build/components/Loading/styles.js.map +1 -1
- package/build/components/LoginDialog/LoginDialog.js.map +1 -1
- package/build/components/LoginDialog/LoginDialog.mjs.map +1 -1
- package/build/components/LoginDialog/LoginDialogCloseButton.js.map +1 -1
- package/build/components/LoginDialog/LoginDialogCloseButton.mjs.map +1 -1
- package/build/components/LoginDialog/LoginDialogFormError.js.map +1 -1
- package/build/components/LoginDialog/LoginDialogFormError.mjs.map +1 -1
- package/build/components/LoginForm/Login.js.map +1 -1
- package/build/components/LoginForm/Login.mjs.map +1 -1
- package/build/components/LoginForm/PasswordField.js.map +1 -1
- package/build/components/LoginForm/UsernameField.js.map +1 -1
- package/build/components/LoginForm/styles.js.map +1 -1
- package/build/components/LoginForm/styles.mjs.map +1 -1
- package/build/components/LoginForm/useLoginForm.js.map +1 -1
- package/build/components/Logo/Logo.js.map +1 -1
- package/build/components/Logo/Logo.mjs +13 -10
- package/build/components/Logo/Logo.mjs.map +1 -1
- package/build/components/MenuItem/MenuItem.js.map +1 -1
- package/build/components/NoItems/NoItems.js.map +1 -1
- package/build/components/NoItems/NoItems.mjs.map +1 -1
- package/build/components/NotFound/NotFound.js.map +1 -1
- package/build/components/NotFound/NotFound.mjs.map +1 -1
- package/build/components/Package/Package.js.map +1 -1
- package/build/components/Package/Package.mjs.map +1 -1
- package/build/components/Package/styles.js.map +1 -1
- package/build/components/PackageList/PackageList.js.map +1 -1
- package/build/components/PackageList/PackageList.mjs.map +1 -1
- package/build/components/Person/Person.js.map +1 -1
- package/build/components/Person/Person.mjs.map +1 -1
- package/build/components/Person/PersonTooltip.js.map +1 -1
- package/build/components/Person/PersonTooltip.mjs.map +1 -1
- package/build/components/RawViewer/RawViewer.js.map +1 -1
- package/build/components/RawViewer/RawViewer.mjs.map +1 -1
- package/build/components/Readme/Readme.js.map +1 -1
- package/build/components/Readme/Readme.mjs.map +1 -1
- package/build/components/Readme/github-markdown.css +64 -64
- package/build/components/Readme/utils.js.map +1 -1
- package/build/components/RegistryInfoDialog/RegistryInfoDialog.js.map +1 -1
- package/build/components/RegistryInfoDialog/RegistryInfoDialog.mjs.map +1 -1
- package/build/components/RegistryInfoDialog/styles.js.map +1 -1
- package/build/components/Repository/Repository.js.map +1 -1
- package/build/components/Repository/Repository.mjs.map +1 -1
- package/build/components/Search/AutoComplete/AutoComplete.js.map +1 -1
- package/build/components/Search/AutoComplete/styles.js.map +1 -1
- package/build/components/Search/Search.js.map +1 -1
- package/build/components/Search/Search.mjs.map +1 -1
- package/build/components/Search/SearchItem.js.map +1 -1
- package/build/components/Search/SearchItem.mjs.map +1 -1
- package/build/components/Search/styles.js.map +1 -1
- package/build/components/SettingsMenu/SettingsMenu.js.map +1 -1
- package/build/components/SettingsMenu/SettingsMenu.mjs.map +1 -1
- package/build/components/SideBarTitle/SideBarTitle.js.map +1 -1
- package/build/components/SideBarTitle/SideBarTitle.mjs.map +1 -1
- package/build/components/SideBarTitle/utils.js.map +1 -1
- package/build/components/UpLinks/UpLinks.js.map +1 -1
- package/build/components/UpLinks/UpLinks.mjs.map +1 -1
- package/build/components/UpLinks/UplinkLink.js.map +1 -1
- package/build/components/UpLinks/UplinkLink.mjs.map +1 -1
- package/build/components/UpLinks/styles.js.map +1 -1
- package/build/components/Versions/HistoryList.js.map +1 -1
- package/build/components/Versions/HistoryList.mjs.map +1 -1
- package/build/components/Versions/TagList.js.map +1 -1
- package/build/components/Versions/TagList.mjs.map +1 -1
- package/build/components/Versions/Versions.js.map +1 -1
- package/build/components/Versions/Versions.mjs.map +1 -1
- package/build/components/Versions/styles.js.map +1 -1
- package/build/hooks/useLocalStorage.js.map +1 -1
- package/build/layouts/Security/Dialog.js.map +1 -1
- package/build/layouts/Version/Version.js.map +1 -1
- package/build/layouts/Version/Version.mjs.map +1 -1
- package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js.map +1 -1
- package/build/providers/AuthProvider/AuthProvider.js +2 -1
- package/build/providers/AuthProvider/AuthProvider.js.map +1 -1
- package/build/providers/AuthProvider/AuthProvider.mjs +2 -1
- package/build/providers/AuthProvider/AuthProvider.mjs.map +1 -1
- package/build/providers/DownloadProvider/DownloadProvider.js +2 -1
- package/build/providers/DownloadProvider/DownloadProvider.js.map +1 -1
- package/build/providers/DownloadProvider/DownloadProvider.mjs +2 -1
- package/build/providers/DownloadProvider/DownloadProvider.mjs.map +1 -1
- package/build/providers/ManifestsProvider/ManifestsProvider.js +2 -1
- package/build/providers/ManifestsProvider/ManifestsProvider.js.map +1 -1
- package/build/providers/ManifestsProvider/ManifestsProvider.mjs +2 -1
- package/build/providers/ManifestsProvider/ManifestsProvider.mjs.map +1 -1
- package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js.map +1 -1
- package/build/providers/SearchProvider/SearchProvider.js +2 -1
- package/build/providers/SearchProvider/SearchProvider.js.map +1 -1
- package/build/providers/SearchProvider/SearchProvider.mjs +2 -1
- package/build/providers/SearchProvider/SearchProvider.mjs.map +1 -1
- package/build/providers/TranslatorProvider/TranslatorProvider.js.map +1 -1
- package/build/providers/TranslatorProvider/TranslatorProvider.mjs.map +1 -1
- package/build/providers/VersionProvider/VersionProvider.js +2 -1
- package/build/providers/VersionProvider/VersionProvider.js.map +1 -1
- package/build/providers/VersionProvider/VersionProvider.mjs +2 -1
- package/build/providers/VersionProvider/VersionProvider.mjs.map +1 -1
- package/build/sections/Detail/Detail.js.map +1 -1
- package/build/sections/Detail/Detail.mjs.map +1 -1
- package/build/sections/Detail/Tabs.js.map +1 -1
- package/build/sections/Detail/Tabs.mjs.map +1 -1
- package/build/sections/Footer/Footer.js.map +1 -1
- package/build/sections/Footer/Footer.mjs.map +1 -1
- package/build/sections/Footer/styles.js.map +1 -1
- package/build/sections/Header/Header.js +6 -2
- package/build/sections/Header/Header.js.map +1 -1
- package/build/sections/Header/Header.mjs +6 -2
- package/build/sections/Header/Header.mjs.map +1 -1
- package/build/sections/Header/HeaderGreetings.js.map +1 -1
- package/build/sections/Header/HeaderLeft.js.map +1 -1
- package/build/sections/Header/HeaderLeft.mjs.map +1 -1
- package/build/sections/Header/HeaderMenu.js.map +1 -1
- package/build/sections/Header/HeaderMenu.mjs.map +1 -1
- package/build/sections/Header/HeaderRight.js.map +1 -1
- package/build/sections/Header/HeaderRight.mjs.map +1 -1
- package/build/sections/Header/HeaderSettingsDialog.js.map +1 -1
- package/build/sections/Header/HeaderSettingsDialog.mjs.map +1 -1
- package/build/sections/Header/HeaderToolTipIcon.js.map +1 -1
- package/build/sections/Header/HeaderToolTipIcon.mjs.map +1 -1
- package/build/sections/Header/LanguageSwitch.js.map +1 -1
- package/build/sections/Header/LanguageSwitch.mjs.map +1 -1
- package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js.map +1 -1
- package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.mjs.map +1 -1
- package/build/sections/Header/RegistryInfoContent/styles.js.map +1 -1
- package/build/sections/Header/styles.js.map +1 -1
- package/build/sections/Home/Home.js.map +1 -1
- package/build/sections/Home/Home.mjs.map +1 -1
- package/build/sections/Security/AddUser.js +2 -1
- package/build/sections/Security/AddUser.js.map +1 -1
- package/build/sections/Security/AddUser.mjs +2 -1
- package/build/sections/Security/AddUser.mjs.map +1 -1
- package/build/sections/Security/ChangePassword.js.map +1 -1
- package/build/sections/Security/ChangePassword.mjs.map +1 -1
- package/build/sections/Security/Login.js +2 -2
- package/build/sections/Security/Login.js.map +1 -1
- package/build/sections/Security/Login.mjs +2 -2
- package/build/sections/Security/Login.mjs.map +1 -1
- package/build/sections/Security/Success.js.map +1 -1
- package/build/sections/Security/Success.mjs.map +1 -1
- package/build/sections/Security/styles.js.map +1 -1
- package/build/sections/SideBar/Sidebar.js.map +1 -1
- package/build/sections/SideBar/Sidebar.mjs.map +1 -1
- package/build/ui-components.css +64 -64
- package/build/utils/loadable.js.map +1 -1
- package/build/utils/loadable.mjs.map +1 -1
- package/build/utils/token.js.map +1 -1
- package/build/utils/url.js.map +1 -1
- package/build/utils/utils.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","names":[],"sources":["../../src/Theme/ThemeProvider.tsx"],"sourcesContent":["import { ThemeProvider as MUIThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport React, { createContext, useContext } from 'react';\n\nimport useLocalStorage from '../hooks/useLocalStorage';\nimport { useConfig } from '../providers/AppConfigurationProvider';\nimport type { ThemeMode } from './modes';\nimport { getTheme } from './theme';\n\ninterface Props {\n isDarkMode: boolean;\n setIsDarkMode: (isDarkMode: boolean) => void;\n}\n\nconst ThemeContext = createContext<undefined | Props>(undefined);\n\nfunction getDarkModeDefault(darkModeConfig?: boolean) {\n const prefersDarkMode = window.matchMedia?.('(prefers-color-scheme:dark)').matches;\n if (typeof darkModeConfig === 'boolean') {\n return darkModeConfig;\n } else {\n return prefersDarkMode;\n }\n}\n\nconst ThemeProvider: React.FC<{ children: any }> = ({ children }) => {\n const { configOptions } = useConfig();\n const isDarkModeDefault = getDarkModeDefault(configOptions.darkMode);\n const isSwitchThemeEnabled = configOptions.showThemeSwitch;\n const [isDarkModeStorage, setIsDarkMode] = useLocalStorage('darkMode', isDarkModeDefault);\n const isDarkMode = isSwitchThemeEnabled === true ? isDarkModeStorage : isDarkModeDefault;\n const themeMode: ThemeMode = isDarkMode ? 'dark' : 'light';\n\n const currentTheme = getTheme(themeMode, configOptions.primaryColor);\n\n return (\n <ThemeContext.Provider value={{ isDarkMode, setIsDarkMode }}>\n <StyledEngineProvider injectFirst={true}>\n <MUIThemeProvider theme={currentTheme}>{children}</MUIThemeProvider>\n </StyledEngineProvider>\n </ThemeContext.Provider>\n );\n};\n\nexport const useCustomTheme = () => useContext(ThemeContext);\n\nexport { ThemeProvider };\n"],"mappings":";;;;;;;;;;AAaA,IAAM,gBAAA,
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","names":[],"sources":["../../src/Theme/ThemeProvider.tsx"],"sourcesContent":["import { ThemeProvider as MUIThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport React, { createContext, useContext } from 'react';\n\nimport useLocalStorage from '../hooks/useLocalStorage';\nimport { useConfig } from '../providers/AppConfigurationProvider';\nimport type { ThemeMode } from './modes';\nimport { getTheme } from './theme';\n\ninterface Props {\n isDarkMode: boolean;\n setIsDarkMode: (isDarkMode: boolean) => void;\n}\n\nconst ThemeContext = createContext<undefined | Props>(undefined);\n\nfunction getDarkModeDefault(darkModeConfig?: boolean) {\n const prefersDarkMode = window.matchMedia?.('(prefers-color-scheme:dark)').matches;\n if (typeof darkModeConfig === 'boolean') {\n return darkModeConfig;\n } else {\n return prefersDarkMode;\n }\n}\n\nconst ThemeProvider: React.FC<{ children: any }> = ({ children }) => {\n const { configOptions } = useConfig();\n const isDarkModeDefault = getDarkModeDefault(configOptions.darkMode);\n const isSwitchThemeEnabled = configOptions.showThemeSwitch;\n const [isDarkModeStorage, setIsDarkMode] = useLocalStorage('darkMode', isDarkModeDefault);\n const isDarkMode = isSwitchThemeEnabled === true ? isDarkModeStorage : isDarkModeDefault;\n const themeMode: ThemeMode = isDarkMode ? 'dark' : 'light';\n\n const currentTheme = getTheme(themeMode, configOptions.primaryColor);\n\n return (\n <ThemeContext.Provider value={{ isDarkMode, setIsDarkMode }}>\n <StyledEngineProvider injectFirst={true}>\n <MUIThemeProvider theme={currentTheme}>{children}</MUIThemeProvider>\n </StyledEngineProvider>\n </ThemeContext.Provider>\n );\n};\n\nexport const useCustomTheme = () => useContext(ThemeContext);\n\nexport { ThemeProvider };\n"],"mappings":";;;;;;;;;;AAaA,IAAM,gBAAA,GAAe,MAAA,cAAA,CAAiC,KAAA,CAAS;AAE/D,SAAS,mBAAmB,gBAA0B;CACpD,MAAM,kBAAkB,OAAO,aAAa,6BAA6B,CAAC,CAAC;CAC3E,IAAI,OAAO,mBAAmB,WAC5B,OAAO;MAEP,OAAO;AAEX;AAEA,IAAM,iBAA8C,EAAE,eAAe;CACnE,MAAM,EAAE,kBAAkB,iCAAA,UAAU;CACpC,MAAM,oBAAoB,mBAAmB,cAAc,QAAQ;CACnE,MAAM,uBAAuB,cAAc;CAC3C,MAAM,CAAC,mBAAmB,iBAAiB,wBAAA,QAAgB,YAAY,iBAAiB;CACxF,MAAM,aAAa,yBAAyB,OAAO,oBAAoB;CAGvE,MAAM,eAAe,cAAA,SAFQ,aAAa,SAAS,SAEV,cAAc,YAAY;CAEnE,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAa,UAAd;EAAuB,OAAO;GAAE;GAAY;EAAc;EACxD,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAA,sBAAD;GAAsB,aAAa;GACjC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAA,eAAD;IAAkB,OAAO;IAAe;GAA2B,CAAA;EAC/C,CAAA;CACD,CAAA;AAE3B;AAEA,IAAa,wBAAA,GAAuB,MAAA,WAAA,CAAW,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.mjs","names":[],"sources":["../../src/Theme/ThemeProvider.tsx"],"sourcesContent":["import { ThemeProvider as MUIThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport React, { createContext, useContext } from 'react';\n\nimport useLocalStorage from '../hooks/useLocalStorage';\nimport { useConfig } from '../providers/AppConfigurationProvider';\nimport type { ThemeMode } from './modes';\nimport { getTheme } from './theme';\n\ninterface Props {\n isDarkMode: boolean;\n setIsDarkMode: (isDarkMode: boolean) => void;\n}\n\nconst ThemeContext = createContext<undefined | Props>(undefined);\n\nfunction getDarkModeDefault(darkModeConfig?: boolean) {\n const prefersDarkMode = window.matchMedia?.('(prefers-color-scheme:dark)').matches;\n if (typeof darkModeConfig === 'boolean') {\n return darkModeConfig;\n } else {\n return prefersDarkMode;\n }\n}\n\nconst ThemeProvider: React.FC<{ children: any }> = ({ children }) => {\n const { configOptions } = useConfig();\n const isDarkModeDefault = getDarkModeDefault(configOptions.darkMode);\n const isSwitchThemeEnabled = configOptions.showThemeSwitch;\n const [isDarkModeStorage, setIsDarkMode] = useLocalStorage('darkMode', isDarkModeDefault);\n const isDarkMode = isSwitchThemeEnabled === true ? isDarkModeStorage : isDarkModeDefault;\n const themeMode: ThemeMode = isDarkMode ? 'dark' : 'light';\n\n const currentTheme = getTheme(themeMode, configOptions.primaryColor);\n\n return (\n <ThemeContext.Provider value={{ isDarkMode, setIsDarkMode }}>\n <StyledEngineProvider injectFirst={true}>\n <MUIThemeProvider theme={currentTheme}>{children}</MUIThemeProvider>\n </StyledEngineProvider>\n </ThemeContext.Provider>\n );\n};\n\nexport const useCustomTheme = () => useContext(ThemeContext);\n\nexport { ThemeProvider };\n"],"mappings":";;;;;;;;AAaA,IAAM,eAAe,cAAiC,KAAA,CAAS;AAE/D,SAAS,mBAAmB,gBAA0B;CACpD,MAAM,kBAAkB,OAAO,aAAa,6BAA6B,CAAC,CAAC;CAC3E,IAAI,OAAO,mBAAmB,WAC5B,OAAO;MAEP,OAAO;AAEX;AAEA,IAAM,mBAA8C,EAAE,eAAe;CACnE,MAAM,EAAE,kBAAkB,UAAU;CACpC,MAAM,oBAAoB,mBAAmB,cAAc,QAAQ;CACnE,MAAM,uBAAuB,cAAc;CAC3C,MAAM,CAAC,mBAAmB,iBAAiB,gBAAgB,YAAY,iBAAiB;CACxF,MAAM,aAAa,yBAAyB,OAAO,oBAAoB;CAGvE,MAAM,eAAe,SAFQ,aAAa,SAAS,SAEV,cAAc,YAAY;CAEnE,OACE,oBAAC,aAAa,UAAd;EAAuB,OAAO;GAAE;GAAY;EAAc;
|
|
1
|
+
{"version":3,"file":"ThemeProvider.mjs","names":[],"sources":["../../src/Theme/ThemeProvider.tsx"],"sourcesContent":["import { ThemeProvider as MUIThemeProvider, StyledEngineProvider } from '@mui/material/styles';\nimport React, { createContext, useContext } from 'react';\n\nimport useLocalStorage from '../hooks/useLocalStorage';\nimport { useConfig } from '../providers/AppConfigurationProvider';\nimport type { ThemeMode } from './modes';\nimport { getTheme } from './theme';\n\ninterface Props {\n isDarkMode: boolean;\n setIsDarkMode: (isDarkMode: boolean) => void;\n}\n\nconst ThemeContext = createContext<undefined | Props>(undefined);\n\nfunction getDarkModeDefault(darkModeConfig?: boolean) {\n const prefersDarkMode = window.matchMedia?.('(prefers-color-scheme:dark)').matches;\n if (typeof darkModeConfig === 'boolean') {\n return darkModeConfig;\n } else {\n return prefersDarkMode;\n }\n}\n\nconst ThemeProvider: React.FC<{ children: any }> = ({ children }) => {\n const { configOptions } = useConfig();\n const isDarkModeDefault = getDarkModeDefault(configOptions.darkMode);\n const isSwitchThemeEnabled = configOptions.showThemeSwitch;\n const [isDarkModeStorage, setIsDarkMode] = useLocalStorage('darkMode', isDarkModeDefault);\n const isDarkMode = isSwitchThemeEnabled === true ? isDarkModeStorage : isDarkModeDefault;\n const themeMode: ThemeMode = isDarkMode ? 'dark' : 'light';\n\n const currentTheme = getTheme(themeMode, configOptions.primaryColor);\n\n return (\n <ThemeContext.Provider value={{ isDarkMode, setIsDarkMode }}>\n <StyledEngineProvider injectFirst={true}>\n <MUIThemeProvider theme={currentTheme}>{children}</MUIThemeProvider>\n </StyledEngineProvider>\n </ThemeContext.Provider>\n );\n};\n\nexport const useCustomTheme = () => useContext(ThemeContext);\n\nexport { ThemeProvider };\n"],"mappings":";;;;;;;;AAaA,IAAM,eAAe,cAAiC,KAAA,CAAS;AAE/D,SAAS,mBAAmB,gBAA0B;CACpD,MAAM,kBAAkB,OAAO,aAAa,6BAA6B,CAAC,CAAC;CAC3E,IAAI,OAAO,mBAAmB,WAC5B,OAAO;MAEP,OAAO;AAEX;AAEA,IAAM,mBAA8C,EAAE,eAAe;CACnE,MAAM,EAAE,kBAAkB,UAAU;CACpC,MAAM,oBAAoB,mBAAmB,cAAc,QAAQ;CACnE,MAAM,uBAAuB,cAAc;CAC3C,MAAM,CAAC,mBAAmB,iBAAiB,gBAAgB,YAAY,iBAAiB;CACxF,MAAM,aAAa,yBAAyB,OAAO,oBAAoB;CAGvE,MAAM,eAAe,SAFQ,aAAa,SAAS,SAEV,cAAc,YAAY;CAEnE,OACE,oBAAC,aAAa,UAAd;EAAuB,OAAO;GAAE;GAAY;EAAc;EACxD,UAAA,oBAAC,sBAAD;GAAsB,aAAa;GACjC,UAAA,oBAAC,eAAD;IAAkB,OAAO;IAAe;GAA2B,CAAA;EAC/C,CAAA;CACD,CAAA;AAE3B;AAEA,IAAa,uBAAuB,WAAW,YAAY"}
|
package/build/Theme/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","names":[],"sources":["../../src/Theme/theme.ts"],"sourcesContent":["import type { Theme as MuiTheme } from '@mui/material/styles';\nimport { createTheme } from '@mui/material/styles';\n\nimport type { ThemeMode } from './modes';\nimport { getModePalette } from './modes';\nimport type { CustomTheme, CustomizedTheme } from './tokens';\nimport { customizedTheme } from './tokens';\n\nexport type Theme = MuiTheme & CustomizedTheme;\n\ndeclare module '@mui/material/styles' {\n interface Theme extends CustomTheme, CustomizedTheme {}\n interface ThemeOptions extends CustomTheme {}\n interface Palette {\n black: string;\n cyanBlue: string;\n greyLight: string;\n greyLight2: string;\n greyDark2: string;\n greyGainsboro: string;\n greyAthens: string;\n snow: string;\n love: string;\n nobel01: string;\n }\n interface PaletteOptions {\n black?: string;\n cyanBlue?: string;\n greyLight?: string;\n greyLight2?: string;\n greyDark2?: string;\n greyGainsboro?: string;\n greyAthens?: string;\n snow?: string;\n love?: string;\n nobel01?: string;\n }\n}\n\nexport const getTheme = (mode: ThemeMode, primaryColor?: string): Theme => {\n return createTheme({\n palette: getModePalette(mode, primaryColor),\n\n typography: {\n fontFamily: [\n '-apple-system',\n 'BlinkMacSystemFont',\n '\"Helvetica Neue\"',\n 'Arial',\n 'sans-serif',\n ].join(','),\n },\n\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'unset',\n },\n },\n },\n },\n\n ...customizedTheme,\n });\n};\n"],"mappings":";;;;AAuCA,IAAa,YAAY,MAAiB,iBAAiC;CACzE,QAAA,
|
|
1
|
+
{"version":3,"file":"theme.js","names":[],"sources":["../../src/Theme/theme.ts"],"sourcesContent":["import type { Theme as MuiTheme } from '@mui/material/styles';\nimport { createTheme } from '@mui/material/styles';\n\nimport type { ThemeMode } from './modes';\nimport { getModePalette } from './modes';\nimport type { CustomTheme, CustomizedTheme } from './tokens';\nimport { customizedTheme } from './tokens';\n\nexport type Theme = MuiTheme & CustomizedTheme;\n\ndeclare module '@mui/material/styles' {\n interface Theme extends CustomTheme, CustomizedTheme {}\n interface ThemeOptions extends CustomTheme {}\n interface Palette {\n black: string;\n cyanBlue: string;\n greyLight: string;\n greyLight2: string;\n greyDark2: string;\n greyGainsboro: string;\n greyAthens: string;\n snow: string;\n love: string;\n nobel01: string;\n }\n interface PaletteOptions {\n black?: string;\n cyanBlue?: string;\n greyLight?: string;\n greyLight2?: string;\n greyDark2?: string;\n greyGainsboro?: string;\n greyAthens?: string;\n snow?: string;\n love?: string;\n nobel01?: string;\n }\n}\n\nexport const getTheme = (mode: ThemeMode, primaryColor?: string): Theme => {\n return createTheme({\n palette: getModePalette(mode, primaryColor),\n\n typography: {\n fontFamily: [\n '-apple-system',\n 'BlinkMacSystemFont',\n '\"Helvetica Neue\"',\n 'Arial',\n 'sans-serif',\n ].join(','),\n },\n\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'unset',\n },\n },\n },\n },\n\n ...customizedTheme,\n });\n};\n"],"mappings":";;;;AAuCA,IAAa,YAAY,MAAiB,iBAAiC;CACzE,QAAA,GAAO,qBAAA,YAAA,CAAY;EACjB,SAAS,cAAA,eAAe,MAAM,YAAY;EAE1C,YAAY,EACV,YAAY;GACV;GACA;GACA;GACA;GACA;EACF,CAAC,CAAC,KAAK,GAAG,EACZ;EAEA,YAAY,EACV,UAAU,EACR,gBAAgB,EACd,MAAM,EACJ,iBAAiB,QACnB,EACF,EACF,EACF;EAEA,GAAG,eAAA;CACL,CAAC;AACH"}
|
|
@@ -24,7 +24,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
}
|
|
25
25
|
return to;
|
|
26
26
|
};
|
|
27
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
27
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
28
28
|
value: mod,
|
|
29
29
|
enumerable: true
|
|
30
30
|
}) : target, mod));
|
|
@@ -17,7 +17,8 @@ var fetcher = async (url, method, body, options) => {
|
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
function useDataMutation(basePath, route, method = "POST", options = {}) {
|
|
20
|
-
const
|
|
20
|
+
const key = options.buildUrl ? options.buildUrl(basePath, route) : `${basePath}${route}`;
|
|
21
|
+
const { data, error, isMutating, trigger } = (0, swr_mutation.default)(key, (url, { arg }) => {
|
|
21
22
|
return fetcher(url, method, arg ?? {});
|
|
22
23
|
});
|
|
23
24
|
return {
|
|
@@ -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 credentials: 'include',\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;
|
|
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 credentials: 'include',\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;CAC5F,OAAO,YAAA,QAAI,QAAc,IAAI,MAAM,OAAO;EACxC,SAAS,EACP,QACE,yHACJ;EACA,aAAa;CACf,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"}
|
|
@@ -15,7 +15,8 @@ var fetcher = async (url, method, body, options) => {
|
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
function useDataMutation(basePath, route, method = "POST", options = {}) {
|
|
18
|
-
const
|
|
18
|
+
const key = options.buildUrl ? options.buildUrl(basePath, route) : `${basePath}${route}`;
|
|
19
|
+
const { data, error, isMutating, trigger } = useSWRMutation(key, (url, { arg }) => {
|
|
19
20
|
return fetcher(url, method, arg ?? {});
|
|
20
21
|
});
|
|
21
22
|
return {
|
|
@@ -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 credentials: 'include',\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;
|
|
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 credentials: 'include',\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;CAC5F,OAAO,YAAI,QAAc,IAAI,MAAM,OAAO;EACxC,SAAS,EACP,QACE,yHACJ;EACA,aAAa;CACf,CAAC;AACH;AAEA,SAAgB,qBAAqB;CACnC,MAAM,EAAE,SAAS,YAAY,UAAU,eACrC,oBACA,cACF;CAEA,OAAO;EACL,UAAU;EACV,eAAe;EACf;CACF;AACF"}
|
|
@@ -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\nfunction buildUrl(\n basePath: string,\n route: APIRoute,\n packageName?: string,\n packageVersion?: string\n): string {\n let url = `${basePath}${route}`;\n if (packageName) {\n url += packageName;\n }\n if (packageVersion) {\n url += `?v=${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,SAAS,SACP,UACA,OACA,aACA,gBACQ;CACR,IAAI,MAAM,GAAG,WAAW;CACxB,IAAI,aACF,OAAO;CAET,IAAI,gBACF,OAAO,MAAM;CAEf,OAAO;AACT;AAEA,SAAgB,QACd,UACA,OACA,aACA,gBACiE;CACjE,MAAM,MAAM,SAAS,UAAU,OAAO,aAAa,cAAc;CAEjE,MAAM,EAAE,MAAM,OAAO,WAAW,YAAA,
|
|
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\nfunction buildUrl(\n basePath: string,\n route: APIRoute,\n packageName?: string,\n packageVersion?: string\n): string {\n let url = `${basePath}${route}`;\n if (packageName) {\n url += packageName;\n }\n if (packageVersion) {\n url += `?v=${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,SAAS,SACP,UACA,OACA,aACA,gBACQ;CACR,IAAI,MAAM,GAAG,WAAW;CACxB,IAAI,aACF,OAAO;CAET,IAAI,gBACF,OAAO,MAAM;CAEf,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"}
|
|
@@ -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 if (bugs?.url && url.isURL(bugs.url)) {\n actions.push({ type: 'OPEN_AN_ISSUE', link: bugs.url });\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,
|
|
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 if (bugs?.url && url.isURL(bugs.url)) {\n actions.push({ type: 'OPEN_AN_ISSUE', link: bugs.url });\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;CAGzD,IAAI,MAAM,OAAA,YAAA,MAAiB,KAAK,GAAG,GACjC,QAAQ,KAAK;EAAE,MAAM;EAAiB,MAAM,KAAK;CAAI,CAAC;CAGxD,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 +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 if (bugs?.url && url.isURL(bugs.url)) {\n actions.push({ type: 'OPEN_AN_ISSUE', link: bugs.url });\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;CAGzD,IAAI,MAAM,OAAO,MAAU,KAAK,GAAG,GACjC,QAAQ,KAAK;EAAE,MAAM;EAAiB,MAAM,KAAK;CAAI,CAAC;CAGxD,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;
|
|
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 if (bugs?.url && url.isURL(bugs.url)) {\n actions.push({ type: 'OPEN_AN_ISSUE', link: bugs.url });\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;CAGzD,IAAI,MAAM,OAAO,MAAU,KAAK,GAAG,GACjC,QAAQ,KAAK;EAAE,MAAM;EAAiB,MAAM,KAAK;CAAI,CAAC;CAGxD,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"}
|
|
@@ -49,7 +49,6 @@ var ActionBarAction = ({ type, link, action }) => {
|
|
|
49
49
|
to: link,
|
|
50
50
|
variant: "button",
|
|
51
51
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Fab, {
|
|
52
|
-
color: "primary",
|
|
53
52
|
size: "small",
|
|
54
53
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_icons_material_Home.default, {})
|
|
55
54
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarAction.js","names":[],"sources":["../../../src/components/ActionBar/ActionBarAction.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport BugReportIcon from '@mui/icons-material/BugReport';\nimport DownloadIcon from '@mui/icons-material/CloudDownload';\nimport HomeIcon from '@mui/icons-material/Home';\nimport RawOnIcon from '@mui/icons-material/RawOn';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport FabMUI from '@mui/material/Fab';\nimport Tooltip from '@mui/material/Tooltip';\nimport { common } from '@mui/material/colors';\nimport React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { greyMedium } from '../../Theme/colors';\nimport { useDownload, useVersion } from '../../providers';\nimport LinkExternal from '../LinkExternal';\n\nexport const Fab = styled(FabMUI)<{ theme?: Theme }>(({ theme }) => ({\n backgroundColor:\n theme.palette.mode === 'dark' ? theme.palette.secondary.main : theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.mode === 'dark' ? greyMedium : undefined,\n color: theme.palette.mode === 'light' ? theme.palette.primary.main : common.white,\n },\n color: common.white,\n}));\n\ntype ActionType = 'VISIT_HOMEPAGE' | 'OPEN_AN_ISSUE' | 'DOWNLOAD_TARBALL' | 'RAW_DATA';\n\nexport interface ActionBarActionProps {\n type: ActionType;\n link?: string;\n action?: () => void;\n}\n\nconst ActionBarAction: React.FC<ActionBarActionProps> = ({ type, link, action }) => {\n const { t } = useTranslation();\n const { isLoading } = useVersion();\n const { downloadTarball } = useDownload();\n\n const handleDownload = useCallback(async () => {\n downloadTarball?.({ link: link as string });\n }, [link, downloadTarball]);\n\n switch (type) {\n case 'VISIT_HOMEPAGE':\n return (\n <Tooltip title={t('action-bar-action.visit-home-page') as string}>\n <LinkExternal to={link} variant=\"button\">\n <Fab
|
|
1
|
+
{"version":3,"file":"ActionBarAction.js","names":[],"sources":["../../../src/components/ActionBar/ActionBarAction.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport BugReportIcon from '@mui/icons-material/BugReport';\nimport DownloadIcon from '@mui/icons-material/CloudDownload';\nimport HomeIcon from '@mui/icons-material/Home';\nimport RawOnIcon from '@mui/icons-material/RawOn';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport FabMUI from '@mui/material/Fab';\nimport Tooltip from '@mui/material/Tooltip';\nimport { common } from '@mui/material/colors';\nimport React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { greyMedium } from '../../Theme/colors';\nimport { useDownload, useVersion } from '../../providers';\nimport LinkExternal from '../LinkExternal';\n\nexport const Fab = styled(FabMUI)<{ theme?: Theme }>(({ theme }) => ({\n backgroundColor:\n theme.palette.mode === 'dark' ? theme.palette.secondary.main : theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.mode === 'dark' ? greyMedium : undefined,\n color: theme.palette.mode === 'light' ? theme.palette.primary.main : common.white,\n },\n color: common.white,\n}));\n\ntype ActionType = 'VISIT_HOMEPAGE' | 'OPEN_AN_ISSUE' | 'DOWNLOAD_TARBALL' | 'RAW_DATA';\n\nexport interface ActionBarActionProps {\n type: ActionType;\n link?: string;\n action?: () => void;\n}\n\nconst ActionBarAction: React.FC<ActionBarActionProps> = ({ type, link, action }) => {\n const { t } = useTranslation();\n const { isLoading } = useVersion();\n const { downloadTarball } = useDownload();\n\n const handleDownload = useCallback(async () => {\n downloadTarball?.({ link: link as string });\n }, [link, downloadTarball]);\n\n switch (type) {\n case 'VISIT_HOMEPAGE':\n return (\n <Tooltip title={t('action-bar-action.visit-home-page') as string}>\n <LinkExternal to={link} variant=\"button\">\n <Fab size=\"small\">\n <HomeIcon />\n </Fab>\n </LinkExternal>\n </Tooltip>\n );\n case 'OPEN_AN_ISSUE':\n return (\n <Tooltip title={t('action-bar-action.open-an-issue') as string}>\n <LinkExternal to={link} variant=\"button\">\n <Fab size=\"small\">\n <BugReportIcon />\n </Fab>\n </LinkExternal>\n </Tooltip>\n );\n case 'DOWNLOAD_TARBALL':\n return (\n <Tooltip title={t('action-bar-action.download-tarball') as string}>\n {isLoading ? (\n <CircularProgress sx={{ marginX: 0 }} />\n ) : (\n <Fab data-testid=\"download-tarball-btn\" onClick={handleDownload} size=\"small\">\n <DownloadIcon />\n </Fab>\n )}\n </Tooltip>\n );\n case 'RAW_DATA':\n return (\n <Tooltip title={t('action-bar-action.raw') as string}>\n <Fab data-testid=\"raw-btn\" onClick={action} size=\"small\">\n <RawOnIcon />\n </Fab>\n </Tooltip>\n );\n }\n};\n\nexport default ActionBarAction;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAa,OAAA,GAAM,gBAAA,QAAA,CAAO,kBAAA,OAAM,CAAC,EAAqB,EAAE,aAAa;CACnE,iBACE,MAAM,QAAQ,SAAS,SAAS,MAAM,QAAQ,UAAU,OAAO,MAAM,QAAQ,QAAQ;CACvF,WAAW;EACT,iBAAiB,MAAM,QAAQ,SAAS,SAAS,eAAA,aAAa,KAAA;EAC9D,OAAO,MAAM,QAAQ,SAAS,UAAU,MAAM,QAAQ,QAAQ,OAAO,qBAAA,OAAO;CAC9E;CACA,OAAO,qBAAA,OAAO;AAChB,EAAE;AAUF,IAAM,mBAAmD,EAAE,MAAM,MAAM,aAAa;CAClF,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAC7B,MAAM,EAAE,cAAc,wBAAA,WAAW;CACjC,MAAM,EAAE,oBAAoB,yBAAA,YAAY;CAExC,MAAM,kBAAA,GAAiB,MAAA,YAAA,CAAY,YAAY;EAC7C,kBAAkB,EAAQ,KAAe,CAAC;CAC5C,GAAG,CAAC,MAAM,eAAe,CAAC;CAE1B,QAAQ,MAAR;EACE,KAAK,kBACH,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,sBAAA,SAAD;GAAS,OAAO,EAAE,mCAAmC;GACnD,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAA,SAAD;IAAc,IAAI;IAAM,SAAQ;IAC9B,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;KAAK,MAAK;KACR,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,yBAAA,SAAD,CAAW,CAAA;IACR,CAAA;GACO,CAAA;EACP,CAAA;EAEb,KAAK,iBACH,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,sBAAA,SAAD;GAAS,OAAO,EAAE,iCAAiC;GACjD,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAA,SAAD;IAAc,IAAI;IAAM,SAAQ;IAC9B,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;KAAK,MAAK;KACR,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,8BAAA,SAAD,CAAgB,CAAA;IACb,CAAA;GACO,CAAA;EACP,CAAA;EAEb,KAAK,oBACH,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,sBAAA,SAAD;GAAS,OAAO,EAAE,oCAAoC;GACnD,UAAA,YACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,+BAAA,SAAD,EAAkB,IAAI,EAAE,SAAS,EAAE,EAAI,CAAA,IAEvC,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;IAAK,eAAY;IAAuB,SAAS;IAAgB,MAAK;IACpE,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,kCAAA,SAAD,CAAe,CAAA;GACZ,CAAA;EAEA,CAAA;EAEb,KAAK,YACH,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,sBAAA,SAAD;GAAS,OAAO,EAAE,uBAAuB;GACvC,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;IAAK,eAAY;IAAU,SAAS;IAAQ,MAAK;IAC/C,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAA,SAAD,CAAY,CAAA;GACT,CAAA;EACE,CAAA;CAEf;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBarAction.mjs","names":[],"sources":["../../../src/components/ActionBar/ActionBarAction.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport BugReportIcon from '@mui/icons-material/BugReport';\nimport DownloadIcon from '@mui/icons-material/CloudDownload';\nimport HomeIcon from '@mui/icons-material/Home';\nimport RawOnIcon from '@mui/icons-material/RawOn';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport FabMUI from '@mui/material/Fab';\nimport Tooltip from '@mui/material/Tooltip';\nimport { common } from '@mui/material/colors';\nimport React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { greyMedium } from '../../Theme/colors';\nimport { useDownload, useVersion } from '../../providers';\nimport LinkExternal from '../LinkExternal';\n\nexport const Fab = styled(FabMUI)<{ theme?: Theme }>(({ theme }) => ({\n backgroundColor:\n theme.palette.mode === 'dark' ? theme.palette.secondary.main : theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.mode === 'dark' ? greyMedium : undefined,\n color: theme.palette.mode === 'light' ? theme.palette.primary.main : common.white,\n },\n color: common.white,\n}));\n\ntype ActionType = 'VISIT_HOMEPAGE' | 'OPEN_AN_ISSUE' | 'DOWNLOAD_TARBALL' | 'RAW_DATA';\n\nexport interface ActionBarActionProps {\n type: ActionType;\n link?: string;\n action?: () => void;\n}\n\nconst ActionBarAction: React.FC<ActionBarActionProps> = ({ type, link, action }) => {\n const { t } = useTranslation();\n const { isLoading } = useVersion();\n const { downloadTarball } = useDownload();\n\n const handleDownload = useCallback(async () => {\n downloadTarball?.({ link: link as string });\n }, [link, downloadTarball]);\n\n switch (type) {\n case 'VISIT_HOMEPAGE':\n return (\n <Tooltip title={t('action-bar-action.visit-home-page') as string}>\n <LinkExternal to={link} variant=\"button\">\n <Fab
|
|
1
|
+
{"version":3,"file":"ActionBarAction.mjs","names":[],"sources":["../../../src/components/ActionBar/ActionBarAction.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport BugReportIcon from '@mui/icons-material/BugReport';\nimport DownloadIcon from '@mui/icons-material/CloudDownload';\nimport HomeIcon from '@mui/icons-material/Home';\nimport RawOnIcon from '@mui/icons-material/RawOn';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport FabMUI from '@mui/material/Fab';\nimport Tooltip from '@mui/material/Tooltip';\nimport { common } from '@mui/material/colors';\nimport React, { useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { greyMedium } from '../../Theme/colors';\nimport { useDownload, useVersion } from '../../providers';\nimport LinkExternal from '../LinkExternal';\n\nexport const Fab = styled(FabMUI)<{ theme?: Theme }>(({ theme }) => ({\n backgroundColor:\n theme.palette.mode === 'dark' ? theme.palette.secondary.main : theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.mode === 'dark' ? greyMedium : undefined,\n color: theme.palette.mode === 'light' ? theme.palette.primary.main : common.white,\n },\n color: common.white,\n}));\n\ntype ActionType = 'VISIT_HOMEPAGE' | 'OPEN_AN_ISSUE' | 'DOWNLOAD_TARBALL' | 'RAW_DATA';\n\nexport interface ActionBarActionProps {\n type: ActionType;\n link?: string;\n action?: () => void;\n}\n\nconst ActionBarAction: React.FC<ActionBarActionProps> = ({ type, link, action }) => {\n const { t } = useTranslation();\n const { isLoading } = useVersion();\n const { downloadTarball } = useDownload();\n\n const handleDownload = useCallback(async () => {\n downloadTarball?.({ link: link as string });\n }, [link, downloadTarball]);\n\n switch (type) {\n case 'VISIT_HOMEPAGE':\n return (\n <Tooltip title={t('action-bar-action.visit-home-page') as string}>\n <LinkExternal to={link} variant=\"button\">\n <Fab size=\"small\">\n <HomeIcon />\n </Fab>\n </LinkExternal>\n </Tooltip>\n );\n case 'OPEN_AN_ISSUE':\n return (\n <Tooltip title={t('action-bar-action.open-an-issue') as string}>\n <LinkExternal to={link} variant=\"button\">\n <Fab size=\"small\">\n <BugReportIcon />\n </Fab>\n </LinkExternal>\n </Tooltip>\n );\n case 'DOWNLOAD_TARBALL':\n return (\n <Tooltip title={t('action-bar-action.download-tarball') as string}>\n {isLoading ? (\n <CircularProgress sx={{ marginX: 0 }} />\n ) : (\n <Fab data-testid=\"download-tarball-btn\" onClick={handleDownload} size=\"small\">\n <DownloadIcon />\n </Fab>\n )}\n </Tooltip>\n );\n case 'RAW_DATA':\n return (\n <Tooltip title={t('action-bar-action.raw') as string}>\n <Fab data-testid=\"raw-btn\" onClick={action} size=\"small\">\n <RawOnIcon />\n </Fab>\n </Tooltip>\n );\n }\n};\n\nexport default ActionBarAction;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,IAAa,MAAM,OAAO,MAAM,CAAC,EAAqB,EAAE,aAAa;CACnE,iBACE,MAAM,QAAQ,SAAS,SAAS,MAAM,QAAQ,UAAU,OAAO,MAAM,QAAQ,QAAQ;CACvF,WAAW;EACT,iBAAiB,MAAM,QAAQ,SAAS,SAAS,aAAa,KAAA;EAC9D,OAAO,MAAM,QAAQ,SAAS,UAAU,MAAM,QAAQ,QAAQ,OAAO,OAAO;CAC9E;CACA,OAAO,OAAO;AAChB,EAAE;AAUF,IAAM,mBAAmD,EAAE,MAAM,MAAM,aAAa;CAClF,MAAM,EAAE,MAAM,eAAe;CAC7B,MAAM,EAAE,cAAc,WAAW;CACjC,MAAM,EAAE,oBAAoB,YAAY;CAExC,MAAM,iBAAiB,YAAY,YAAY;EAC7C,kBAAkB,EAAQ,KAAe,CAAC;CAC5C,GAAG,CAAC,MAAM,eAAe,CAAC;CAE1B,QAAQ,MAAR;EACE,KAAK,kBACH,OACE,oBAAC,SAAD;GAAS,OAAO,EAAE,mCAAmC;GACnD,UAAA,oBAAC,cAAD;IAAc,IAAI;IAAM,SAAQ;IAC9B,UAAA,oBAAC,KAAD;KAAK,MAAK;KACR,UAAA,oBAAC,UAAD,CAAW,CAAA;IACR,CAAA;GACO,CAAA;EACP,CAAA;EAEb,KAAK,iBACH,OACE,oBAAC,SAAD;GAAS,OAAO,EAAE,iCAAiC;GACjD,UAAA,oBAAC,cAAD;IAAc,IAAI;IAAM,SAAQ;IAC9B,UAAA,oBAAC,KAAD;KAAK,MAAK;KACR,UAAA,oBAAC,eAAD,CAAgB,CAAA;IACb,CAAA;GACO,CAAA;EACP,CAAA;EAEb,KAAK,oBACH,OACE,oBAAC,SAAD;GAAS,OAAO,EAAE,oCAAoC;GACnD,UAAA,YACC,oBAAC,kBAAD,EAAkB,IAAI,EAAE,SAAS,EAAE,EAAI,CAAA,IAEvC,oBAAC,KAAD;IAAK,eAAY;IAAuB,SAAS;IAAgB,MAAK;IACpE,UAAA,oBAAC,cAAD,CAAe,CAAA;GACZ,CAAA;EAEA,CAAA;EAEb,KAAK,YACH,OACE,oBAAC,SAAD;GAAS,OAAO,EAAE,uBAAuB;GACvC,UAAA,oBAAC,KAAD;IAAK,eAAY;IAAU,SAAS;IAAQ,MAAK;IAC/C,UAAA,oBAAC,WAAD,CAAY,CAAA;GACT,CAAA;EACE,CAAA;CAEf;AACF"}
|
|
@@ -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;AAEnF,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,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,IAAA,WAAD;EAAW,OAAO;GAAE,mBAAmB;GAAO,uBAAuB;EAAM;
|
|
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;AAEnF,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,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;GAC5D,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"}
|
|
@@ -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;AAEnF,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,OACE,oBAAC,WAAD;EAAW,OAAO;GAAE,mBAAmB;GAAO,uBAAuB;EAAM;
|
|
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;AAEnF,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,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;GAC5D,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Author.js","names":[],"sources":["../../../src/components/Author/Author.tsx"],"sourcesContent":["import List from '@mui/material/List';\nimport type { FC } from 'react';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport Person from '../Person';\nimport { AuthorListItem, StyledText } from './styles';\n\nconst Author: FC<{ packageMeta }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n\n if (!packageMeta) {\n return null;\n }\n\n const { author, name: packageName, version } = packageMeta.latest;\n\n if (!author) {\n return null;\n }\n\n return (\n <List subheader={<StyledText variant={'subtitle1'}>{t('sidebar.author.title')}</StyledText>}>\n <AuthorListItem sx={{ my: 1 }}>\n <Person packageName={packageName} person={author} version={version} withText={true} />\n </AuthorListItem>\n </List>\n );\n};\n\nexport default Author;\n"],"mappings":";;;;;;;;;;;AAQA,IAAM,UAA+B,EAAE,kBAAkB;CACvD,MAAM,EAAE,OAAA,
|
|
1
|
+
{"version":3,"file":"Author.js","names":[],"sources":["../../../src/components/Author/Author.tsx"],"sourcesContent":["import List from '@mui/material/List';\nimport type { FC } from 'react';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport Person from '../Person';\nimport { AuthorListItem, StyledText } from './styles';\n\nconst Author: FC<{ packageMeta }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n\n if (!packageMeta) {\n return null;\n }\n\n const { author, name: packageName, version } = packageMeta.latest;\n\n if (!author) {\n return null;\n }\n\n return (\n <List subheader={<StyledText variant={'subtitle1'}>{t('sidebar.author.title')}</StyledText>}>\n <AuthorListItem sx={{ my: 1 }}>\n <Person packageName={packageName} person={author} version={version} withText={true} />\n </AuthorListItem>\n </List>\n );\n};\n\nexport default Author;\n"],"mappings":";;;;;;;;;;;AAQA,IAAM,UAA+B,EAAE,kBAAkB;CACvD,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAE7B,IAAI,CAAC,aACH,OAAO;CAGT,MAAM,EAAE,QAAQ,MAAM,aAAa,YAAY,YAAY;CAE3D,IAAI,CAAC,QACH,OAAO;CAGT,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,mBAAA,SAAD;EAAM,WAAW,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAA,YAAD;GAAY,SAAS;GAAc,UAAA,EAAE,sBAAsB;EAAc,CAAA;EACxF,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAA,gBAAD;GAAgB,IAAI,EAAE,IAAI,EAAE;GAC1B,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAA,SAAD;IAAqB;IAAa,QAAQ;IAAiB;IAAS,UAAU;GAAO,CAAA;EACvE,CAAA;CACZ,CAAA;AAEV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Author.mjs","names":[],"sources":["../../../src/components/Author/Author.tsx"],"sourcesContent":["import List from '@mui/material/List';\nimport type { FC } from 'react';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport Person from '../Person';\nimport { AuthorListItem, StyledText } from './styles';\n\nconst Author: FC<{ packageMeta }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n\n if (!packageMeta) {\n return null;\n }\n\n const { author, name: packageName, version } = packageMeta.latest;\n\n if (!author) {\n return null;\n }\n\n return (\n <List subheader={<StyledText variant={'subtitle1'}>{t('sidebar.author.title')}</StyledText>}>\n <AuthorListItem sx={{ my: 1 }}>\n <Person packageName={packageName} person={author} version={version} withText={true} />\n </AuthorListItem>\n </List>\n );\n};\n\nexport default Author;\n"],"mappings":";;;;;;;;AAQA,IAAM,UAA+B,EAAE,kBAAkB;CACvD,MAAM,EAAE,MAAM,eAAe;CAE7B,IAAI,CAAC,aACH,OAAO;CAGT,MAAM,EAAE,QAAQ,MAAM,aAAa,YAAY,YAAY;CAE3D,IAAI,CAAC,QACH,OAAO;CAGT,OACE,oBAAC,MAAD;EAAM,WAAW,oBAAC,YAAD;GAAY,SAAS;
|
|
1
|
+
{"version":3,"file":"Author.mjs","names":[],"sources":["../../../src/components/Author/Author.tsx"],"sourcesContent":["import List from '@mui/material/List';\nimport type { FC } from 'react';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport Person from '../Person';\nimport { AuthorListItem, StyledText } from './styles';\n\nconst Author: FC<{ packageMeta }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n\n if (!packageMeta) {\n return null;\n }\n\n const { author, name: packageName, version } = packageMeta.latest;\n\n if (!author) {\n return null;\n }\n\n return (\n <List subheader={<StyledText variant={'subtitle1'}>{t('sidebar.author.title')}</StyledText>}>\n <AuthorListItem sx={{ my: 1 }}>\n <Person packageName={packageName} person={author} version={version} withText={true} />\n </AuthorListItem>\n </List>\n );\n};\n\nexport default Author;\n"],"mappings":";;;;;;;;AAQA,IAAM,UAA+B,EAAE,kBAAkB;CACvD,MAAM,EAAE,MAAM,eAAe;CAE7B,IAAI,CAAC,aACH,OAAO;CAGT,MAAM,EAAE,QAAQ,MAAM,aAAa,YAAY,YAAY;CAE3D,IAAI,CAAC,QACH,OAAO;CAGT,OACE,oBAAC,MAAD;EAAM,WAAW,oBAAC,YAAD;GAAY,SAAS;GAAc,UAAA,EAAE,sBAAsB;EAAc,CAAA;EACxF,UAAA,oBAAC,gBAAD;GAAgB,IAAI,EAAE,IAAI,EAAE;GAC1B,UAAA,oBAAC,QAAD;IAAqB;IAAa,QAAQ;IAAiB;IAAS,UAAU;GAAO,CAAA;EACvE,CAAA;CACZ,CAAA;AAEV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":[],"sources":["../../../src/components/Author/styles.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { Typography } from '@mui/material';\nimport ListItem from '@mui/material/ListItem';\n\nimport type { Theme } from '../../Theme';\n\nexport const StyledText = styled(Typography)<{ theme?: Theme }>((props) => ({\n fontWeight: props.theme.fontWeight.bold,\n}));\n\nexport const AuthorListItem = styled(ListItem)({\n padding: 0,\n ':hover': {\n backgroundColor: 'transparent',\n },\n});\n"],"mappings":";;;;;;;AAMA,IAAa,cAAA,
|
|
1
|
+
{"version":3,"file":"styles.js","names":[],"sources":["../../../src/components/Author/styles.ts"],"sourcesContent":["import styled from '@emotion/styled';\nimport { Typography } from '@mui/material';\nimport ListItem from '@mui/material/ListItem';\n\nimport type { Theme } from '../../Theme';\n\nexport const StyledText = styled(Typography)<{ theme?: Theme }>((props) => ({\n fontWeight: props.theme.fontWeight.bold,\n}));\n\nexport const AuthorListItem = styled(ListItem)({\n padding: 0,\n ':hover': {\n backgroundColor: 'transparent',\n },\n});\n"],"mappings":";;;;;;;AAMA,IAAa,cAAA,GAAa,gBAAA,QAAA,CAAO,cAAA,UAAU,CAAC,EAAqB,WAAW,EAC1E,YAAY,MAAM,MAAM,WAAW,KACrC,EAAE;AAEF,IAAa,kBAAA,GAAiB,gBAAA,QAAA,CAAO,uBAAA,OAAQ,CAAC,CAAC;CAC7C,SAAS;CACT,UAAU,EACR,iBAAiB,cACnB;AACF,CAAC"}
|
|
@@ -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 data-testid={dataTestId} onClick={copyToClipBoardUtility(text)} size=\"small\">\n <FileCopy fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n ) : (\n <IconButton data-testid={dataTestId} onClick={copyToClipBoardUtility(text)} size=\"small\">\n <FileCopy fontSize=\"small\" />\n </IconButton>\n )}\n </Wrapper>\n );\n}\n\nexport default CopyToClipBoard;\n"],"mappings":";;;;;;;;;;;;;;AAgBA,IAAM,WAAA,
|
|
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 data-testid={dataTestId} onClick={copyToClipBoardUtility(text)} size=\"small\">\n <FileCopy fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n ) : (\n <IconButton data-testid={dataTestId} onClick={copyToClipBoardUtility(text)} size=\"small\">\n <FileCopy fontSize=\"small\" />\n </IconButton>\n )}\n </Wrapper>\n );\n}\n\nexport default CopyToClipBoard;\n"],"mappings":";;;;;;;;;;;;;;AAgBA,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,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;IAAY,eAAa;IAAY,SAAS,cAAA,uBAAuB,IAAI;IAAG,MAAK;IAC/E,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,6BAAA,SAAD,EAAU,UAAS,QAAS,CAAA;GAClB,CAAA;EACL,CAAA,IAET,iBAAA,GAAA,kBAAA,IAAA,CAAC,yBAAA,SAAD;GAAY,eAAa;GAAY,SAAS,cAAA,uBAAuB,IAAI;GAAG,MAAK;GAC/E,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,6BAAA,SAAD,EAAU,UAAS,QAAS,CAAA;EAClB,CAAA,CAEP;;AAEb"}
|
|
@@ -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 data-testid={dataTestId} onClick={copyToClipBoardUtility(text)} size=\"small\">\n <FileCopy fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n ) : (\n <IconButton data-testid={dataTestId} onClick={copyToClipBoardUtility(text)} size=\"small\">\n <FileCopy fontSize=\"small\" />\n </IconButton>\n )}\n </Wrapper>\n );\n}\n\nexport default CopyToClipBoard;\n"],"mappings":";;;;;;;;AAgBA,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,OACE,qBAAC,SAAD;EAAS,GAAI;
|
|
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 data-testid={dataTestId} onClick={copyToClipBoardUtility(text)} size=\"small\">\n <FileCopy fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n ) : (\n <IconButton data-testid={dataTestId} onClick={copyToClipBoardUtility(text)} size=\"small\">\n <FileCopy fontSize=\"small\" />\n </IconButton>\n )}\n </Wrapper>\n );\n}\n\nexport default CopyToClipBoard;\n"],"mappings":";;;;;;;;AAgBA,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,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;IAAY,eAAa;IAAY,SAAS,uBAAuB,IAAI;IAAG,MAAK;IAC/E,UAAA,oBAAC,UAAD,EAAU,UAAS,QAAS,CAAA;GAClB,CAAA;EACL,CAAA,IAET,oBAAC,YAAD;GAAY,eAAa;GAAY,SAAS,uBAAuB,IAAI;GAAG,MAAK;GAC/E,UAAA,oBAAC,UAAD,EAAU,UAAS,QAAS,CAAA;EAClB,CAAA,CAEP;;AAEb"}
|
|
@@ -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,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dependencies.mjs","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,MAAM,eAAe;CAE7B,MAAM,EAAE,WAAW;CAGnB,MAAM,EACJ,cACA,iBACA,kBACA,sBACA,oBACA,SACE;CACJ,MAAM,gBAAgB;EACpB;EACA;EACA;EACA;EACA;CACF;CAOA,IALE,QAAQ,YAAY,KACpB,QAAQ,kBAAkB,KAC1B,QAAQ,oBAAoB,KAC5B,QAAQ,eAAe,KACvB,QAAQ,gBAAgB,GAExB,OACE,oBAAC,MAAD;EAAM,IAAI,EAAE,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"Dependencies.mjs","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,MAAM,eAAe;CAE7B,MAAM,EAAE,WAAW;CAGnB,MAAM,EACJ,cACA,iBACA,kBACA,sBACA,oBACA,SACE;CACJ,MAAM,gBAAgB;EACpB;EACA;EACA;EACA;EACA;CACF;CAOA,IALE,QAAQ,YAAY,KACpB,QAAQ,kBAAkB,KAC1B,QAAQ,oBAAoB,KAC5B,QAAQ,eAAe,KACvB,QAAQ,gBAAgB,GAExB,OACE,oBAAC,MAAD;EAAM,IAAI,EAAE,IAAI,EAAE;EAChB,UAAA,oBAAC,aAAD,EAAA,UACE,oBAAC,KAAD;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,oBAAC,UAAD,EAAA,UACE,oBAAC,iBAAD;KACgB;KAEd,OAAO;IACR,GAFM,cAEN,EACO,GANK,cAML;GAEd,CAAC;EACE,CAAA,EACM,CAAA;CACT,CAAA;CAIV,OACE,oBAAC,MAAD;EAAM,IAAI,EAAE,IAAI,EAAE;EAChB,UAAA,oBAAC,aAAD,EAAA,UACE,oBAAC,SAAD,EAAS,MAAM,EAAE,oCAAoC,EAAE,SAAS,KAAK,CAAC,EAAI,CAAA,EAC/D,CAAA;CACT,CAAA;AAEV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependencyBlock.js","names":[],"sources":["../../../src/components/Dependencies/DependencyBlock.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Box from '@mui/material/Box';\nimport Chip from '@mui/material/Chip';\nimport Typography from '@mui/material/Typography';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useNavigate } from 'react-router';\n\nimport type { Theme } from '../../Theme';\nimport type { PackageDependencies } from '../../types/packageMeta';\nimport { Route } from '../../utils';\n\ninterface DependencyBlockProps {\n title: string;\n dependencies: PackageDependencies;\n}\n\nexport const StyledText = styled(Typography)<{ theme?: Theme }>((props) => ({\n fontWeight: props.theme.fontWeight.bold,\n textTransform: 'capitalize',\n}));\n\nexport const Tags = styled('div')<{ theme?: Theme }>((props) => ({\n display: 'flex',\n justifyContent: 'start',\n flexWrap: 'wrap',\n // force title to be on the same line as the title\n // could be better to avoid margin on the first element\n // but it is a bit tricky to do with flexbox\n marginLeft: props.theme.spacing(-0.6),\n}));\n\nexport const Tag = styled(Chip)<{ theme?: Theme }>((props) => ({\n margin: props.theme.spacing(0.6),\n}));\n\nexport const DependencyBlock: React.FC<DependencyBlockProps> = ({ title, dependencies }) => {\n const navigate = useNavigate();\n const { t } = useTranslation();\n const deps = Object.entries(dependencies);\n\n function handleClick(name: string): void {\n navigate(`${Route.DETAIL}${name}`);\n }\n\n function labelText(title: string, name: string, version: string): string {\n if (title === 'bundleDependencies') {\n return t('dependencies.dependency-block-bundle', { package: name });\n } else {\n return t('dependencies.dependency-block', { package: name, version });\n }\n }\n\n return (\n <Box data-testid={title} sx={{ margin: 2 }}>\n <StyledText sx={{ marginBottom: 1 }} variant=\"subtitle1\">\n {`${title} (${deps.length})`}\n </StyledText>\n <Tags>\n {deps.map(([name, version]: [string, string]) => {\n // Bundle dependencies are stored as array, for example [ 0: \"semver\" ]\n // so the package name arrives here in the version field\n const packageName = title == 'bundleDependencies' ? version : name;\n return (\n <Tag\n className={'dep-tag'}\n clickable={true}\n data-testid={packageName}\n key={packageName}\n label={labelText(title, packageName, version)}\n onClick={() => {\n handleClick(packageName);\n }}\n />\n );\n })}\n </Tags>\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,IAAa,cAAA,
|
|
1
|
+
{"version":3,"file":"DependencyBlock.js","names":[],"sources":["../../../src/components/Dependencies/DependencyBlock.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Box from '@mui/material/Box';\nimport Chip from '@mui/material/Chip';\nimport Typography from '@mui/material/Typography';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useNavigate } from 'react-router';\n\nimport type { Theme } from '../../Theme';\nimport type { PackageDependencies } from '../../types/packageMeta';\nimport { Route } from '../../utils';\n\ninterface DependencyBlockProps {\n title: string;\n dependencies: PackageDependencies;\n}\n\nexport const StyledText = styled(Typography)<{ theme?: Theme }>((props) => ({\n fontWeight: props.theme.fontWeight.bold,\n textTransform: 'capitalize',\n}));\n\nexport const Tags = styled('div')<{ theme?: Theme }>((props) => ({\n display: 'flex',\n justifyContent: 'start',\n flexWrap: 'wrap',\n // force title to be on the same line as the title\n // could be better to avoid margin on the first element\n // but it is a bit tricky to do with flexbox\n marginLeft: props.theme.spacing(-0.6),\n}));\n\nexport const Tag = styled(Chip)<{ theme?: Theme }>((props) => ({\n margin: props.theme.spacing(0.6),\n}));\n\nexport const DependencyBlock: React.FC<DependencyBlockProps> = ({ title, dependencies }) => {\n const navigate = useNavigate();\n const { t } = useTranslation();\n const deps = Object.entries(dependencies);\n\n function handleClick(name: string): void {\n navigate(`${Route.DETAIL}${name}`);\n }\n\n function labelText(title: string, name: string, version: string): string {\n if (title === 'bundleDependencies') {\n return t('dependencies.dependency-block-bundle', { package: name });\n } else {\n return t('dependencies.dependency-block', { package: name, version });\n }\n }\n\n return (\n <Box data-testid={title} sx={{ margin: 2 }}>\n <StyledText sx={{ marginBottom: 1 }} variant=\"subtitle1\">\n {`${title} (${deps.length})`}\n </StyledText>\n <Tags>\n {deps.map(([name, version]: [string, string]) => {\n // Bundle dependencies are stored as array, for example [ 0: \"semver\" ]\n // so the package name arrives here in the version field\n const packageName = title == 'bundleDependencies' ? version : name;\n return (\n <Tag\n className={'dep-tag'}\n clickable={true}\n data-testid={packageName}\n key={packageName}\n label={labelText(title, packageName, version)}\n onClick={() => {\n handleClick(packageName);\n }}\n />\n );\n })}\n </Tags>\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,IAAa,cAAA,GAAa,gBAAA,QAAA,CAAO,yBAAA,OAAU,CAAC,EAAqB,WAAW;CAC1E,YAAY,MAAM,MAAM,WAAW;CACnC,eAAe;AACjB,EAAE;AAEF,IAAa,QAAA,GAAO,gBAAA,QAAA,CAAO,KAAK,CAAC,EAAqB,WAAW;CAC/D,SAAS;CACT,gBAAgB;CAChB,UAAU;CAIV,YAAY,MAAM,MAAM,QAAQ,GAAI;AACtC,EAAE;AAEF,IAAa,OAAA,GAAM,gBAAA,QAAA,CAAO,mBAAA,OAAI,CAAC,EAAqB,WAAW,EAC7D,QAAQ,MAAM,MAAM,QAAQ,EAAG,EACjC,EAAE;AAEF,IAAa,mBAAmD,EAAE,OAAO,mBAAmB;CAC1F,MAAM,YAAA,GAAW,aAAA,YAAA,CAAY;CAC7B,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAC7B,MAAM,OAAO,OAAO,QAAQ,YAAY;CAExC,SAAS,YAAY,MAAoB;EACvC,SAAS,GAAG,eAAA,MAAM,SAAS,MAAM;CACnC;CAEA,SAAS,UAAU,OAAe,MAAc,SAAyB;EACvE,IAAI,UAAU,sBACZ,OAAO,EAAE,wCAAwC,EAAE,SAAS,KAAK,CAAC;OAElE,OAAO,EAAE,iCAAiC;GAAE,SAAS;GAAM;EAAQ,CAAC;CAExE;CAEA,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,kBAAA,SAAD;EAAK,eAAa;EAAO,IAAI,EAAE,QAAQ,EAAE;EAAzC,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD;GAAY,IAAI,EAAE,cAAc,EAAE;GAAG,SAAQ;GAC1C,UAAA,GAAG,MAAM,IAAI,KAAK,OAAO;EAChB,CAAA,GACZ,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD,EAAA,UACG,KAAK,KAAK,CAAC,MAAM,aAA+B;GAG/C,MAAM,cAAc,SAAS,uBAAuB,UAAU;GAC9D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;IACE,WAAW;IACX,WAAW;IACX,eAAa;IAEb,OAAO,UAAU,OAAO,aAAa,OAAO;IAC5C,eAAe;KACb,YAAY,WAAW;IACzB;GACD,GALM,WAKN;EAEL,CAAC,EACG,CAAA,CACH;;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependencyBlock.mjs","names":[],"sources":["../../../src/components/Dependencies/DependencyBlock.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Box from '@mui/material/Box';\nimport Chip from '@mui/material/Chip';\nimport Typography from '@mui/material/Typography';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useNavigate } from 'react-router';\n\nimport type { Theme } from '../../Theme';\nimport type { PackageDependencies } from '../../types/packageMeta';\nimport { Route } from '../../utils';\n\ninterface DependencyBlockProps {\n title: string;\n dependencies: PackageDependencies;\n}\n\nexport const StyledText = styled(Typography)<{ theme?: Theme }>((props) => ({\n fontWeight: props.theme.fontWeight.bold,\n textTransform: 'capitalize',\n}));\n\nexport const Tags = styled('div')<{ theme?: Theme }>((props) => ({\n display: 'flex',\n justifyContent: 'start',\n flexWrap: 'wrap',\n // force title to be on the same line as the title\n // could be better to avoid margin on the first element\n // but it is a bit tricky to do with flexbox\n marginLeft: props.theme.spacing(-0.6),\n}));\n\nexport const Tag = styled(Chip)<{ theme?: Theme }>((props) => ({\n margin: props.theme.spacing(0.6),\n}));\n\nexport const DependencyBlock: React.FC<DependencyBlockProps> = ({ title, dependencies }) => {\n const navigate = useNavigate();\n const { t } = useTranslation();\n const deps = Object.entries(dependencies);\n\n function handleClick(name: string): void {\n navigate(`${Route.DETAIL}${name}`);\n }\n\n function labelText(title: string, name: string, version: string): string {\n if (title === 'bundleDependencies') {\n return t('dependencies.dependency-block-bundle', { package: name });\n } else {\n return t('dependencies.dependency-block', { package: name, version });\n }\n }\n\n return (\n <Box data-testid={title} sx={{ margin: 2 }}>\n <StyledText sx={{ marginBottom: 1 }} variant=\"subtitle1\">\n {`${title} (${deps.length})`}\n </StyledText>\n <Tags>\n {deps.map(([name, version]: [string, string]) => {\n // Bundle dependencies are stored as array, for example [ 0: \"semver\" ]\n // so the package name arrives here in the version field\n const packageName = title == 'bundleDependencies' ? version : name;\n return (\n <Tag\n className={'dep-tag'}\n clickable={true}\n data-testid={packageName}\n key={packageName}\n label={labelText(title, packageName, version)}\n onClick={() => {\n handleClick(packageName);\n }}\n />\n );\n })}\n </Tags>\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;AAiBA,IAAa,aAAa,OAAO,UAAU,CAAC,EAAqB,WAAW;CAC1E,YAAY,MAAM,MAAM,WAAW;CACnC,eAAe;AACjB,EAAE;AAEF,IAAa,OAAO,OAAO,KAAK,CAAC,EAAqB,WAAW;CAC/D,SAAS;CACT,gBAAgB;CAChB,UAAU;CAIV,YAAY,MAAM,MAAM,QAAQ,GAAI;AACtC,EAAE;AAEF,IAAa,MAAM,OAAO,IAAI,CAAC,EAAqB,WAAW,EAC7D,QAAQ,MAAM,MAAM,QAAQ,EAAG,EACjC,EAAE;AAEF,IAAa,mBAAmD,EAAE,OAAO,mBAAmB;CAC1F,MAAM,WAAW,YAAY;CAC7B,MAAM,EAAE,MAAM,eAAe;CAC7B,MAAM,OAAO,OAAO,QAAQ,YAAY;CAExC,SAAS,YAAY,MAAoB;EACvC,SAAS,GAAG,QAAM,SAAS,MAAM;CACnC;CAEA,SAAS,UAAU,OAAe,MAAc,SAAyB;EACvE,IAAI,UAAU,sBACZ,OAAO,EAAE,wCAAwC,EAAE,SAAS,KAAK,CAAC;OAElE,OAAO,EAAE,iCAAiC;GAAE,SAAS;GAAM;EAAQ,CAAC;CAExE;CAEA,OACE,qBAAC,KAAD;EAAK,eAAa;EAAO,IAAI,EAAE,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"DependencyBlock.mjs","names":[],"sources":["../../../src/components/Dependencies/DependencyBlock.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Box from '@mui/material/Box';\nimport Chip from '@mui/material/Chip';\nimport Typography from '@mui/material/Typography';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useNavigate } from 'react-router';\n\nimport type { Theme } from '../../Theme';\nimport type { PackageDependencies } from '../../types/packageMeta';\nimport { Route } from '../../utils';\n\ninterface DependencyBlockProps {\n title: string;\n dependencies: PackageDependencies;\n}\n\nexport const StyledText = styled(Typography)<{ theme?: Theme }>((props) => ({\n fontWeight: props.theme.fontWeight.bold,\n textTransform: 'capitalize',\n}));\n\nexport const Tags = styled('div')<{ theme?: Theme }>((props) => ({\n display: 'flex',\n justifyContent: 'start',\n flexWrap: 'wrap',\n // force title to be on the same line as the title\n // could be better to avoid margin on the first element\n // but it is a bit tricky to do with flexbox\n marginLeft: props.theme.spacing(-0.6),\n}));\n\nexport const Tag = styled(Chip)<{ theme?: Theme }>((props) => ({\n margin: props.theme.spacing(0.6),\n}));\n\nexport const DependencyBlock: React.FC<DependencyBlockProps> = ({ title, dependencies }) => {\n const navigate = useNavigate();\n const { t } = useTranslation();\n const deps = Object.entries(dependencies);\n\n function handleClick(name: string): void {\n navigate(`${Route.DETAIL}${name}`);\n }\n\n function labelText(title: string, name: string, version: string): string {\n if (title === 'bundleDependencies') {\n return t('dependencies.dependency-block-bundle', { package: name });\n } else {\n return t('dependencies.dependency-block', { package: name, version });\n }\n }\n\n return (\n <Box data-testid={title} sx={{ margin: 2 }}>\n <StyledText sx={{ marginBottom: 1 }} variant=\"subtitle1\">\n {`${title} (${deps.length})`}\n </StyledText>\n <Tags>\n {deps.map(([name, version]: [string, string]) => {\n // Bundle dependencies are stored as array, for example [ 0: \"semver\" ]\n // so the package name arrives here in the version field\n const packageName = title == 'bundleDependencies' ? version : name;\n return (\n <Tag\n className={'dep-tag'}\n clickable={true}\n data-testid={packageName}\n key={packageName}\n label={labelText(title, packageName, version)}\n onClick={() => {\n handleClick(packageName);\n }}\n />\n );\n })}\n </Tags>\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;AAiBA,IAAa,aAAa,OAAO,UAAU,CAAC,EAAqB,WAAW;CAC1E,YAAY,MAAM,MAAM,WAAW;CACnC,eAAe;AACjB,EAAE;AAEF,IAAa,OAAO,OAAO,KAAK,CAAC,EAAqB,WAAW;CAC/D,SAAS;CACT,gBAAgB;CAChB,UAAU;CAIV,YAAY,MAAM,MAAM,QAAQ,GAAI;AACtC,EAAE;AAEF,IAAa,MAAM,OAAO,IAAI,CAAC,EAAqB,WAAW,EAC7D,QAAQ,MAAM,MAAM,QAAQ,EAAG,EACjC,EAAE;AAEF,IAAa,mBAAmD,EAAE,OAAO,mBAAmB;CAC1F,MAAM,WAAW,YAAY;CAC7B,MAAM,EAAE,MAAM,eAAe;CAC7B,MAAM,OAAO,OAAO,QAAQ,YAAY;CAExC,SAAS,YAAY,MAAoB;EACvC,SAAS,GAAG,QAAM,SAAS,MAAM;CACnC;CAEA,SAAS,UAAU,OAAe,MAAc,SAAyB;EACvE,IAAI,UAAU,sBACZ,OAAO,EAAE,wCAAwC,EAAE,SAAS,KAAK,CAAC;OAElE,OAAO,EAAE,iCAAiC;GAAE,SAAS;GAAM;EAAQ,CAAC;CAExE;CAEA,OACE,qBAAC,KAAD;EAAK,eAAa;EAAO,IAAI,EAAE,QAAQ,EAAE;EAAzC,UAAA,CACE,oBAAC,YAAD;GAAY,IAAI,EAAE,cAAc,EAAE;GAAG,SAAQ;GAC1C,UAAA,GAAG,MAAM,IAAI,KAAK,OAAO;EAChB,CAAA,GACZ,oBAAC,MAAD,EAAA,UACG,KAAK,KAAK,CAAC,MAAM,aAA+B;GAG/C,MAAM,cAAc,SAAS,uBAAuB,UAAU;GAC9D,OACE,oBAAC,KAAD;IACE,WAAW;IACX,WAAW;IACX,eAAa;IAEb,OAAO,UAAU,OAAO,aAAa,OAAO;IAC5C,eAAe;KACb,YAAY,WAAW;IACzB;GACD,GALM,WAKN;EAEL,CAAC,EACG,CAAA,CACH;;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deprecated.js","names":[],"sources":["../../../src/components/Deprecated/Deprecated.tsx"],"sourcesContent":["import Alert from '@mui/material/Alert';\nimport React from 'react';\n\nexport type Props = {\n message: string;\n};\n\nconst Deprecated: React.FC<Props> = ({ message }) => {\n return (\n // @ts-ignore - Alert does accept children despite the type error\n <Alert severity=\"warning\" sx={{ marginTop: 1, marginBottom: 1 }}>\n {message}\n </Alert>\n );\n};\n\nexport default Deprecated;\n"],"mappings":";;;;;;;AAOA,IAAM,cAA+B,EAAE,cAAc;CACnD,OAEE,iBAAA,GAAA,kBAAA,IAAA,CAAC,oBAAA,SAAD;EAAO,UAAS;EAAU,IAAI;GAAE,WAAW;GAAG,cAAc;EAAE;
|
|
1
|
+
{"version":3,"file":"Deprecated.js","names":[],"sources":["../../../src/components/Deprecated/Deprecated.tsx"],"sourcesContent":["import Alert from '@mui/material/Alert';\nimport React from 'react';\n\nexport type Props = {\n message: string;\n};\n\nconst Deprecated: React.FC<Props> = ({ message }) => {\n return (\n // @ts-ignore - Alert does accept children despite the type error\n <Alert severity=\"warning\" sx={{ marginTop: 1, marginBottom: 1 }}>\n {message}\n </Alert>\n );\n};\n\nexport default Deprecated;\n"],"mappings":";;;;;;;AAOA,IAAM,cAA+B,EAAE,cAAc;CACnD,OAEE,iBAAA,GAAA,kBAAA,IAAA,CAAC,oBAAA,SAAD;EAAO,UAAS;EAAU,IAAI;GAAE,WAAW;GAAG,cAAc;EAAE;EAC3D,UAAA;CACI,CAAA;AAEX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Deprecated.mjs","names":[],"sources":["../../../src/components/Deprecated/Deprecated.tsx"],"sourcesContent":["import Alert from '@mui/material/Alert';\nimport React from 'react';\n\nexport type Props = {\n message: string;\n};\n\nconst Deprecated: React.FC<Props> = ({ message }) => {\n return (\n // @ts-ignore - Alert does accept children despite the type error\n <Alert severity=\"warning\" sx={{ marginTop: 1, marginBottom: 1 }}>\n {message}\n </Alert>\n );\n};\n\nexport default Deprecated;\n"],"mappings":";;;;AAOA,IAAM,cAA+B,EAAE,cAAc;CACnD,OAEE,oBAAC,OAAD;EAAO,UAAS;EAAU,IAAI;GAAE,WAAW;GAAG,cAAc;EAAE;
|
|
1
|
+
{"version":3,"file":"Deprecated.mjs","names":[],"sources":["../../../src/components/Deprecated/Deprecated.tsx"],"sourcesContent":["import Alert from '@mui/material/Alert';\nimport React from 'react';\n\nexport type Props = {\n message: string;\n};\n\nconst Deprecated: React.FC<Props> = ({ message }) => {\n return (\n // @ts-ignore - Alert does accept children despite the type error\n <Alert severity=\"warning\" sx={{ marginTop: 1, marginBottom: 1 }}>\n {message}\n </Alert>\n );\n};\n\nexport default Deprecated;\n"],"mappings":";;;;AAOA,IAAM,cAA+B,EAAE,cAAc;CACnD,OAEE,oBAAC,OAAD;EAAO,UAAS;EAAU,IAAI;GAAE,WAAW;GAAG,cAAc;EAAE;EAC3D,UAAA;CACI,CAAA;AAEX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Developers.js","names":[],"sources":["../../../src/components/Developers/Developers.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Add from '@mui/icons-material/Add';\nimport Box from '@mui/material/Box';\nimport FabMUI from '@mui/material/Fab';\nimport { common } from '@mui/material/colors';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport type { Theme } from '../../Theme';\nimport Person from '../Person';\nimport type { DeveloperType } from './DeveloperType';\nimport Title from './Title';\nimport getUniqueDeveloperValues from './get-unique-developer-values';\n\nexport const Fab = styled(FabMUI)<{ theme?: Theme }>((props) => ({\n backgroundColor: props.theme.palette.primary.main,\n color: common.white,\n}));\n\ninterface Props {\n type: DeveloperType;\n visibleMax?: number;\n packageMeta: any;\n}\n\nconst StyledBox = styled(Box)({\n '> *': {\n marginRight: 5,\n },\n});\n\nexport const VISIBLE_MAX = 6;\n\nconst Developers: React.FC<Props> = ({ type, visibleMax = VISIBLE_MAX, packageMeta }) => {\n const developers = useMemo(\n () => getUniqueDeveloperValues(packageMeta?.latest[type]),\n [packageMeta, type]\n );\n\n const [visibleDevelopersMax, setVisibleDevelopersMax] = useState(visibleMax);\n const [visibleDevelopers, setVisibleDevelopers] = useState(developers);\n\n useEffect(() => {\n if (!developers.length) {\n return;\n }\n\n setVisibleDevelopers(developers.slice(0, visibleDevelopersMax));\n }, [developers, visibleDevelopersMax]);\n\n const handleSetVisibleDevelopersMax = useCallback(() => {\n setVisibleDevelopersMax(visibleDevelopersMax + VISIBLE_MAX);\n }, [visibleDevelopersMax]);\n\n if (!visibleDevelopers || !developers.length) {\n return null;\n }\n\n const { name: packageName, version } = packageMeta.latest;\n\n return (\n <>\n <Title type={type} />\n <StyledBox display=\"flex\" flexWrap=\"wrap\" margin=\"10px 0 10px 0\">\n {visibleDevelopers.map((visibleDeveloper, index) => {\n return (\n <Person\n key={index}\n packageName={packageName}\n person={visibleDeveloper}\n version={version}\n />\n );\n })}\n {visibleDevelopersMax < developers.length && (\n <Fab data-testid={'fab-add'} onClick={handleSetVisibleDevelopersMax} size=\"small\">\n <Add />\n </Fab>\n )}\n </StyledBox>\n </>\n );\n};\n\nexport default Developers;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAaA,IAAa,OAAA,
|
|
1
|
+
{"version":3,"file":"Developers.js","names":[],"sources":["../../../src/components/Developers/Developers.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Add from '@mui/icons-material/Add';\nimport Box from '@mui/material/Box';\nimport FabMUI from '@mui/material/Fab';\nimport { common } from '@mui/material/colors';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport type { Theme } from '../../Theme';\nimport Person from '../Person';\nimport type { DeveloperType } from './DeveloperType';\nimport Title from './Title';\nimport getUniqueDeveloperValues from './get-unique-developer-values';\n\nexport const Fab = styled(FabMUI)<{ theme?: Theme }>((props) => ({\n backgroundColor: props.theme.palette.primary.main,\n color: common.white,\n}));\n\ninterface Props {\n type: DeveloperType;\n visibleMax?: number;\n packageMeta: any;\n}\n\nconst StyledBox = styled(Box)({\n '> *': {\n marginRight: 5,\n },\n});\n\nexport const VISIBLE_MAX = 6;\n\nconst Developers: React.FC<Props> = ({ type, visibleMax = VISIBLE_MAX, packageMeta }) => {\n const developers = useMemo(\n () => getUniqueDeveloperValues(packageMeta?.latest[type]),\n [packageMeta, type]\n );\n\n const [visibleDevelopersMax, setVisibleDevelopersMax] = useState(visibleMax);\n const [visibleDevelopers, setVisibleDevelopers] = useState(developers);\n\n useEffect(() => {\n if (!developers.length) {\n return;\n }\n\n setVisibleDevelopers(developers.slice(0, visibleDevelopersMax));\n }, [developers, visibleDevelopersMax]);\n\n const handleSetVisibleDevelopersMax = useCallback(() => {\n setVisibleDevelopersMax(visibleDevelopersMax + VISIBLE_MAX);\n }, [visibleDevelopersMax]);\n\n if (!visibleDevelopers || !developers.length) {\n return null;\n }\n\n const { name: packageName, version } = packageMeta.latest;\n\n return (\n <>\n <Title type={type} />\n <StyledBox display=\"flex\" flexWrap=\"wrap\" margin=\"10px 0 10px 0\">\n {visibleDevelopers.map((visibleDeveloper, index) => {\n return (\n <Person\n key={index}\n packageName={packageName}\n person={visibleDeveloper}\n version={version}\n />\n );\n })}\n {visibleDevelopersMax < developers.length && (\n <Fab data-testid={'fab-add'} onClick={handleSetVisibleDevelopersMax} size=\"small\">\n <Add />\n </Fab>\n )}\n </StyledBox>\n </>\n );\n};\n\nexport default Developers;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAaA,IAAa,OAAA,GAAM,gBAAA,QAAA,CAAO,kBAAA,OAAM,CAAC,EAAqB,WAAW;CAC/D,iBAAiB,MAAM,MAAM,QAAQ,QAAQ;CAC7C,OAAO,qBAAA,OAAO;AAChB,EAAE;AAQF,IAAM,aAAA,GAAY,gBAAA,QAAA,CAAO,kBAAA,OAAG,CAAC,CAAC,EAC5B,OAAO,EACL,aAAa,EACf,EACF,CAAC;AAID,IAAM,cAA+B,EAAE,MAAM,aAAA,GAA0B,kBAAkB;CACvF,MAAM,cAAA,GAAa,MAAA,QAAA,OACX,oCAAA,QAAyB,aAAa,OAAO,KAAK,GACxD,CAAC,aAAa,IAAI,CACpB;CAEA,MAAM,CAAC,sBAAsB,4BAAA,GAA2B,MAAA,SAAA,CAAS,UAAU;CAC3E,MAAM,CAAC,mBAAmB,yBAAA,GAAwB,MAAA,SAAA,CAAS,UAAU;CAErE,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,IAAI,CAAC,WAAW,QACd;EAGF,qBAAqB,WAAW,MAAM,GAAG,oBAAoB,CAAC;CAChE,GAAG,CAAC,YAAY,oBAAoB,CAAC;CAErC,MAAM,iCAAA,GAAgC,MAAA,YAAA,OAAkB;EACtD,wBAAwB,uBAAA,CAAkC;CAC5D,GAAG,CAAC,oBAAoB,CAAC;CAEzB,IAAI,CAAC,qBAAqB,CAAC,WAAW,QACpC,OAAO;CAGT,MAAM,EAAE,MAAM,aAAa,YAAY,YAAY;CAEnD,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,cAAA,SAAD,EAAa,KAAO,CAAA,GACpB,iBAAA,GAAA,kBAAA,KAAA,CAAC,WAAD;EAAW,SAAQ;EAAO,UAAS;EAAO,QAAO;EAAjD,UAAA,CACG,kBAAkB,KAAK,kBAAkB,UAAU;GAClD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAA,SAAD;IAEe;IACb,QAAQ;IACC;GACV,GAJM,KAIN;EAEL,CAAC,GACA,uBAAuB,WAAW,UACjC,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;GAAK,eAAa;GAAW,SAAS;GAA+B,MAAK;GACxE,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,wBAAA,SAAD,CAAM,CAAA;EACH,CAAA,CAEE;CACX,CAAA,CAAA,EAAA,CAAA;AAEN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Developers.mjs","names":[],"sources":["../../../src/components/Developers/Developers.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Add from '@mui/icons-material/Add';\nimport Box from '@mui/material/Box';\nimport FabMUI from '@mui/material/Fab';\nimport { common } from '@mui/material/colors';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport type { Theme } from '../../Theme';\nimport Person from '../Person';\nimport type { DeveloperType } from './DeveloperType';\nimport Title from './Title';\nimport getUniqueDeveloperValues from './get-unique-developer-values';\n\nexport const Fab = styled(FabMUI)<{ theme?: Theme }>((props) => ({\n backgroundColor: props.theme.palette.primary.main,\n color: common.white,\n}));\n\ninterface Props {\n type: DeveloperType;\n visibleMax?: number;\n packageMeta: any;\n}\n\nconst StyledBox = styled(Box)({\n '> *': {\n marginRight: 5,\n },\n});\n\nexport const VISIBLE_MAX = 6;\n\nconst Developers: React.FC<Props> = ({ type, visibleMax = VISIBLE_MAX, packageMeta }) => {\n const developers = useMemo(\n () => getUniqueDeveloperValues(packageMeta?.latest[type]),\n [packageMeta, type]\n );\n\n const [visibleDevelopersMax, setVisibleDevelopersMax] = useState(visibleMax);\n const [visibleDevelopers, setVisibleDevelopers] = useState(developers);\n\n useEffect(() => {\n if (!developers.length) {\n return;\n }\n\n setVisibleDevelopers(developers.slice(0, visibleDevelopersMax));\n }, [developers, visibleDevelopersMax]);\n\n const handleSetVisibleDevelopersMax = useCallback(() => {\n setVisibleDevelopersMax(visibleDevelopersMax + VISIBLE_MAX);\n }, [visibleDevelopersMax]);\n\n if (!visibleDevelopers || !developers.length) {\n return null;\n }\n\n const { name: packageName, version } = packageMeta.latest;\n\n return (\n <>\n <Title type={type} />\n <StyledBox display=\"flex\" flexWrap=\"wrap\" margin=\"10px 0 10px 0\">\n {visibleDevelopers.map((visibleDeveloper, index) => {\n return (\n <Person\n key={index}\n packageName={packageName}\n person={visibleDeveloper}\n version={version}\n />\n );\n })}\n {visibleDevelopersMax < developers.length && (\n <Fab data-testid={'fab-add'} onClick={handleSetVisibleDevelopersMax} size=\"small\">\n <Add />\n </Fab>\n )}\n </StyledBox>\n </>\n );\n};\n\nexport default Developers;\n"],"mappings":";;;;;;;;;;;;AAaA,IAAa,MAAM,OAAO,MAAM,CAAC,EAAqB,WAAW;CAC/D,iBAAiB,MAAM,MAAM,QAAQ,QAAQ;CAC7C,OAAO,OAAO;AAChB,EAAE;AAQF,IAAM,YAAY,OAAO,GAAG,CAAC,CAAC,EAC5B,OAAO,EACL,aAAa,EACf,EACF,CAAC;AAID,IAAM,cAA+B,EAAE,MAAM,aAAA,GAA0B,kBAAkB;CACvF,MAAM,aAAa,cACX,yBAAyB,aAAa,OAAO,KAAK,GACxD,CAAC,aAAa,IAAI,CACpB;CAEA,MAAM,CAAC,sBAAsB,2BAA2B,SAAS,UAAU;CAC3E,MAAM,CAAC,mBAAmB,wBAAwB,SAAS,UAAU;CAErE,gBAAgB;EACd,IAAI,CAAC,WAAW,QACd;EAGF,qBAAqB,WAAW,MAAM,GAAG,oBAAoB,CAAC;CAChE,GAAG,CAAC,YAAY,oBAAoB,CAAC;CAErC,MAAM,gCAAgC,kBAAkB;EACtD,wBAAwB,uBAAA,CAAkC;CAC5D,GAAG,CAAC,oBAAoB,CAAC;CAEzB,IAAI,CAAC,qBAAqB,CAAC,WAAW,QACpC,OAAO;CAGT,MAAM,EAAE,MAAM,aAAa,YAAY,YAAY;CAEnD,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,OAAD,EAAa,KAAO,CAAA,GACpB,qBAAC,WAAD;EAAW,SAAQ;EAAO,UAAS;EAAO,QAAO;
|
|
1
|
+
{"version":3,"file":"Developers.mjs","names":[],"sources":["../../../src/components/Developers/Developers.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Add from '@mui/icons-material/Add';\nimport Box from '@mui/material/Box';\nimport FabMUI from '@mui/material/Fab';\nimport { common } from '@mui/material/colors';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport type { Theme } from '../../Theme';\nimport Person from '../Person';\nimport type { DeveloperType } from './DeveloperType';\nimport Title from './Title';\nimport getUniqueDeveloperValues from './get-unique-developer-values';\n\nexport const Fab = styled(FabMUI)<{ theme?: Theme }>((props) => ({\n backgroundColor: props.theme.palette.primary.main,\n color: common.white,\n}));\n\ninterface Props {\n type: DeveloperType;\n visibleMax?: number;\n packageMeta: any;\n}\n\nconst StyledBox = styled(Box)({\n '> *': {\n marginRight: 5,\n },\n});\n\nexport const VISIBLE_MAX = 6;\n\nconst Developers: React.FC<Props> = ({ type, visibleMax = VISIBLE_MAX, packageMeta }) => {\n const developers = useMemo(\n () => getUniqueDeveloperValues(packageMeta?.latest[type]),\n [packageMeta, type]\n );\n\n const [visibleDevelopersMax, setVisibleDevelopersMax] = useState(visibleMax);\n const [visibleDevelopers, setVisibleDevelopers] = useState(developers);\n\n useEffect(() => {\n if (!developers.length) {\n return;\n }\n\n setVisibleDevelopers(developers.slice(0, visibleDevelopersMax));\n }, [developers, visibleDevelopersMax]);\n\n const handleSetVisibleDevelopersMax = useCallback(() => {\n setVisibleDevelopersMax(visibleDevelopersMax + VISIBLE_MAX);\n }, [visibleDevelopersMax]);\n\n if (!visibleDevelopers || !developers.length) {\n return null;\n }\n\n const { name: packageName, version } = packageMeta.latest;\n\n return (\n <>\n <Title type={type} />\n <StyledBox display=\"flex\" flexWrap=\"wrap\" margin=\"10px 0 10px 0\">\n {visibleDevelopers.map((visibleDeveloper, index) => {\n return (\n <Person\n key={index}\n packageName={packageName}\n person={visibleDeveloper}\n version={version}\n />\n );\n })}\n {visibleDevelopersMax < developers.length && (\n <Fab data-testid={'fab-add'} onClick={handleSetVisibleDevelopersMax} size=\"small\">\n <Add />\n </Fab>\n )}\n </StyledBox>\n </>\n );\n};\n\nexport default Developers;\n"],"mappings":";;;;;;;;;;;;AAaA,IAAa,MAAM,OAAO,MAAM,CAAC,EAAqB,WAAW;CAC/D,iBAAiB,MAAM,MAAM,QAAQ,QAAQ;CAC7C,OAAO,OAAO;AAChB,EAAE;AAQF,IAAM,YAAY,OAAO,GAAG,CAAC,CAAC,EAC5B,OAAO,EACL,aAAa,EACf,EACF,CAAC;AAID,IAAM,cAA+B,EAAE,MAAM,aAAA,GAA0B,kBAAkB;CACvF,MAAM,aAAa,cACX,yBAAyB,aAAa,OAAO,KAAK,GACxD,CAAC,aAAa,IAAI,CACpB;CAEA,MAAM,CAAC,sBAAsB,2BAA2B,SAAS,UAAU;CAC3E,MAAM,CAAC,mBAAmB,wBAAwB,SAAS,UAAU;CAErE,gBAAgB;EACd,IAAI,CAAC,WAAW,QACd;EAGF,qBAAqB,WAAW,MAAM,GAAG,oBAAoB,CAAC;CAChE,GAAG,CAAC,YAAY,oBAAoB,CAAC;CAErC,MAAM,gCAAgC,kBAAkB;EACtD,wBAAwB,uBAAA,CAAkC;CAC5D,GAAG,CAAC,oBAAoB,CAAC;CAEzB,IAAI,CAAC,qBAAqB,CAAC,WAAW,QACpC,OAAO;CAGT,MAAM,EAAE,MAAM,aAAa,YAAY,YAAY;CAEnD,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,OAAD,EAAa,KAAO,CAAA,GACpB,qBAAC,WAAD;EAAW,SAAQ;EAAO,UAAS;EAAO,QAAO;EAAjD,UAAA,CACG,kBAAkB,KAAK,kBAAkB,UAAU;GAClD,OACE,oBAAC,QAAD;IAEe;IACb,QAAQ;IACC;GACV,GAJM,KAIN;EAEL,CAAC,GACA,uBAAuB,WAAW,UACjC,oBAAC,KAAD;GAAK,eAAa;GAAW,SAAS;GAA+B,MAAK;GACxE,UAAA,oBAAC,KAAD,CAAM,CAAA;EACH,CAAA,CAEE;CACX,CAAA,CAAA,EAAA,CAAA;AAEN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.js","names":[],"sources":["../../../src/components/Developers/Title.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Typography from '@mui/material/Typography';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { DeveloperType } from './';\n\ninterface Props {\n type: DeveloperType;\n}\n\nconst Title: React.FC<Props> = ({ type }) => {\n const { t } = useTranslation();\n switch (type) {\n case DeveloperType.CONTRIBUTORS:\n return <StyledText variant={'subtitle1'}>{t('sidebar.contributors.title')}</StyledText>;\n case DeveloperType.MAINTAINERS:\n return <StyledText variant={'subtitle1'}>{t('sidebar.maintainers.title')}</StyledText>;\n }\n};\n\nexport default Title;\n\nconst StyledText = styled(Typography)<{ theme?: Theme }>(({ theme }) => ({\n fontWeight: theme.fontWeight.bold,\n marginBottom: '10px',\n}));\n"],"mappings":";;;;;;;;;;;;AAYA,IAAM,SAA0B,EAAE,WAAW;CAC3C,MAAM,EAAE,OAAA,
|
|
1
|
+
{"version":3,"file":"Title.js","names":[],"sources":["../../../src/components/Developers/Title.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Typography from '@mui/material/Typography';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { DeveloperType } from './';\n\ninterface Props {\n type: DeveloperType;\n}\n\nconst Title: React.FC<Props> = ({ type }) => {\n const { t } = useTranslation();\n switch (type) {\n case DeveloperType.CONTRIBUTORS:\n return <StyledText variant={'subtitle1'}>{t('sidebar.contributors.title')}</StyledText>;\n case DeveloperType.MAINTAINERS:\n return <StyledText variant={'subtitle1'}>{t('sidebar.maintainers.title')}</StyledText>;\n }\n};\n\nexport default Title;\n\nconst StyledText = styled(Typography)<{ theme?: Theme }>(({ theme }) => ({\n fontWeight: theme.fontWeight.bold,\n marginBottom: '10px',\n}));\n"],"mappings":";;;;;;;;;;;;AAYA,IAAM,SAA0B,EAAE,WAAW;CAC3C,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAC7B,QAAQ,MAAR;EACE,KAAK,sBAAA,cAAc,cACjB,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD;GAAY,SAAS;GAAc,UAAA,EAAE,4BAA4B;EAAc,CAAA;EACxF,KAAK,sBAAA,cAAc,aACjB,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD;GAAY,SAAS;GAAc,UAAA,EAAE,2BAA2B;EAAc,CAAA;CACzF;AACF;AAIA,IAAM,cAAA,GAAa,gBAAA,QAAA,CAAO,yBAAA,OAAU,CAAC,EAAqB,EAAE,aAAa;CACvE,YAAY,MAAM,WAAW;CAC7B,cAAc;AAChB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.mjs","names":[],"sources":["../../../src/components/Developers/Title.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Typography from '@mui/material/Typography';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { DeveloperType } from './';\n\ninterface Props {\n type: DeveloperType;\n}\n\nconst Title: React.FC<Props> = ({ type }) => {\n const { t } = useTranslation();\n switch (type) {\n case DeveloperType.CONTRIBUTORS:\n return <StyledText variant={'subtitle1'}>{t('sidebar.contributors.title')}</StyledText>;\n case DeveloperType.MAINTAINERS:\n return <StyledText variant={'subtitle1'}>{t('sidebar.maintainers.title')}</StyledText>;\n }\n};\n\nexport default Title;\n\nconst StyledText = styled(Typography)<{ theme?: Theme }>(({ theme }) => ({\n fontWeight: theme.fontWeight.bold,\n marginBottom: '10px',\n}));\n"],"mappings":";;;;;;;;AAYA,IAAM,SAA0B,EAAE,WAAW;CAC3C,MAAM,EAAE,MAAM,eAAe;CAC7B,QAAQ,MAAR;EACE,KAAK,cAAc,cACjB,OAAO,oBAAC,YAAD;GAAY,SAAS;
|
|
1
|
+
{"version":3,"file":"Title.mjs","names":[],"sources":["../../../src/components/Developers/Title.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Typography from '@mui/material/Typography';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../Theme';\nimport { DeveloperType } from './';\n\ninterface Props {\n type: DeveloperType;\n}\n\nconst Title: React.FC<Props> = ({ type }) => {\n const { t } = useTranslation();\n switch (type) {\n case DeveloperType.CONTRIBUTORS:\n return <StyledText variant={'subtitle1'}>{t('sidebar.contributors.title')}</StyledText>;\n case DeveloperType.MAINTAINERS:\n return <StyledText variant={'subtitle1'}>{t('sidebar.maintainers.title')}</StyledText>;\n }\n};\n\nexport default Title;\n\nconst StyledText = styled(Typography)<{ theme?: Theme }>(({ theme }) => ({\n fontWeight: theme.fontWeight.bold,\n marginBottom: '10px',\n}));\n"],"mappings":";;;;;;;;AAYA,IAAM,SAA0B,EAAE,WAAW;CAC3C,MAAM,EAAE,MAAM,eAAe;CAC7B,QAAQ,MAAR;EACE,KAAK,cAAc,cACjB,OAAO,oBAAC,YAAD;GAAY,SAAS;GAAc,UAAA,EAAE,4BAA4B;EAAc,CAAA;EACxF,KAAK,cAAc,aACjB,OAAO,oBAAC,YAAD;GAAY,SAAS;GAAc,UAAA,EAAE,2BAA2B;EAAc,CAAA;CACzF;AACF;AAIA,IAAM,aAAa,OAAO,UAAU,CAAC,EAAqB,EAAE,aAAa;CACvE,YAAY,MAAM,WAAW;CAC7B,cAAc;AAChB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dist.js","names":[],"sources":["../../../src/components/Distribution/Dist.tsx"],"sourcesContent":["import List from '@mui/material/List';\nimport type { FC } from 'react';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { PackageMetaInterface } from '../../types/packageMeta';\nimport { fileSizeSI, formatLicense } from '../../utils/utils';\nimport { DistChips, DistListItem, StyledText } from './styles';\n\nconst DistChip: FC<{ name: string; children?: React.ReactElement | string }> = ({\n name,\n children,\n}) =>\n children ? (\n <DistChips\n label={\n <>\n <b>{name}</b>\n {': '}\n {children}\n </>\n }\n />\n ) : null;\n\nconst Dist: FC<{ packageMeta: PackageMetaInterface }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n\n if (!packageMeta?.latest) {\n return null;\n }\n\n const { dist, license } = packageMeta.latest;\n\n if (!dist && !license) {\n return null;\n }\n\n return (\n <List\n subheader={<StyledText variant=\"subtitle1\">{t('sidebar.distribution.title')}</StyledText>}\n >\n <DistListItem>\n {dist?.fileCount && (\n <DistChip name={t('sidebar.distribution.file-count')}>{`${dist.fileCount}`}</DistChip>\n )}\n {dist?.unpackedSize ? (\n <DistChip name={t('sidebar.distribution.size')}>{fileSizeSI(dist.unpackedSize)}</DistChip>\n ) : null}\n\n <DistChip name={t('sidebar.distribution.license')}>{formatLicense(license)}</DistChip>\n </DistListItem>\n </List>\n );\n};\n\nexport default Dist;\n"],"mappings":";;;;;;;;;;AASA,IAAM,YAA0E,EAC9E,MACA,eAEA,WACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAA,WAAD,EACE,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA;CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD,EAAA,UAAI,KAAQ,CAAA;CACX;CACA;AACD,EAAA,CAAA,EAEL,CAAA,IACC;AAEN,IAAM,QAAmD,EAAE,kBAAkB;CAC3E,MAAM,EAAE,OAAA,
|
|
1
|
+
{"version":3,"file":"Dist.js","names":[],"sources":["../../../src/components/Distribution/Dist.tsx"],"sourcesContent":["import List from '@mui/material/List';\nimport type { FC } from 'react';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { PackageMetaInterface } from '../../types/packageMeta';\nimport { fileSizeSI, formatLicense } from '../../utils/utils';\nimport { DistChips, DistListItem, StyledText } from './styles';\n\nconst DistChip: FC<{ name: string; children?: React.ReactElement | string }> = ({\n name,\n children,\n}) =>\n children ? (\n <DistChips\n label={\n <>\n <b>{name}</b>\n {': '}\n {children}\n </>\n }\n />\n ) : null;\n\nconst Dist: FC<{ packageMeta: PackageMetaInterface }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n\n if (!packageMeta?.latest) {\n return null;\n }\n\n const { dist, license } = packageMeta.latest;\n\n if (!dist && !license) {\n return null;\n }\n\n return (\n <List\n subheader={<StyledText variant=\"subtitle1\">{t('sidebar.distribution.title')}</StyledText>}\n >\n <DistListItem>\n {dist?.fileCount && (\n <DistChip name={t('sidebar.distribution.file-count')}>{`${dist.fileCount}`}</DistChip>\n )}\n {dist?.unpackedSize ? (\n <DistChip name={t('sidebar.distribution.size')}>{fileSizeSI(dist.unpackedSize)}</DistChip>\n ) : null}\n\n <DistChip name={t('sidebar.distribution.license')}>{formatLicense(license)}</DistChip>\n </DistListItem>\n </List>\n );\n};\n\nexport default Dist;\n"],"mappings":";;;;;;;;;;AASA,IAAM,YAA0E,EAC9E,MACA,eAEA,WACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAA,WAAD,EACE,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA;CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD,EAAA,UAAI,KAAQ,CAAA;CACX;CACA;AACD,EAAA,CAAA,EAEL,CAAA,IACC;AAEN,IAAM,QAAmD,EAAE,kBAAkB;CAC3E,MAAM,EAAE,OAAA,GAAM,cAAA,eAAA,CAAe;CAE7B,IAAI,CAAC,aAAa,QAChB,OAAO;CAGT,MAAM,EAAE,MAAM,YAAY,YAAY;CAEtC,IAAI,CAAC,QAAQ,CAAC,SACZ,OAAO;CAGT,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,mBAAA,SAAD;EACE,WAAW,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAA,YAAD;GAAY,SAAQ;GAAa,UAAA,EAAE,4BAA4B;EAAc,CAAA;EAExF,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,eAAA,cAAD,EAAA,UAAA;GACG,MAAM,aACL,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;IAAU,MAAM,EAAE,iCAAiC;IAAI,UAAA,GAAG,KAAK;GAAsB,CAAA;GAEtF,MAAM,eACL,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;IAAU,MAAM,EAAE,2BAA2B;IAAI,UAAA,cAAA,WAAW,KAAK,YAAY;GAAY,CAAA,IACvF;GAEJ,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;IAAU,MAAM,EAAE,8BAA8B;IAAI,UAAA,cAAA,cAAc,OAAO;GAAY,CAAA;EACzE,EAAA,CAAA;CACV,CAAA;AAEV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dist.mjs","names":[],"sources":["../../../src/components/Distribution/Dist.tsx"],"sourcesContent":["import List from '@mui/material/List';\nimport type { FC } from 'react';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { PackageMetaInterface } from '../../types/packageMeta';\nimport { fileSizeSI, formatLicense } from '../../utils/utils';\nimport { DistChips, DistListItem, StyledText } from './styles';\n\nconst DistChip: FC<{ name: string; children?: React.ReactElement | string }> = ({\n name,\n children,\n}) =>\n children ? (\n <DistChips\n label={\n <>\n <b>{name}</b>\n {': '}\n {children}\n </>\n }\n />\n ) : null;\n\nconst Dist: FC<{ packageMeta: PackageMetaInterface }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n\n if (!packageMeta?.latest) {\n return null;\n }\n\n const { dist, license } = packageMeta.latest;\n\n if (!dist && !license) {\n return null;\n }\n\n return (\n <List\n subheader={<StyledText variant=\"subtitle1\">{t('sidebar.distribution.title')}</StyledText>}\n >\n <DistListItem>\n {dist?.fileCount && (\n <DistChip name={t('sidebar.distribution.file-count')}>{`${dist.fileCount}`}</DistChip>\n )}\n {dist?.unpackedSize ? (\n <DistChip name={t('sidebar.distribution.size')}>{fileSizeSI(dist.unpackedSize)}</DistChip>\n ) : null}\n\n <DistChip name={t('sidebar.distribution.license')}>{formatLicense(license)}</DistChip>\n </DistListItem>\n </List>\n );\n};\n\nexport default Dist;\n"],"mappings":";;;;;;;AASA,IAAM,YAA0E,EAC9E,MACA,eAEA,WACE,oBAAC,WAAD,EACE,OACE,qBAAA,YAAA,EAAA,UAAA;CACE,oBAAC,KAAD,EAAA,UAAI,KAAQ,CAAA;CACX;CACA;AACD,EAAA,CAAA,EAEL,CAAA,IACC;AAEN,IAAM,QAAmD,EAAE,kBAAkB;CAC3E,MAAM,EAAE,MAAM,eAAe;CAE7B,IAAI,CAAC,aAAa,QAChB,OAAO;CAGT,MAAM,EAAE,MAAM,YAAY,YAAY;CAEtC,IAAI,CAAC,QAAQ,CAAC,SACZ,OAAO;CAGT,OACE,oBAAC,MAAD;EACE,WAAW,oBAAC,YAAD;GAAY,SAAQ;
|
|
1
|
+
{"version":3,"file":"Dist.mjs","names":[],"sources":["../../../src/components/Distribution/Dist.tsx"],"sourcesContent":["import List from '@mui/material/List';\nimport type { FC } from 'react';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { PackageMetaInterface } from '../../types/packageMeta';\nimport { fileSizeSI, formatLicense } from '../../utils/utils';\nimport { DistChips, DistListItem, StyledText } from './styles';\n\nconst DistChip: FC<{ name: string; children?: React.ReactElement | string }> = ({\n name,\n children,\n}) =>\n children ? (\n <DistChips\n label={\n <>\n <b>{name}</b>\n {': '}\n {children}\n </>\n }\n />\n ) : null;\n\nconst Dist: FC<{ packageMeta: PackageMetaInterface }> = ({ packageMeta }) => {\n const { t } = useTranslation();\n\n if (!packageMeta?.latest) {\n return null;\n }\n\n const { dist, license } = packageMeta.latest;\n\n if (!dist && !license) {\n return null;\n }\n\n return (\n <List\n subheader={<StyledText variant=\"subtitle1\">{t('sidebar.distribution.title')}</StyledText>}\n >\n <DistListItem>\n {dist?.fileCount && (\n <DistChip name={t('sidebar.distribution.file-count')}>{`${dist.fileCount}`}</DistChip>\n )}\n {dist?.unpackedSize ? (\n <DistChip name={t('sidebar.distribution.size')}>{fileSizeSI(dist.unpackedSize)}</DistChip>\n ) : null}\n\n <DistChip name={t('sidebar.distribution.license')}>{formatLicense(license)}</DistChip>\n </DistListItem>\n </List>\n );\n};\n\nexport default Dist;\n"],"mappings":";;;;;;;AASA,IAAM,YAA0E,EAC9E,MACA,eAEA,WACE,oBAAC,WAAD,EACE,OACE,qBAAA,YAAA,EAAA,UAAA;CACE,oBAAC,KAAD,EAAA,UAAI,KAAQ,CAAA;CACX;CACA;AACD,EAAA,CAAA,EAEL,CAAA,IACC;AAEN,IAAM,QAAmD,EAAE,kBAAkB;CAC3E,MAAM,EAAE,MAAM,eAAe;CAE7B,IAAI,CAAC,aAAa,QAChB,OAAO;CAGT,MAAM,EAAE,MAAM,YAAY,YAAY;CAEtC,IAAI,CAAC,QAAQ,CAAC,SACZ,OAAO;CAGT,OACE,oBAAC,MAAD;EACE,WAAW,oBAAC,YAAD;GAAY,SAAQ;GAAa,UAAA,EAAE,4BAA4B;EAAc,CAAA;EAExF,UAAA,qBAAC,cAAD,EAAA,UAAA;GACG,MAAM,aACL,oBAAC,UAAD;IAAU,MAAM,EAAE,iCAAiC;IAAI,UAAA,GAAG,KAAK;GAAsB,CAAA;GAEtF,MAAM,eACL,oBAAC,UAAD;IAAU,MAAM,EAAE,2BAA2B;IAAI,UAAA,WAAW,KAAK,YAAY;GAAY,CAAA,IACvF;GAEJ,oBAAC,UAAD;IAAU,MAAM,EAAE,8BAA8B;IAAI,UAAA,cAAc,OAAO;GAAY,CAAA;EACzE,EAAA,CAAA;CACV,CAAA;AAEV"}
|