@verdaccio/ui-components 5.0.0-next-9.0 → 5.0.0-next-9.2
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/ResetStyles.js +28 -47
- package/build/Theme/ResetStyles.js.map +1 -1
- package/build/Theme/StyleBaseline.js +9 -14
- package/build/Theme/StyleBaseline.js.map +1 -1
- package/build/Theme/ThemeProvider.js +31 -56
- package/build/Theme/ThemeProvider.js.map +1 -1
- package/build/Theme/colors.js +15 -18
- package/build/Theme/colors.js.map +1 -1
- package/build/Theme/index.js +5 -58
- package/build/Theme/modes.js +25 -38
- package/build/Theme/modes.js.map +1 -1
- package/build/Theme/theme.js +18 -31
- package/build/Theme/theme.js.map +1 -1
- package/build/Theme/tokens.js +28 -33
- package/build/Theme/tokens.js.map +1 -1
- package/build/_virtual/_rolldown/runtime.js +11 -0
- package/build/api/use-data-mutation.js +38 -95
- package/build/api/use-data-mutation.js.map +1 -1
- package/build/api/use-data.js +17 -33
- package/build/api/use-data.js.map +1 -1
- package/build/components/ActionBar/ActionBar.js +45 -86
- package/build/components/ActionBar/ActionBar.js.map +1 -1
- package/build/components/ActionBar/ActionBarAction.js +79 -107
- package/build/components/ActionBar/ActionBarAction.js.map +1 -1
- package/build/components/ActionBar/index.js +1 -14
- package/build/components/AppRoute/AppRoute.js +65 -87
- package/build/components/AppRoute/AppRoute.js.map +1 -1
- package/build/components/Author/Author.js +30 -41
- package/build/components/Author/Author.js.map +1 -1
- package/build/components/Author/index.js +1 -14
- package/build/components/Author/styles.js +21 -31
- package/build/components/Author/styles.js.map +1 -1
- package/build/components/CopyClipboard/CopyToClipBoard.js +52 -67
- package/build/components/CopyClipboard/CopyToClipBoard.js.map +1 -1
- package/build/components/CopyClipboard/index.js +2 -21
- package/build/components/CopyClipboard/utils.d.ts +1 -1
- package/build/components/CopyClipboard/utils.js +6 -13
- package/build/components/CopyClipboard/utils.js.map +1 -1
- package/build/components/Dependencies/Dependencies.js +36 -80
- package/build/components/Dependencies/Dependencies.js.map +1 -1
- package/build/components/Dependencies/DependencyBlock.d.ts +3 -3
- package/build/components/Dependencies/DependencyBlock.js +62 -108
- package/build/components/Dependencies/DependencyBlock.js.map +1 -1
- package/build/components/Dependencies/index.js +2 -14
- package/build/components/Dependencies/utits.js +6 -8
- package/build/components/Dependencies/utits.js.map +1 -1
- package/build/components/Deprecated/Deprecated.js +14 -23
- package/build/components/Deprecated/Deprecated.js.map +1 -1
- package/build/components/Deprecated/index.js +1 -14
- package/build/components/Developers/DeveloperType.js +6 -10
- package/build/components/Developers/DeveloperType.js.map +1 -1
- package/build/components/Developers/Developers.js +57 -98
- package/build/components/Developers/Developers.js.map +1 -1
- package/build/components/Developers/Title.js +29 -39
- package/build/components/Developers/Title.js.map +1 -1
- package/build/components/Developers/get-unique-developer-values.js +6 -22
- package/build/components/Developers/get-unique-developer-values.js.map +1 -1
- package/build/components/Developers/index.js +2 -21
- package/build/components/Distribution/Dist.js +38 -44
- package/build/components/Distribution/Dist.js.map +1 -1
- package/build/components/Distribution/index.js +1 -14
- package/build/components/Distribution/styles.js +33 -44
- package/build/components/Distribution/styles.js.map +1 -1
- package/build/components/Engines/Engines.js +66 -88
- package/build/components/Engines/Engines.js.map +1 -1
- package/build/components/Engines/index.js +1 -14
- package/build/components/Engines/styles.js +24 -32
- package/build/components/Engines/styles.js.map +1 -1
- package/build/components/ErrorBoundary/ErrorBoundary.js +27 -66
- package/build/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/build/components/ErrorBoundary/index.js +1 -14
- package/build/components/Forbidden/Forbidden.js +62 -71
- package/build/components/Forbidden/Forbidden.js.map +1 -1
- package/build/components/Forbidden/index.js +1 -14
- package/build/components/FundButton/FundButton.js +52 -73
- package/build/components/FundButton/FundButton.js.map +1 -1
- package/build/components/FundButton/index.js +1 -14
- package/build/components/HeaderInfoDialog/HeaderInfoDialog.js +62 -88
- package/build/components/HeaderInfoDialog/HeaderInfoDialog.js.map +1 -1
- package/build/components/HeaderInfoDialog/index.js +1 -14
- package/build/components/Heading/Heading.d.ts +1 -1
- package/build/components/Heading/Heading.js +13 -23
- package/build/components/Heading/Heading.js.map +1 -1
- package/build/components/Heading/index.js +1 -14
- package/build/components/Help/Help.js +55 -55
- package/build/components/Help/Help.js.map +1 -1
- package/build/components/Help/index.js +1 -14
- package/build/components/Help/styles.js +17 -20
- package/build/components/Help/styles.js.map +1 -1
- package/build/components/Icons/DevsIcons/CommonJS2.js +16 -0
- package/build/components/Icons/DevsIcons/CommonJS2.js.map +1 -0
- package/build/components/Icons/DevsIcons/ES6Module2.js +16 -0
- package/build/components/Icons/DevsIcons/ES6Module2.js.map +1 -0
- package/build/components/Icons/DevsIcons/Git2.js +16 -0
- package/build/components/Icons/DevsIcons/Git2.js.map +1 -0
- package/build/components/Icons/DevsIcons/NodeJS2.js +16 -0
- package/build/components/Icons/DevsIcons/NodeJS2.js.map +1 -0
- package/build/components/Icons/DevsIcons/TypeScript2.js +16 -0
- package/build/components/Icons/DevsIcons/TypeScript2.js.map +1 -0
- package/build/components/Icons/DevsIcons/commonjs.js +6 -0
- package/build/components/Icons/DevsIcons/commonjs.js.map +1 -0
- package/build/components/Icons/DevsIcons/es6module.js +6 -0
- package/build/components/Icons/DevsIcons/es6module.js.map +1 -0
- package/build/components/Icons/DevsIcons/git.js +6 -0
- package/build/components/Icons/DevsIcons/git.js.map +1 -0
- package/build/components/Icons/DevsIcons/index.js +5 -41
- package/build/components/Icons/DevsIcons/nodejs.js +6 -0
- package/build/components/Icons/DevsIcons/nodejs.js.map +1 -0
- package/build/components/Icons/DevsIcons/typescript.js +6 -0
- package/build/components/Icons/DevsIcons/typescript.js.map +1 -0
- package/build/components/Icons/Earth.js +39 -42
- package/build/components/Icons/Earth.js.map +1 -1
- package/build/components/Icons/FileBinary.js +15 -24
- package/build/components/Icons/FileBinary.js.map +1 -1
- package/build/components/Icons/Law.js +18 -25
- package/build/components/Icons/Law.js.map +1 -1
- package/build/components/Icons/License.js +15 -26
- package/build/components/Icons/License.js.map +1 -1
- package/build/components/Icons/Managers/Npm2.js +16 -0
- package/build/components/Icons/Managers/Npm2.js.map +1 -0
- package/build/components/Icons/Managers/Pnpm2.js +16 -0
- package/build/components/Icons/Managers/Pnpm2.js.map +1 -0
- package/build/components/Icons/Managers/Yarn2.js +16 -0
- package/build/components/Icons/Managers/Yarn2.js.map +1 -0
- package/build/components/Icons/Managers/index.js +3 -27
- package/build/components/Icons/Managers/npm.js +6 -0
- package/build/components/Icons/Managers/npm.js.map +1 -0
- package/build/components/Icons/Managers/pnpm.js +6 -0
- package/build/components/Icons/Managers/pnpm.js.map +1 -0
- package/build/components/Icons/Managers/yarn.js +6 -0
- package/build/components/Icons/Managers/yarn.js.map +1 -0
- package/build/components/Icons/SvgIcon.d.ts +2 -6
- package/build/components/Icons/SvgIcon.js +24 -53
- package/build/components/Icons/SvgIcon.js.map +1 -1
- package/build/components/Icons/Time.js +22 -29
- package/build/components/Icons/Time.js.map +1 -1
- package/build/components/Icons/Version.js +20 -27
- package/build/components/Icons/Version.js.map +1 -1
- package/build/components/Icons/index.js +36 -78
- package/build/components/Icons/index.js.map +1 -1
- package/build/components/Install/Install.js +58 -74
- package/build/components/Install/Install.js.map +1 -1
- package/build/components/Install/InstallListItem.js +91 -120
- package/build/components/Install/InstallListItem.js.map +1 -1
- package/build/components/Install/index.js +1 -14
- package/build/components/Keywords/KeywordListItems.js +25 -34
- package/build/components/Keywords/KeywordListItems.js.map +1 -1
- package/build/components/Keywords/Keywords.js +25 -35
- package/build/components/Keywords/Keywords.js.map +1 -1
- package/build/components/Keywords/index.js +1 -14
- package/build/components/Label/Label.js +18 -37
- package/build/components/Label/Label.js.map +1 -1
- package/build/components/Label/index.js +1 -14
- package/build/components/Link/Link.d.ts +3 -1
- package/build/components/Link/Link.js +32 -40
- package/build/components/Link/Link.js.map +1 -1
- package/build/components/Link/index.js +1 -14
- package/build/components/LinkExternal/LinkExternal.d.ts +3 -1
- package/build/components/LinkExternal/LinkExternal.js +19 -30
- package/build/components/LinkExternal/LinkExternal.js.map +1 -1
- package/build/components/LinkExternal/index.js +1 -14
- package/build/components/Loading/Loading.js +14 -20
- package/build/components/Loading/Loading.js.map +1 -1
- package/build/components/Loading/Spinner/Spinner.js +28 -57
- package/build/components/Loading/Spinner/Spinner.js.map +1 -1
- package/build/components/Loading/Spinner/index.js +1 -14
- package/build/components/Loading/index.js +1 -14
- package/build/components/Loading/styles.d.ts +5 -5
- package/build/components/Loading/styles.js +26 -35
- package/build/components/Loading/styles.js.map +1 -1
- package/build/components/LoginDialog/LoginDialog.js +28 -39
- package/build/components/LoginDialog/LoginDialog.js.map +1 -1
- package/build/components/LoginDialog/LoginDialogCloseButton.js +27 -39
- package/build/components/LoginDialog/LoginDialogCloseButton.js.map +1 -1
- package/build/components/LoginDialog/LoginDialogForm.js +17 -26
- package/build/components/LoginDialog/LoginDialogForm.js.map +1 -1
- package/build/components/LoginDialog/LoginDialogFormError.js +30 -51
- package/build/components/LoginDialog/LoginDialogFormError.js.map +1 -1
- package/build/components/LoginDialog/index.js +1 -14
- package/build/components/LoginForm/Login.js +64 -85
- package/build/components/LoginForm/Login.js.map +1 -1
- package/build/components/LoginForm/PasswordField.js +31 -49
- package/build/components/LoginForm/PasswordField.js.map +1 -1
- package/build/components/LoginForm/UsernameField.js +29 -47
- package/build/components/LoginForm/UsernameField.js.map +1 -1
- package/build/components/LoginForm/styles.js +48 -58
- package/build/components/LoginForm/styles.js.map +1 -1
- package/build/components/LoginForm/useLoginForm.js +32 -64
- package/build/components/LoginForm/useLoginForm.js.map +1 -1
- package/build/components/Logo/Logo.js +66 -87
- package/build/components/Logo/Logo.js.map +1 -1
- package/build/components/Logo/img/logo-black-and-white.js +6 -0
- package/build/components/Logo/img/logo-black-and-white.js.map +1 -0
- package/build/components/Logo/img/logo.js +6 -0
- package/build/components/Logo/img/logo.js.map +1 -0
- package/build/components/Logo/index.js +1 -14
- package/build/components/MenuItem/MenuItem.d.ts +1 -1
- package/build/components/MenuItem/MenuItem.js +25 -39
- package/build/components/MenuItem/MenuItem.js.map +1 -1
- package/build/components/MenuItem/index.js +1 -14
- package/build/components/NoItems/NoItems.js +14 -24
- package/build/components/NoItems/NoItems.js.map +1 -1
- package/build/components/NoItems/index.js +1 -14
- package/build/components/NotFound/NotFound.js +63 -72
- package/build/components/NotFound/NotFound.js.map +1 -1
- package/build/components/NotFound/index.js +1 -14
- package/build/components/Package/Package.js +163 -230
- package/build/components/Package/Package.js.map +1 -1
- package/build/components/Package/index.js +1 -14
- package/build/components/Package/styles.d.ts +18 -18
- package/build/components/Package/styles.js +122 -185
- package/build/components/Package/styles.js.map +1 -1
- package/build/components/PackageList/PackageList.js +63 -92
- package/build/components/PackageList/PackageList.js.map +1 -1
- package/build/components/PackageList/index.js +1 -14
- package/build/components/Person/Person.js +36 -46
- package/build/components/Person/Person.js.map +1 -1
- package/build/components/Person/PersonTooltip.js +24 -21
- package/build/components/Person/PersonTooltip.js.map +1 -1
- package/build/components/Person/index.js +1 -14
- package/build/components/Person/utils.js +11 -14
- package/build/components/Person/utils.js.map +1 -1
- package/build/components/RawViewer/RawViewer.js +53 -64
- package/build/components/RawViewer/RawViewer.js.map +1 -1
- package/build/components/RawViewer/index.js +1 -14
- package/build/components/Readme/Readme.d.ts +2 -0
- package/build/components/Readme/Readme.js +40 -56
- package/build/components/Readme/Readme.js.map +1 -1
- package/build/components/Readme/index.js +1 -14
- package/build/components/Readme/utils.js +22 -27
- package/build/components/Readme/utils.js.map +1 -1
- package/build/components/RegistryInfoDialog/RegistryInfoDialog.js +30 -34
- package/build/components/RegistryInfoDialog/RegistryInfoDialog.js.map +1 -1
- package/build/components/RegistryInfoDialog/index.js +1 -14
- package/build/components/RegistryInfoDialog/styles.d.ts +5 -5
- package/build/components/RegistryInfoDialog/styles.js +22 -47
- package/build/components/RegistryInfoDialog/styles.js.map +1 -1
- package/build/components/Repository/Repository.js +79 -101
- package/build/components/Repository/Repository.js.map +1 -1
- package/build/components/Repository/index.js +1 -14
- package/build/components/Search/AutoComplete/AutoComplete.js +33 -76
- package/build/components/Search/AutoComplete/AutoComplete.js.map +1 -1
- package/build/components/Search/AutoComplete/index.js +1 -14
- package/build/components/Search/AutoComplete/styles.d.ts +2 -2
- package/build/components/Search/AutoComplete/styles.js +16 -19
- package/build/components/Search/AutoComplete/styles.js.map +1 -1
- package/build/components/Search/Search.js +91 -176
- package/build/components/Search/Search.js.map +1 -1
- package/build/components/Search/SearchItem.d.ts +3 -3
- package/build/components/Search/SearchItem.js +102 -144
- package/build/components/Search/SearchItem.js.map +1 -1
- package/build/components/Search/index.js +1 -14
- package/build/components/Search/styles.d.ts +2 -2
- package/build/components/Search/styles.js +29 -56
- package/build/components/Search/styles.js.map +1 -1
- package/build/components/Search/utils.js +13 -20
- package/build/components/Search/utils.js.map +1 -1
- package/build/components/SettingsMenu/SettingsMenu.js +94 -108
- package/build/components/SettingsMenu/SettingsMenu.js.map +1 -1
- package/build/components/SettingsMenu/index.js +1 -14
- package/build/components/SideBarTitle/SideBarTitle.js +65 -99
- package/build/components/SideBarTitle/SideBarTitle.js.map +1 -1
- package/build/components/SideBarTitle/index.js +1 -14
- package/build/components/SideBarTitle/utils.js +10 -16
- package/build/components/SideBarTitle/utils.js.map +1 -1
- package/build/components/UpLinks/UpLinks.js +57 -68
- package/build/components/UpLinks/UpLinks.js.map +1 -1
- package/build/components/UpLinks/UplinkLink.js +17 -19
- package/build/components/UpLinks/UplinkLink.js.map +1 -1
- package/build/components/UpLinks/index.js +2 -14
- package/build/components/UpLinks/styles.d.ts +5 -5
- package/build/components/UpLinks/styles.js +27 -48
- package/build/components/UpLinks/styles.js.map +1 -1
- package/build/components/Versions/HistoryList.js +59 -75
- package/build/components/Versions/HistoryList.js.map +1 -1
- package/build/components/Versions/TagList.js +29 -35
- package/build/components/Versions/TagList.js.map +1 -1
- package/build/components/Versions/Versions.js +76 -121
- package/build/components/Versions/Versions.js.map +1 -1
- package/build/components/Versions/index.js +2 -14
- package/build/components/Versions/styles.d.ts +5 -5
- package/build/components/Versions/styles.js +23 -37
- package/build/components/Versions/styles.js.map +1 -1
- package/build/configuration.js +20 -20
- package/build/configuration.js.map +1 -1
- package/build/dark-logo.png +0 -0
- package/build/favicon.ico +0 -0
- package/build/hooks/index.js +2 -21
- package/build/hooks/useLocalStorage.js +22 -59
- package/build/hooks/useLocalStorage.js.map +1 -1
- package/build/hooks/useOnClickOutside.js +14 -30
- package/build/hooks/useOnClickOutside.js.map +1 -1
- package/build/index.js +118 -483
- package/build/layouts/Security/Dialog.js +17 -25
- package/build/layouts/Security/Dialog.js.map +1 -1
- package/build/layouts/Version/Version.js +28 -28
- package/build/layouts/Version/Version.js.map +1 -1
- package/build/layouts/Version/index.js +1 -14
- package/build/mockServiceWorker.js +335 -0
- package/build/pages/Front/Home.js +6 -7
- package/build/pages/Front/Home.js.map +1 -1
- package/build/pages/Front/index.js +2 -14
- package/build/pages/Security/AddUser.js +6 -7
- package/build/pages/Security/AddUser.js.map +1 -1
- package/build/pages/Security/ChangePassword.js +6 -7
- package/build/pages/Security/ChangePassword.js.map +1 -1
- package/build/pages/Security/Login.js +6 -7
- package/build/pages/Security/Login.js.map +1 -1
- package/build/pages/Security/Success.js +6 -7
- package/build/pages/Security/Success.js.map +1 -1
- package/build/pages/Security/index.js +4 -35
- package/build/pages/Version/Version.js +16 -30
- package/build/pages/Version/Version.js.map +1 -1
- package/build/pages/Version/index.js +2 -14
- package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js +51 -72
- package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js.map +1 -1
- package/build/providers/AppConfigurationProvider/index.js +1 -19
- package/build/providers/AuthProvider/AuthProvider.js +37 -100
- package/build/providers/AuthProvider/AuthProvider.js.map +1 -1
- package/build/providers/AuthProvider/index.js +1 -17
- package/build/providers/AuthProvider/utils.js +19 -24
- package/build/providers/AuthProvider/utils.js.map +1 -1
- package/build/providers/DownloadProvider/DownloadProvider.js +29 -71
- package/build/providers/DownloadProvider/DownloadProvider.js.map +1 -1
- package/build/providers/DownloadProvider/index.js +1 -19
- package/build/providers/ManifestsProvider/ManifestsProvider.js +20 -31
- package/build/providers/ManifestsProvider/ManifestsProvider.js.map +1 -1
- package/build/providers/ManifestsProvider/index.js +1 -21
- package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js +22 -50
- package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js.map +1 -1
- package/build/providers/PersistenceSettingProvider/index.js +1 -19
- package/build/providers/SearchProvider/SearchProvider.js +45 -95
- package/build/providers/SearchProvider/SearchProvider.js.map +1 -1
- package/build/providers/SearchProvider/index.js +1 -25
- package/build/providers/TranslatorProvider/TranslatorProvider.js +33 -71
- package/build/providers/TranslatorProvider/TranslatorProvider.js.map +1 -1
- package/build/providers/TranslatorProvider/index.js +1 -21
- package/build/providers/VersionProvider/VersionProvider.js +42 -57
- package/build/providers/VersionProvider/VersionProvider.js.map +1 -1
- package/build/providers/VersionProvider/index.js +1 -21
- package/build/providers/index.js +16 -94
- package/build/sections/Detail/ContainerContent.js +24 -63
- package/build/sections/Detail/ContainerContent.js.map +1 -1
- package/build/sections/Detail/Detail.js +39 -62
- package/build/sections/Detail/Detail.js.map +1 -1
- package/build/sections/Detail/ReadmeSection.js +8 -18
- package/build/sections/Detail/ReadmeSection.js.map +1 -1
- package/build/sections/Detail/Tabs.js +52 -54
- package/build/sections/Detail/Tabs.js.map +1 -1
- package/build/sections/Detail/index.js +1 -14
- package/build/sections/Footer/Footer.js +94 -137
- package/build/sections/Footer/Footer.js.map +1 -1
- package/build/sections/Footer/index.js +1 -14
- package/build/sections/Footer/styles.d.ts +16 -16
- package/build/sections/Footer/styles.js +58 -89
- package/build/sections/Footer/styles.js.map +1 -1
- package/build/sections/Header/Header.js +89 -144
- package/build/sections/Header/Header.js.map +1 -1
- package/build/sections/Header/HeaderGreetings.js +17 -21
- package/build/sections/Header/HeaderGreetings.js.map +1 -1
- package/build/sections/Header/HeaderLeft.js +31 -32
- package/build/sections/Header/HeaderLeft.js.map +1 -1
- package/build/sections/Header/HeaderMenu.js +43 -50
- package/build/sections/Header/HeaderMenu.js.map +1 -1
- package/build/sections/Header/HeaderRight.js +76 -119
- package/build/sections/Header/HeaderRight.js.map +1 -1
- package/build/sections/Header/HeaderSettingsDialog.js +91 -107
- package/build/sections/Header/HeaderSettingsDialog.js.map +1 -1
- package/build/sections/Header/HeaderToolTip.js +10 -17
- package/build/sections/Header/HeaderToolTip.js.map +1 -1
- package/build/sections/Header/HeaderToolTipIcon.d.ts +1 -1
- package/build/sections/Header/HeaderToolTipIcon.js +56 -63
- package/build/sections/Header/HeaderToolTipIcon.js.map +1 -1
- package/build/sections/Header/LanguageSwitch.js +81 -128
- package/build/sections/Header/LanguageSwitch.js.map +1 -1
- package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.d.ts +6 -6
- package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js +171 -166
- package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js.map +1 -1
- package/build/sections/Header/RegistryInfoContent/index.js +1 -14
- package/build/sections/Header/RegistryInfoContent/styles.d.ts +6 -6
- package/build/sections/Header/RegistryInfoContent/styles.js +17 -30
- package/build/sections/Header/RegistryInfoContent/styles.js.map +1 -1
- package/build/sections/Header/index.js +1 -14
- package/build/sections/Header/styles.d.ts +10 -10
- package/build/sections/Header/styles.js +109 -146
- package/build/sections/Header/styles.js.map +1 -1
- package/build/sections/Home/Home.js +17 -21
- package/build/sections/Home/Home.js.map +1 -1
- package/build/sections/Home/index.js +1 -14
- package/build/sections/Security/AddUser.js +116 -179
- package/build/sections/Security/AddUser.js.map +1 -1
- package/build/sections/Security/ChangePassword.js +111 -169
- package/build/sections/Security/ChangePassword.js.map +1 -1
- package/build/sections/Security/Login.js +78 -142
- package/build/sections/Security/Login.js.map +1 -1
- package/build/sections/Security/Success.js +40 -50
- package/build/sections/Security/Success.js.map +1 -1
- package/build/sections/Security/index.js +4 -35
- package/build/sections/Security/styles.js +25 -38
- package/build/sections/Security/styles.js.map +1 -1
- package/build/sections/Security/utils.js +14 -57
- package/build/sections/Security/utils.js.map +1 -1
- package/build/sections/SideBar/Sidebar.js +85 -90
- package/build/sections/SideBar/Sidebar.js.map +1 -1
- package/build/sections/SideBar/index.js +1 -14
- package/build/sections/index.js +4 -21
- package/build/store/api.js +57 -116
- package/build/store/api.js.map +1 -1
- package/build/store/index.js +1 -14
- package/build/store/routes.js +6 -20
- package/build/store/routes.js.map +1 -1
- package/build/store/storage.js +19 -30
- package/build/store/storage.js.map +1 -1
- package/build/store/utils.js +7 -12
- package/build/store/utils.js.map +1 -1
- package/build/ui-components.css +2 -0
- package/build/utils/cli-utils.d.ts +1 -1
- package/build/utils/cli-utils.js +21 -36
- package/build/utils/cli-utils.js.map +1 -1
- package/build/utils/index.js +6 -75
- package/build/utils/loadable.js +12 -25
- package/build/utils/loadable.js.map +1 -1
- package/build/utils/routes.js +8 -31
- package/build/utils/routes.js.map +1 -1
- package/build/utils/schemas.js +15 -27
- package/build/utils/schemas.js.map +1 -1
- package/build/utils/token.js +20 -40
- package/build/utils/token.js.map +1 -1
- package/build/utils/url.js +45 -73
- package/build/utils/url.js.map +1 -1
- package/build/utils/utils.js +55 -111
- package/build/utils/utils.js.map +1 -1
- package/package.json +17 -12
- package/build/AppTest/AppRoute.js +0 -14
- package/build/AppTest/AppRoute.js.map +0 -1
- package/build/Theme/index.js.map +0 -1
- package/build/components/ActionBar/index.js.map +0 -1
- package/build/components/Author/index.js.map +0 -1
- package/build/components/CopyClipboard/index.js.map +0 -1
- package/build/components/Dependencies/index.js.map +0 -1
- package/build/components/Dependencies/types.js +0 -6
- package/build/components/Dependencies/types.js.map +0 -1
- package/build/components/Deprecated/index.js.map +0 -1
- package/build/components/Developers/index.js.map +0 -1
- package/build/components/Distribution/index.js.map +0 -1
- package/build/components/Engines/index.js.map +0 -1
- package/build/components/ErrorBoundary/index.js.map +0 -1
- package/build/components/Forbidden/index.js.map +0 -1
- package/build/components/FundButton/index.js.map +0 -1
- package/build/components/HeaderInfoDialog/index.js.map +0 -1
- package/build/components/Heading/index.js.map +0 -1
- package/build/components/Help/index.js.map +0 -1
- package/build/components/Icons/DevsIcons/CommonJS.js +0 -18
- package/build/components/Icons/DevsIcons/CommonJS.js.map +0 -1
- package/build/components/Icons/DevsIcons/ES6Module.js +0 -18
- package/build/components/Icons/DevsIcons/ES6Module.js.map +0 -1
- package/build/components/Icons/DevsIcons/Git.js +0 -18
- package/build/components/Icons/DevsIcons/Git.js.map +0 -1
- package/build/components/Icons/DevsIcons/NodeJS.js +0 -18
- package/build/components/Icons/DevsIcons/NodeJS.js.map +0 -1
- package/build/components/Icons/DevsIcons/TypeScript.js +0 -18
- package/build/components/Icons/DevsIcons/TypeScript.js.map +0 -1
- package/build/components/Icons/DevsIcons/commonjs.svg +0 -4
- package/build/components/Icons/DevsIcons/es6module.svg +0 -4
- package/build/components/Icons/DevsIcons/git.svg +0 -4
- package/build/components/Icons/DevsIcons/index.js.map +0 -1
- package/build/components/Icons/DevsIcons/nodejs.svg +0 -6
- package/build/components/Icons/DevsIcons/typescript.svg +0 -4
- package/build/components/Icons/Managers/Npm.js +0 -18
- package/build/components/Icons/Managers/Npm.js.map +0 -1
- package/build/components/Icons/Managers/Pnpm.js +0 -18
- package/build/components/Icons/Managers/Pnpm.js.map +0 -1
- package/build/components/Icons/Managers/Yarn.js +0 -18
- package/build/components/Icons/Managers/Yarn.js.map +0 -1
- package/build/components/Icons/Managers/index.js.map +0 -1
- package/build/components/Icons/Managers/npm.svg +0 -15
- package/build/components/Icons/Managers/pnpm.svg +0 -1
- package/build/components/Icons/Managers/yarn.svg +0 -1
- package/build/components/Install/index.js.map +0 -1
- package/build/components/Keywords/index.js.map +0 -1
- package/build/components/Label/index.js.map +0 -1
- package/build/components/Link/index.js.map +0 -1
- package/build/components/LinkExternal/index.js.map +0 -1
- package/build/components/Loading/Spinner/index.js.map +0 -1
- package/build/components/Loading/index.js.map +0 -1
- package/build/components/LoginDialog/index.js.map +0 -1
- package/build/components/Logo/img/logo-black-and-white.svg +0 -1
- package/build/components/Logo/img/logo.svg +0 -1
- package/build/components/Logo/index.js.map +0 -1
- package/build/components/MenuItem/index.js.map +0 -1
- package/build/components/NoItems/index.js.map +0 -1
- package/build/components/NotFound/img/package.svg +0 -1
- package/build/components/NotFound/index.js.map +0 -1
- package/build/components/Package/index.js.map +0 -1
- package/build/components/PackageList/index.js.map +0 -1
- package/build/components/Person/index.js.map +0 -1
- package/build/components/RawViewer/index.js.map +0 -1
- package/build/components/Readme/github-markdown.css +0 -1198
- package/build/components/Readme/index.js.map +0 -1
- package/build/components/Readme/types.js +0 -6
- package/build/components/Readme/types.js.map +0 -1
- package/build/components/RegistryInfoDialog/index.js.map +0 -1
- package/build/components/RegistryInfoDialog/types.js +0 -6
- package/build/components/RegistryInfoDialog/types.js.map +0 -1
- package/build/components/Repository/index.js.map +0 -1
- package/build/components/Search/AutoComplete/index.js.map +0 -1
- package/build/components/Search/index.js.map +0 -1
- package/build/components/SettingsMenu/index.js.map +0 -1
- package/build/components/SideBarTitle/index.js.map +0 -1
- package/build/components/UnAuthorized/UnAuthorized.js +0 -75
- package/build/components/UnAuthorized/UnAuthorized.js.map +0 -1
- package/build/components/UnAuthorized/index.js +0 -14
- package/build/components/UnAuthorized/index.js.map +0 -1
- package/build/components/UpLinks/index.js.map +0 -1
- package/build/components/Versions/index.js.map +0 -1
- package/build/components/Versions/types.js +0 -6
- package/build/components/Versions/types.js.map +0 -1
- package/build/hooks/index.js.map +0 -1
- package/build/index.js.map +0 -1
- package/build/layouts/Version/index.js.map +0 -1
- package/build/pages/Front/index.js.map +0 -1
- package/build/pages/Security/index.js.map +0 -1
- package/build/pages/Version/index.js.map +0 -1
- package/build/providers/AppConfigurationProvider/index.js.map +0 -1
- package/build/providers/AuthProvider/index.js.map +0 -1
- package/build/providers/AuthProvider/types.js +0 -6
- package/build/providers/AuthProvider/types.js.map +0 -1
- package/build/providers/DownloadProvider/index.js.map +0 -1
- package/build/providers/ManifestsProvider/README.md +0 -22
- package/build/providers/ManifestsProvider/index.js.map +0 -1
- package/build/providers/PersistenceSettingProvider/index.js.map +0 -1
- package/build/providers/SearchProvider/index.js.map +0 -1
- package/build/providers/TranslatorProvider/index.js.map +0 -1
- package/build/providers/VersionProvider/README.md +0 -22
- package/build/providers/VersionProvider/index.js.map +0 -1
- package/build/providers/index.js.map +0 -1
- package/build/routes/SecurityRoutes.js +0 -36
- package/build/routes/SecurityRoutes.js.map +0 -1
- package/build/sections/Detail/index.js.map +0 -1
- package/build/sections/Footer/index.js.map +0 -1
- package/build/sections/Header/RegistryInfoContent/index.js.map +0 -1
- package/build/sections/Header/index.js.map +0 -1
- package/build/sections/Home/index.js.map +0 -1
- package/build/sections/Security/index.js.map +0 -1
- package/build/sections/SideBar/index.js.map +0 -1
- package/build/sections/index.js.map +0 -1
- package/build/store/index.js.map +0 -1
- package/build/test/i18n-config.js +0 -26
- package/build/test/i18n-config.js.map +0 -1
- package/build/test/test-react-testing-library.js +0 -147
- package/build/test/test-react-testing-library.js.map +0 -1
- package/build/types/external-modules.d.js +0 -2
- package/build/types/external-modules.d.js.map +0 -1
- package/build/types/index.js +0 -6
- package/build/types/index.js.map +0 -1
- package/build/types/packageMeta.js +0 -6
- package/build/types/packageMeta.js.map +0 -1
- package/build/utils/index.js.map +0 -1
- package/build/utils/token-generate.js +0 -44
- package/build/utils/token-generate.js.map +0 -1
|
@@ -1,130 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} : {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
t = _useTranslation.t;
|
|
80
|
-
var currentLanguage = language;
|
|
81
|
-
var getCurrentLngDetails = (0, _react.useCallback)(function (language) {
|
|
82
|
-
var lng = listConverted[language] || listConverted['en-US'];
|
|
83
|
-
return {
|
|
84
|
-
icon: /*#__PURE__*/_react["default"].createElement(lng.icon, null),
|
|
85
|
-
translation: t(lng.translation)
|
|
86
|
-
};
|
|
87
|
-
}, [listConverted, t]);
|
|
88
|
-
var handleChangeLanguage = (0, _react.useCallback)(function (language) {
|
|
89
|
-
setLanguage(language);
|
|
90
|
-
}, [setLanguage]);
|
|
91
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
92
|
-
columns: {
|
|
93
|
-
xs: 12,
|
|
94
|
-
sm: 12,
|
|
95
|
-
md: 12
|
|
96
|
-
},
|
|
97
|
-
container: true,
|
|
98
|
-
spacing: {
|
|
99
|
-
xs: 1,
|
|
100
|
-
md: 1
|
|
101
|
-
}
|
|
102
|
-
}, languages.map(function (language, index) {
|
|
103
|
-
var _getCurrentLngDetails = getCurrentLngDetails(language),
|
|
104
|
-
icon = _getCurrentLngDetails.icon,
|
|
105
|
-
translation = _getCurrentLngDetails.translation;
|
|
106
|
-
return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
107
|
-
key: index,
|
|
108
|
-
size: {
|
|
109
|
-
sm: 2,
|
|
110
|
-
xs: 6
|
|
111
|
-
}
|
|
112
|
-
}, language === currentLanguage ? /*#__PURE__*/_react["default"].createElement(CardSelected, {
|
|
113
|
-
sx: {
|
|
114
|
-
maxWidth: 80
|
|
115
|
-
}
|
|
116
|
-
}, /*#__PURE__*/_react["default"].createElement(LanguageContent, {
|
|
117
|
-
icon: icon,
|
|
118
|
-
translation: translation
|
|
119
|
-
})) : /*#__PURE__*/_react["default"].createElement(CardUnSelected, {
|
|
120
|
-
onClick: function onClick() {
|
|
121
|
-
return handleChangeLanguage(language);
|
|
122
|
-
}
|
|
123
|
-
}, /*#__PURE__*/_react["default"].createElement(LanguageContent, {
|
|
124
|
-
icon: icon,
|
|
125
|
-
translation: translation
|
|
126
|
-
})));
|
|
127
|
-
})));
|
|
1
|
+
import { useLanguage as e } from "../../providers/TranslatorProvider/TranslatorProvider.js";
|
|
2
|
+
import "../../index.js";
|
|
3
|
+
import t from "@emotion/styled/base";
|
|
4
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { useCallback as a, useState as o } from "react";
|
|
6
|
+
import s from "i18next";
|
|
7
|
+
import { useTranslation as c } from "react-i18next";
|
|
8
|
+
import l from "@mui/material/Typography";
|
|
9
|
+
import u from "@mui/material/Card";
|
|
10
|
+
import d from "@mui/material/CardContent";
|
|
11
|
+
import f from "@mui/material/Grid";
|
|
12
|
+
//#region src/sections/Header/LanguageSwitch.tsx
|
|
13
|
+
var p = /* @__PURE__ */ t(u, process.env.NODE_ENV === "production" ? { target: "e1prltpd1" } : {
|
|
14
|
+
target: "e1prltpd1",
|
|
15
|
+
label: "CardSelected"
|
|
16
|
+
})(({ theme: e }) => ({
|
|
17
|
+
backgroundColor: e.palette.grey[600],
|
|
18
|
+
opacity: "0.9",
|
|
19
|
+
color: e.palette.error.contrastText,
|
|
20
|
+
fontWeight: "bold"
|
|
21
|
+
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL3ZlcmRhY2Npby92ZXJkYWNjaW8vcGFja2FnZXMvdWktY29tcG9uZW50cy9zcmMvc2VjdGlvbnMvSGVhZGVyL0xhbmd1YWdlU3dpdGNoLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFZNEIiLCJmaWxlIjoiL2hvbWUvcnVubmVyL3dvcmsvdmVyZGFjY2lvL3ZlcmRhY2Npby9wYWNrYWdlcy91aS1jb21wb25lbnRzL3NyYy9zZWN0aW9ucy9IZWFkZXIvTGFuZ3VhZ2VTd2l0Y2gudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IENhcmQgZnJvbSAnQG11aS9tYXRlcmlhbC9DYXJkJztcbmltcG9ydCBDYXJkQ29udGVudCBmcm9tICdAbXVpL21hdGVyaWFsL0NhcmRDb250ZW50JztcbmltcG9ydCBHcmlkIGZyb20gJ0BtdWkvbWF0ZXJpYWwvR3JpZCc7XG5pbXBvcnQgVHlwb2dyYXBoeSBmcm9tICdAbXVpL21hdGVyaWFsL1R5cG9ncmFwaHknO1xuaW1wb3J0IGkxOG5leHQgZnJvbSAnaTE4bmV4dCc7XG5pbXBvcnQgUmVhY3QsIHsgdXNlQ2FsbGJhY2ssIHVzZVN0YXRlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0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nRlbnQgaWNvbj17aWNvbn0gdHJhbnNsYXRpb249e3RyYW5zbGF0aW9ufSAvPlxuICAgICAgICAgICAgICAgIDwvQ2FyZFVuU2VsZWN0ZWQ+XG4gICAgICAgICAgICAgICl9XG4gICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgKTtcbiAgICAgICAgfSl9XG4gICAgICA8L0dyaWQ+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBMYW5ndWFnZVN3aXRjaDtcbiJdfQ== */"), m = /* @__PURE__ */ t(u, process.env.NODE_ENV === "production" ? { target: "e1prltpd0" } : {
|
|
22
|
+
target: "e1prltpd0",
|
|
23
|
+
label: "CardUnSelected"
|
|
24
|
+
})(({ theme: e }) => ({
|
|
25
|
+
cursor: "pointer",
|
|
26
|
+
":hover": { backgroundColor: e.palette.greyGainsboro }
|
|
27
|
+
}), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL3ZlcmRhY2Npby92ZXJkYWNjaW8vcGFja2FnZXMvdWktY29tcG9uZW50cy9zcmMvc2VjdGlvbnMvSGVhZGVyL0xhbmd1YWdlU3dpdGNoLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQjhCIiwiZmlsZSI6Ii9ob21lL3J1bm5lci93b3JrL3ZlcmRhY2Npby92ZXJkYWNjaW8vcGFja2FnZXMvdWktY29tcG9uZW50cy9zcmMvc2VjdGlvbnMvSGVhZGVyL0xhbmd1YWdlU3dpdGNoLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCBDYXJkIGZyb20gJ0BtdWkvbWF0ZXJpYWwvQ2FyZCc7XG5pbXBvcnQgQ2FyZENvbnRlbnQgZnJvbSAnQG11aS9t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GVudCBpY29uPXtpY29ufSB0cmFuc2xhdGlvbj17dHJhbnNsYXRpb259IC8+XG4gICAgICAgICAgICAgICAgPC9DYXJkU2VsZWN0ZWQ+XG4gICAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgICAgPENhcmRVblNlbGVjdGVkIG9uQ2xpY2s9eygpID0+IGhhbmRsZUNoYW5nZUxhbmd1YWdlKGxhbmd1YWdlKX0+XG4gICAgICAgICAgICAgICAgICA8TGFuZ3VhZ2VDb250ZW50IGljb249e2ljb259IHRyYW5zbGF0aW9uPXt0cmFuc2xhdGlvbn0gLz5cbiAgICAgICAgICAgICAgICA8L0NhcmRVblNlbGVjdGVkPlxuICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICk7XG4gICAgICAgIH0pfVxuICAgICAgPC9HcmlkPlxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgTGFuZ3VhZ2VTd2l0Y2g7XG4iXX0= */"), h = ({ translation: e, icon: t }) => /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(d, { children: /* @__PURE__ */ r(l, {
|
|
28
|
+
display: "block",
|
|
29
|
+
gutterBottom: !0,
|
|
30
|
+
variant: "caption",
|
|
31
|
+
children: e
|
|
32
|
+
}) }), /* @__PURE__ */ r(d, { children: t })] }), g = () => {
|
|
33
|
+
let { language: t, setLanguage: n, listLanguages: i } = e(), l = i.reduce((e, t) => (e[t.lng] = {
|
|
34
|
+
translation: t.menuKey,
|
|
35
|
+
icon: t.icon
|
|
36
|
+
}, e), {}), [u] = o(Object.keys(s.options?.resources || {})), { t: d } = c(), g = t, _ = a((e) => {
|
|
37
|
+
let t = l[e] || l["en-US"];
|
|
38
|
+
return {
|
|
39
|
+
icon: /* @__PURE__ */ r(t.icon, {}),
|
|
40
|
+
translation: d(t.translation)
|
|
41
|
+
};
|
|
42
|
+
}, [l, d]), v = a((e) => {
|
|
43
|
+
n(e);
|
|
44
|
+
}, [n]);
|
|
45
|
+
return /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(f, {
|
|
46
|
+
columns: {
|
|
47
|
+
xs: 12,
|
|
48
|
+
sm: 12,
|
|
49
|
+
md: 12
|
|
50
|
+
},
|
|
51
|
+
container: !0,
|
|
52
|
+
spacing: {
|
|
53
|
+
xs: 1,
|
|
54
|
+
md: 1
|
|
55
|
+
},
|
|
56
|
+
children: u.map((e, t) => {
|
|
57
|
+
let { icon: n, translation: i } = _(e);
|
|
58
|
+
return /* @__PURE__ */ r(f, {
|
|
59
|
+
size: {
|
|
60
|
+
sm: 2,
|
|
61
|
+
xs: 6
|
|
62
|
+
},
|
|
63
|
+
children: e === g ? /* @__PURE__ */ r(p, {
|
|
64
|
+
sx: { maxWidth: 80 },
|
|
65
|
+
children: /* @__PURE__ */ r(h, {
|
|
66
|
+
icon: n,
|
|
67
|
+
translation: i
|
|
68
|
+
})
|
|
69
|
+
}) : /* @__PURE__ */ r(m, {
|
|
70
|
+
onClick: () => v(e),
|
|
71
|
+
children: /* @__PURE__ */ r(h, {
|
|
72
|
+
icon: n,
|
|
73
|
+
translation: i
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
}, t);
|
|
77
|
+
})
|
|
78
|
+
}) });
|
|
128
79
|
};
|
|
129
|
-
|
|
80
|
+
//#endregion
|
|
81
|
+
export { g as default };
|
|
82
|
+
|
|
130
83
|
//# sourceMappingURL=LanguageSwitch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSwitch.js","names":["_Card","_interopRequireDefault","require","_CardContent","_Grid","_Typography","_i18next","_react","_interopRequireWildcard","_reactI18next","_","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","isArray","CardSelected","exports","_base","Card","process","env","NODE_ENV","target","label","_ref","theme","backgroundColor","palette","grey","opacity","color","error","contrastText","fontWeight","CardUnSelected","_ref2","cursor","greyGainsboro","LanguageContent","_ref3","translation","icon","createElement","Fragment","display","gutterBottom","variant","LanguageSwitch","_i18next$options","_useLanguage","useLanguage","language","setLanguage","listLanguages","listConverted","reduce","prev","item","lng","menuKey","_useState","useState","keys","i18next","options","resources","_useState2","languages","_useTranslation","useTranslation","currentLanguage","getCurrentLngDetails","useCallback","handleChangeLanguage","columns","xs","sm","md","container","spacing","map","index","_getCurrentLngDetails","key","size","sx","maxWidth","onClick","_default"],"sources":["../../../src/sections/Header/LanguageSwitch.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Card from '@mui/material/Card';\nimport CardContent from '@mui/material/CardContent';\nimport Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport i18next from 'i18next';\nimport React, { useCallback, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../';\nimport { useLanguage } from '../../';\n\nexport const CardSelected = styled(Card)<{ theme?: Theme }>(({ theme }) => {\n return {\n backgroundColor: theme.palette.grey['600'],\n opacity: '0.9',\n color: theme.palette.error.contrastText,\n fontWeight: 'bold',\n };\n});\n\nexport const CardUnSelected = styled(Card)<{ theme?: Theme }>(({ theme }) => {\n return {\n cursor: 'pointer',\n ':hover': {\n backgroundColor: theme.palette.greyGainsboro,\n },\n };\n});\n\nconst LanguageContent = ({ translation, icon }) => (\n <>\n <CardContent>\n <Typography display=\"block\" gutterBottom={true} variant=\"caption\">\n {translation}\n </Typography>\n </CardContent>\n <CardContent>{icon}</CardContent>\n </>\n);\n\nconst LanguageSwitch = () => {\n const { language, setLanguage, listLanguages } = useLanguage();\n const listConverted = listLanguages.reduce(\n (prev, item) => {\n prev[item.lng] = {\n translation: item.menuKey,\n icon: item.icon,\n };\n return prev;\n },\n {} as Record<string, { translation: string; icon: any }>\n );\n\n const [languages] = useState<string[]>(Object.keys(i18next.options?.resources || {}));\n const { t } = useTranslation();\n const currentLanguage = language;\n const getCurrentLngDetails = useCallback(\n (language: string) => {\n const lng = listConverted[language] || listConverted['en-US'];\n return {\n icon: <lng.icon />,\n translation: t(lng.translation),\n };\n },\n [listConverted, t]\n );\n const handleChangeLanguage = useCallback(\n (language: string) => {\n setLanguage(language);\n },\n [setLanguage]\n );\n\n return (\n <div>\n <Grid columns={{ xs: 12, sm: 12, md: 12 }} container={true} spacing={{ xs: 1, md: 1 }}>\n {languages.map((language, index) => {\n const { icon, translation } = getCurrentLngDetails(language);\n return (\n <Grid key={index} size={{ sm: 2, xs: 6 }}>\n {language === currentLanguage ? (\n <CardSelected sx={{ maxWidth: 80 }}>\n <LanguageContent icon={icon} translation={translation} />\n </CardSelected>\n ) : (\n <CardUnSelected onClick={() => handleChangeLanguage(language)}>\n <LanguageContent icon={icon} translation={translation} />\n </CardUnSelected>\n )}\n </Grid>\n );\n })}\n </Grid>\n </div>\n );\n};\n\nexport default LanguageSwitch;\n"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,QAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,MAAA,GAAAC,uBAAA,CAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AAGA,IAAAQ,CAAA,GAAAR,OAAA;AAAqC,SAAAM,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,wBAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,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AE;IAAE,GACtCxB,QAAQ,KAAKmB,eAAe,gBAC3BxG,MAAA,YAAA4E,aAAA,CAAC3B,YAAY;MAACsE,EAAE,EAAE;QAAEC,QAAQ,EAAE;MAAG;IAAE,gBACjCxH,MAAA,YAAA4E,aAAA,CAACJ,eAAe;MAACG,IAAI,EAAEA,IAAK;MAACD,WAAW,EAAEA;IAAY,CAAE,CAC5C,CAAC,gBAEf1E,MAAA,YAAA4E,aAAA,CAACR,cAAc;MAACqD,OAAO,EAAE,SAATA,OAAOA,CAAA;QAAA,OAAQd,oBAAoB,CAACtB,QAAQ,CAAC;MAAA;IAAC,gBAC5DrF,MAAA,YAAA4E,aAAA,CAACJ,eAAe;MAACG,IAAI,EAAEA,IAAK;MAACD,WAAW,EAAEA;IAAY,CAAE,CAC1C,CAEd,CAAC;EAEX,CAAC,CACG,CACH,CAAC;AAEV,CAAC;AAAC,IAAAgD,QAAA,GAAAxE,OAAA,cAEa+B,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"LanguageSwitch.js","names":["Card","CardContent","Grid","Typography","i18next","React","useCallback","useState","useTranslation","Theme","useLanguage","CardSelected","_styled","process","env","NODE_ENV","target","label","theme","backgroundColor","palette","grey","opacity","color","error","contrastText","fontWeight","CardUnSelected","cursor","greyGainsboro","LanguageContent","translation","icon","LanguageSwitch","language","setLanguage","listLanguages","listConverted","reduce","prev","item","lng","menuKey","Record","languages","Object","keys","options","resources","t","currentLanguage","getCurrentLngDetails","handleChangeLanguage","xs","sm","md","map","index","maxWidth"],"sources":["../../../src/sections/Header/LanguageSwitch.tsx"],"sourcesContent":["import styled from '@emotion/styled';\nimport Card from '@mui/material/Card';\nimport CardContent from '@mui/material/CardContent';\nimport Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport i18next from 'i18next';\nimport React, { useCallback, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nimport type { Theme } from '../../';\nimport { useLanguage } from '../../';\n\nexport const CardSelected = styled(Card)<{ theme?: Theme }>(({ theme }) => {\n return {\n backgroundColor: theme.palette.grey['600'],\n opacity: '0.9',\n color: theme.palette.error.contrastText,\n fontWeight: 'bold',\n };\n});\n\nexport const CardUnSelected = styled(Card)<{ theme?: Theme }>(({ theme }) => {\n return {\n cursor: 'pointer',\n ':hover': {\n backgroundColor: theme.palette.greyGainsboro,\n },\n };\n});\n\nconst LanguageContent = ({ translation, icon }) => (\n <>\n <CardContent>\n <Typography display=\"block\" gutterBottom={true} variant=\"caption\">\n {translation}\n </Typography>\n </CardContent>\n <CardContent>{icon}</CardContent>\n </>\n);\n\nconst LanguageSwitch = () => {\n const { language, setLanguage, listLanguages } = useLanguage();\n const listConverted = listLanguages.reduce(\n (prev, item) => {\n prev[item.lng] = {\n translation: item.menuKey,\n icon: item.icon,\n };\n return prev;\n },\n {} as Record<string, { translation: string; icon: any }>\n );\n\n const [languages] = useState<string[]>(Object.keys(i18next.options?.resources || {}));\n const { t } = useTranslation();\n const currentLanguage = language;\n const getCurrentLngDetails = useCallback(\n (language: string) => {\n const lng = listConverted[language] || listConverted['en-US'];\n return {\n icon: <lng.icon />,\n translation: t(lng.translation),\n };\n },\n [listConverted, t]\n );\n const handleChangeLanguage = useCallback(\n (language: string) => {\n setLanguage(language);\n },\n [setLanguage]\n );\n\n return (\n <div>\n <Grid columns={{ xs: 12, sm: 12, md: 12 }} container={true} spacing={{ xs: 1, md: 1 }}>\n {languages.map((language, index) => {\n const { icon, translation } = getCurrentLngDetails(language);\n return (\n <Grid key={index} size={{ sm: 2, xs: 6 }}>\n {language === currentLanguage ? (\n <CardSelected sx={{ maxWidth: 80 }}>\n <LanguageContent icon={icon} translation={translation} />\n </CardSelected>\n ) : (\n <CardUnSelected onClick={() => handleChangeLanguage(language)}>\n <LanguageContent icon={icon} translation={translation} />\n </CardUnSelected>\n )}\n </Grid>\n );\n })}\n </Grid>\n </div>\n );\n};\n\nexport default LanguageSwitch;\n"],"mappings":";;;;;;;;;;;;AAYA,IAAaW,IAAe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AC/B;IAEH,CAACM,GAAeY,EAClB,CAAC,EACKG,IAAuB9C,GAC1B4B,MAAqB;AACpBC,IAAYD,EAAS;IAEvB,CAACC,EACH,CAAC;AAED,QACE,kBAAC,OAAD,EAAA,UACE,kBAAC,GAAD;EAAM,SAAS;GAAEkB,IAAI;GAAIC,IAAI;GAAIC,IAAI;GAAI;EAAE,WAAW;EAAM,SAAS;GAAEF,IAAI;GAAGE,IAAI;GAAG;YAClFX,EAAUY,KAAKtB,GAAUuB,MAAU;GAClC,IAAM,EAAEzB,SAAMD,mBAAgBoB,EAAqBjB,EAAS;AAC5D,UACE,kBAAC,GAAD;IAAkB,MAAM;KAAEoB,IAAI;KAAGD,IAAI;KAAG;cACrCnB,MAAagB,IACZ,kBAAC,GAAD;KAAc,IAAI,EAAEQ,UAAU,IAAI;eAChC,kBAAC,GAAD;MAAuB1B;MAAmBD;MAAY,CAAA;KACzC,CAAA,GAEf,kBAAC,GAAD;KAAgB,eAAeqB,EAAqBlB,EAAS;eAC3D,kBAAC,GAAD;MAAuBF;MAAmBD;MAAY,CAAA;KAEzD,CAAA;IACI,EAVI0B,EAUJ;IAET;EACE,CAAA,EACF,CAAA"}
|
|
@@ -6,16 +6,16 @@ export declare const NODE_MANAGER: {
|
|
|
6
6
|
pnpm: string;
|
|
7
7
|
};
|
|
8
8
|
export declare const AccordionContainer: import("@emotion/styled").StyledComponent<{
|
|
9
|
-
theme?: import("@emotion/react").Theme
|
|
10
|
-
as?: React.ElementType
|
|
9
|
+
theme?: import("@emotion/react").Theme;
|
|
10
|
+
as?: React.ElementType;
|
|
11
11
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
12
|
export declare const CommandContainer: import("@emotion/styled").StyledComponent<{
|
|
13
|
-
theme?: import("@emotion/react").Theme
|
|
14
|
-
as?: React.ElementType
|
|
13
|
+
theme?: import("@emotion/react").Theme;
|
|
14
|
+
as?: React.ElementType;
|
|
15
15
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
16
|
export declare const LinkContainer: import("@emotion/styled").StyledComponent<{
|
|
17
|
-
theme?: import("@emotion/react").Theme
|
|
18
|
-
as?: React.ElementType
|
|
17
|
+
theme?: import("@emotion/react").Theme;
|
|
18
|
+
as?: React.ElementType;
|
|
19
19
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
20
20
|
export type Props = {
|
|
21
21
|
registryUrl: string;
|