@verdaccio/ui-components 4.0.0-next-8.12 → 4.0.0-next-8.13
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/README.md +23 -49
- package/build/AppTest/AppRoute.d.ts +1 -3
- package/build/AppTest/AppRoute.js +13 -40
- package/build/AppTest/AppRoute.js.map +1 -1
- package/build/Theme/ResetStyles.js +42 -32
- package/build/Theme/ResetStyles.js.map +1 -1
- package/build/Theme/StyleBaseline.js +15 -6
- package/build/Theme/StyleBaseline.js.map +1 -1
- package/build/Theme/ThemeProvider.js +38 -22
- package/build/Theme/ThemeProvider.js.map +1 -1
- package/build/Theme/colors.d.ts +11 -0
- package/build/Theme/colors.js +19 -1
- package/build/Theme/colors.js.map +1 -1
- package/build/Theme/index.d.ts +2 -1
- package/build/Theme/index.js +57 -5
- package/build/Theme/index.js.map +1 -1
- package/build/Theme/modes.d.ts +3 -0
- package/build/Theme/modes.js +40 -0
- package/build/Theme/modes.js.map +1 -0
- package/build/Theme/theme.d.ts +5 -149
- package/build/Theme/theme.js +16 -95
- package/build/Theme/theme.js.map +1 -1
- package/build/Theme/tokens.d.ts +57 -0
- package/build/Theme/tokens.js +35 -0
- package/build/Theme/tokens.js.map +1 -0
- package/build/api/use-data-mutation.d.ts +19 -0
- package/build/api/use-data-mutation.js +99 -0
- package/build/api/use-data-mutation.js.map +1 -0
- package/build/api/use-data.d.ts +3 -0
- package/build/api/use-data.js +36 -0
- package/build/api/use-data.js.map +1 -0
- package/build/components/ActionBar/ActionBar.js +49 -30
- package/build/components/ActionBar/ActionBar.js.map +1 -1
- package/build/components/ActionBar/ActionBarAction.js +72 -57
- package/build/components/ActionBar/ActionBarAction.js.map +1 -1
- package/build/components/ActionBar/index.js +13 -1
- package/build/components/ActionBar/index.js.map +1 -1
- package/build/components/AppRoute/AppRoute.d.ts +3 -0
- package/build/components/AppRoute/AppRoute.js +89 -0
- package/build/components/AppRoute/AppRoute.js.map +1 -0
- package/build/components/Author/Author.d.ts +1 -1
- package/build/components/Author/Author.js +25 -22
- package/build/components/Author/Author.js.map +1 -1
- package/build/components/Author/index.js +13 -1
- package/build/components/Author/index.js.map +1 -1
- package/build/components/Author/styles.js +18 -9
- package/build/components/Author/styles.js.map +1 -1
- package/build/components/CopyClipboard/CopyToClipBoard.js +31 -28
- package/build/components/CopyClipboard/CopyToClipBoard.js.map +1 -1
- package/build/components/CopyClipboard/index.js +20 -2
- package/build/components/CopyClipboard/index.js.map +1 -1
- package/build/components/CopyClipboard/utils.d.ts +1 -1
- package/build/components/CopyClipboard/utils.js +12 -4
- package/build/components/CopyClipboard/utils.js.map +1 -1
- package/build/components/Dependencies/Dependencies.js +52 -42
- package/build/components/Dependencies/Dependencies.js.map +1 -1
- package/build/components/Dependencies/DependencyBlock.d.ts +2 -2
- package/build/components/Dependencies/DependencyBlock.js +65 -49
- package/build/components/Dependencies/DependencyBlock.js.map +1 -1
- package/build/components/Dependencies/index.js +13 -1
- package/build/components/Dependencies/index.js.map +1 -1
- package/build/components/Dependencies/types.d.ts +1 -1
- package/build/components/Dependencies/types.js +5 -1
- package/build/components/Dependencies/types.js.map +1 -1
- package/build/components/Dependencies/utits.js +7 -1
- package/build/components/Dependencies/utits.js.map +1 -1
- package/build/components/Deprecated/Deprecated.js +13 -8
- package/build/components/Deprecated/Deprecated.js.map +1 -1
- package/build/components/Deprecated/index.js +13 -1
- package/build/components/Deprecated/index.js.map +1 -1
- package/build/components/Developers/DeveloperType.js +7 -1
- package/build/components/Developers/DeveloperType.js.map +1 -1
- package/build/components/Developers/Developers.d.ts +1 -1
- package/build/components/Developers/Developers.js +62 -39
- package/build/components/Developers/Developers.js.map +1 -1
- package/build/components/Developers/Title.js +25 -23
- package/build/components/Developers/Title.js.map +1 -1
- package/build/components/Developers/get-unique-developer-values.d.ts +1 -1
- package/build/components/Developers/get-unique-developer-values.js +18 -2
- package/build/components/Developers/get-unique-developer-values.js.map +1 -1
- package/build/components/Developers/index.js +20 -2
- package/build/components/Developers/index.js.map +1 -1
- package/build/components/Distribution/Dist.d.ts +2 -2
- package/build/components/Distribution/Dist.js +31 -30
- package/build/components/Distribution/Dist.js.map +1 -1
- package/build/components/Distribution/index.js +13 -1
- package/build/components/Distribution/index.js.map +1 -1
- package/build/components/Distribution/styles.js +22 -13
- package/build/components/Distribution/styles.js.map +1 -1
- package/build/components/Engines/Engines.d.ts +1 -1
- package/build/components/Engines/Engines.js +37 -36
- package/build/components/Engines/Engines.js.map +1 -1
- package/build/components/Engines/index.js +13 -1
- package/build/components/Engines/index.js.map +1 -1
- package/build/components/Engines/styles.js +19 -10
- package/build/components/Engines/styles.js.map +1 -1
- package/build/components/ErrorBoundary/ErrorBoundary.d.ts +11 -9
- package/build/components/ErrorBoundary/ErrorBoundary.js +63 -28
- package/build/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/build/components/ErrorBoundary/index.js +13 -1
- package/build/components/ErrorBoundary/index.js.map +1 -1
- package/build/components/Forbidden/Forbidden.d.ts +3 -2
- package/build/components/Forbidden/Forbidden.js +55 -52
- package/build/components/Forbidden/Forbidden.js.map +1 -1
- package/build/components/Forbidden/index.js +13 -1
- package/build/components/Forbidden/index.js.map +1 -1
- package/build/components/FundButton/FundButton.js +33 -34
- package/build/components/FundButton/FundButton.js.map +1 -1
- package/build/components/FundButton/index.js +13 -1
- package/build/components/FundButton/index.js.map +1 -1
- package/build/components/HeaderInfoDialog/HeaderInfoDialog.js +45 -32
- package/build/components/HeaderInfoDialog/HeaderInfoDialog.js.map +1 -1
- package/build/components/HeaderInfoDialog/index.js +13 -1
- package/build/components/HeaderInfoDialog/index.js.map +1 -1
- package/build/components/Heading/Heading.d.ts +5 -2
- package/build/components/Heading/Heading.js +17 -11
- package/build/components/Heading/Heading.js.map +1 -1
- package/build/components/Heading/index.js +13 -1
- package/build/components/Heading/index.js.map +1 -1
- package/build/components/Help/Help.js +32 -26
- package/build/components/Help/Help.js.map +1 -1
- package/build/components/Help/index.js +13 -1
- package/build/components/Help/index.js.map +1 -1
- package/build/components/Help/styles.js +10 -3
- package/build/components/Help/styles.js.map +1 -1
- package/build/components/Icons/DevsIcons/CommonJS.js +10 -3
- package/build/components/Icons/DevsIcons/CommonJS.js.map +1 -1
- package/build/components/Icons/DevsIcons/ES6Module.js +10 -3
- package/build/components/Icons/DevsIcons/ES6Module.js.map +1 -1
- package/build/components/Icons/DevsIcons/Git.js +10 -3
- package/build/components/Icons/DevsIcons/Git.js.map +1 -1
- package/build/components/Icons/DevsIcons/NodeJS.js +10 -3
- package/build/components/Icons/DevsIcons/NodeJS.js.map +1 -1
- package/build/components/Icons/DevsIcons/TypeScript.js +10 -3
- package/build/components/Icons/DevsIcons/TypeScript.js.map +1 -1
- package/build/components/Icons/DevsIcons/index.js +40 -5
- package/build/components/Icons/DevsIcons/index.js.map +1 -1
- package/build/components/Icons/Earth.d.ts +5 -5
- package/build/components/Icons/Earth.js +25 -14
- package/build/components/Icons/Earth.js.map +1 -1
- package/build/components/Icons/FileBinary.d.ts +5 -5
- package/build/components/Icons/FileBinary.js +23 -16
- package/build/components/Icons/FileBinary.js.map +1 -1
- package/build/components/Icons/Law.d.ts +5 -5
- package/build/components/Icons/Law.js +24 -17
- package/build/components/Icons/Law.js.map +1 -1
- package/build/components/Icons/License.d.ts +7 -5
- package/build/components/Icons/License.js +19 -8
- package/build/components/Icons/License.js.map +1 -1
- package/build/components/Icons/Managers/Npm.js +10 -3
- package/build/components/Icons/Managers/Npm.js.map +1 -1
- package/build/components/Icons/Managers/Pnpm.js +10 -3
- package/build/components/Icons/Managers/Pnpm.js.map +1 -1
- package/build/components/Icons/Managers/Yarn.js +10 -3
- package/build/components/Icons/Managers/Yarn.js.map +1 -1
- package/build/components/Icons/Managers/index.js +26 -3
- package/build/components/Icons/Managers/index.js.map +1 -1
- package/build/components/Icons/SvgIcon.d.ts +8 -2
- package/build/components/Icons/SvgIcon.js +26 -22
- package/build/components/Icons/SvgIcon.js.map +1 -1
- package/build/components/Icons/Time.d.ts +5 -5
- package/build/components/Icons/Time.js +20 -9
- package/build/components/Icons/Time.js.map +1 -1
- package/build/components/Icons/Version.d.ts +5 -5
- package/build/components/Icons/Version.js +18 -7
- package/build/components/Icons/Version.js.map +1 -1
- package/build/components/Icons/index.js +79 -8
- package/build/components/Icons/index.js.map +1 -1
- package/build/components/Install/Install.d.ts +2 -2
- package/build/components/Install/Install.js +41 -33
- package/build/components/Install/Install.js.map +1 -1
- package/build/components/Install/InstallListItem.js +48 -43
- package/build/components/Install/InstallListItem.js.map +1 -1
- package/build/components/Install/index.js +13 -1
- package/build/components/Install/index.js.map +1 -1
- package/build/components/Keywords/KeywordListItems.js +25 -17
- package/build/components/Keywords/KeywordListItems.js.map +1 -1
- package/build/components/Keywords/Keywords.d.ts +1 -1
- package/build/components/Keywords/Keywords.js +22 -18
- package/build/components/Keywords/Keywords.js.map +1 -1
- package/build/components/Keywords/index.js +13 -1
- package/build/components/Keywords/index.js.map +1 -1
- package/build/components/Label/Label.d.ts +1 -1
- package/build/components/Label/Label.js +25 -17
- package/build/components/Label/Label.js.map +1 -1
- package/build/components/Label/index.js +13 -1
- package/build/components/Label/index.js.map +1 -1
- package/build/components/Link/Link.d.ts +1 -1
- package/build/components/Link/Link.js +26 -19
- package/build/components/Link/Link.js.map +1 -1
- package/build/components/Link/index.js +13 -1
- package/build/components/Link/index.js.map +1 -1
- package/build/components/LinkExternal/LinkExternal.d.ts +1 -1
- package/build/components/LinkExternal/LinkExternal.js +28 -24
- package/build/components/LinkExternal/LinkExternal.js.map +1 -1
- package/build/components/LinkExternal/index.js +13 -1
- package/build/components/LinkExternal/index.js.map +1 -1
- package/build/components/Loading/Loading.js +21 -12
- package/build/components/Loading/Loading.js.map +1 -1
- package/build/components/Loading/Spinner/Spinner.js +31 -26
- package/build/components/Loading/Spinner/Spinner.js.map +1 -1
- package/build/components/Loading/Spinner/index.js +13 -1
- package/build/components/Loading/Spinner/index.js.map +1 -1
- package/build/components/Loading/index.js +13 -1
- package/build/components/Loading/index.js.map +1 -1
- package/build/components/Loading/styles.d.ts +1 -2
- package/build/components/Loading/styles.js +14 -9
- package/build/components/Loading/styles.js.map +1 -1
- package/build/components/LoginDialog/LoginDialog.js +29 -77
- package/build/components/LoginDialog/LoginDialog.js.map +1 -1
- package/build/components/LoginDialog/LoginDialogCloseButton.js +24 -22
- package/build/components/LoginDialog/LoginDialogCloseButton.js.map +1 -1
- package/build/components/LoginDialog/LoginDialogForm.d.ts +2 -11
- package/build/components/LoginDialog/LoginDialogForm.js +25 -111
- package/build/components/LoginDialog/LoginDialogForm.js.map +1 -1
- package/build/components/LoginDialog/LoginDialogFormError.d.ts +1 -6
- package/build/components/LoginDialog/LoginDialogFormError.js +31 -26
- package/build/components/LoginDialog/LoginDialogFormError.js.map +1 -1
- package/build/components/LoginDialog/index.js +13 -1
- package/build/components/LoginDialog/index.js.map +1 -1
- package/build/components/LoginForm/Login.d.ts +15 -0
- package/build/components/LoginForm/Login.js +87 -0
- package/build/components/LoginForm/Login.js.map +1 -0
- package/build/components/LoginForm/PasswordField.d.ts +9 -0
- package/build/components/LoginForm/PasswordField.js +51 -0
- package/build/components/LoginForm/PasswordField.js.map +1 -0
- package/build/components/LoginForm/UsernameField.d.ts +9 -0
- package/build/components/LoginForm/UsernameField.js +49 -0
- package/build/components/LoginForm/UsernameField.js.map +1 -0
- package/build/components/LoginForm/styles.d.ts +6 -0
- package/build/components/LoginForm/styles.js +60 -0
- package/build/components/LoginForm/styles.js.map +1 -0
- package/build/components/LoginForm/useLoginForm.d.ts +78 -0
- package/build/components/LoginForm/useLoginForm.js +66 -0
- package/build/components/LoginForm/useLoginForm.js.map +1 -0
- package/build/components/Logo/Logo.js +34 -29
- package/build/components/Logo/Logo.js.map +1 -1
- package/build/components/Logo/index.js +13 -1
- package/build/components/Logo/index.js.map +1 -1
- package/build/components/MenuItem/MenuItem.d.ts +4 -2
- package/build/components/MenuItem/MenuItem.js +24 -11
- package/build/components/MenuItem/MenuItem.js.map +1 -1
- package/build/components/MenuItem/index.js +13 -1
- package/build/components/MenuItem/index.js.map +1 -1
- package/build/components/NoItems/NoItems.js +15 -10
- package/build/components/NoItems/NoItems.js.map +1 -1
- package/build/components/NoItems/index.js +13 -1
- package/build/components/NoItems/index.js.map +1 -1
- package/build/components/NotFound/NotFound.js +37 -32
- package/build/components/NotFound/NotFound.js.map +1 -1
- package/build/components/NotFound/index.js +13 -1
- package/build/components/NotFound/index.js.map +1 -1
- package/build/components/Package/Package.d.ts +2 -1
- package/build/components/Package/Package.js +187 -155
- package/build/components/Package/Package.js.map +1 -1
- package/build/components/Package/index.js +13 -1
- package/build/components/Package/index.js.map +1 -1
- package/build/components/Package/styles.d.ts +2 -3
- package/build/components/Package/styles.js +73 -72
- package/build/components/Package/styles.js.map +1 -1
- package/build/components/PackageList/PackageList.d.ts +2 -1
- package/build/components/PackageList/PackageList.js +55 -59
- package/build/components/PackageList/PackageList.js.map +1 -1
- package/build/components/PackageList/index.js +13 -1
- package/build/components/PackageList/index.js.map +1 -1
- package/build/components/Person/Person.d.ts +1 -1
- package/build/components/Person/Person.js +28 -22
- package/build/components/Person/Person.js.map +1 -1
- package/build/components/Person/PersonTooltip.d.ts +1 -1
- package/build/components/Person/PersonTooltip.js +18 -13
- package/build/components/Person/PersonTooltip.js.map +1 -1
- package/build/components/Person/index.js +13 -1
- package/build/components/Person/index.js.map +1 -1
- package/build/components/Person/utils.d.ts +1 -1
- package/build/components/Person/utils.js +14 -6
- package/build/components/Person/utils.js.map +1 -1
- package/build/components/RawViewer/RawViewer.js +38 -34
- package/build/components/RawViewer/RawViewer.js.map +1 -1
- package/build/components/RawViewer/index.js +13 -1
- package/build/components/RawViewer/index.js.map +1 -1
- package/build/components/Readme/Readme.d.ts +1 -1
- package/build/components/Readme/Readme.js +26 -22
- package/build/components/Readme/Readme.js.map +1 -1
- package/build/components/Readme/index.js +13 -1
- package/build/components/Readme/index.js.map +1 -1
- package/build/components/Readme/types.js +5 -1
- package/build/components/Readme/utils.js +15 -8
- package/build/components/Readme/utils.js.map +1 -1
- package/build/components/RegistryInfoDialog/RegistryInfoDialog.d.ts +1 -1
- package/build/components/RegistryInfoDialog/RegistryInfoDialog.js +25 -19
- package/build/components/RegistryInfoDialog/RegistryInfoDialog.js.map +1 -1
- package/build/components/RegistryInfoDialog/index.js +13 -1
- package/build/components/RegistryInfoDialog/index.js.map +1 -1
- package/build/components/RegistryInfoDialog/styles.d.ts +1 -2
- package/build/components/RegistryInfoDialog/styles.js +26 -24
- package/build/components/RegistryInfoDialog/styles.js.map +1 -1
- package/build/components/RegistryInfoDialog/types.d.ts +1 -1
- package/build/components/RegistryInfoDialog/types.js +5 -1
- package/build/components/RegistryInfoDialog/types.js.map +1 -1
- package/build/components/Repository/Repository.js +47 -42
- package/build/components/Repository/Repository.js.map +1 -1
- package/build/components/Repository/index.js +13 -1
- package/build/components/Repository/index.js.map +1 -1
- package/build/components/Search/AutoComplete/AutoComplete.d.ts +5 -4
- package/build/components/Search/AutoComplete/AutoComplete.js +44 -26
- package/build/components/Search/AutoComplete/AutoComplete.js.map +1 -1
- package/build/components/Search/AutoComplete/index.js +13 -1
- package/build/components/Search/AutoComplete/index.js.map +1 -1
- package/build/components/Search/AutoComplete/styles.d.ts +0 -1
- package/build/components/Search/AutoComplete/styles.js +9 -2
- package/build/components/Search/AutoComplete/styles.js.map +1 -1
- package/build/components/Search/Search.d.ts +2 -5
- package/build/components/Search/Search.js +133 -123
- package/build/components/Search/Search.js.map +1 -1
- package/build/components/Search/SearchItem.d.ts +1 -1
- package/build/components/Search/SearchItem.js +92 -97
- package/build/components/Search/SearchItem.js.map +1 -1
- package/build/components/Search/index.js +13 -1
- package/build/components/Search/index.js.map +1 -1
- package/build/components/Search/styles.d.ts +5 -4
- package/build/components/Search/styles.js +46 -33
- package/build/components/Search/styles.js.map +1 -1
- package/build/components/Search/utils.js +7 -1
- package/build/components/Search/utils.js.map +1 -1
- package/build/components/SettingsMenu/SettingsMenu.js +60 -52
- package/build/components/SettingsMenu/SettingsMenu.js.map +1 -1
- package/build/components/SettingsMenu/index.js +13 -1
- package/build/components/SettingsMenu/index.js.map +1 -1
- package/build/components/SideBarTitle/SideBarTitle.js +52 -52
- package/build/components/SideBarTitle/SideBarTitle.js.map +1 -1
- package/build/components/SideBarTitle/index.js +13 -1
- package/build/components/SideBarTitle/index.js.map +1 -1
- package/build/components/SideBarTitle/utils.js +15 -6
- package/build/components/SideBarTitle/utils.js.map +1 -1
- package/build/components/UnAuthorized/UnAuthorized.d.ts +3 -0
- package/build/components/UnAuthorized/UnAuthorized.js +75 -0
- package/build/components/UnAuthorized/UnAuthorized.js.map +1 -0
- package/build/components/UnAuthorized/index.d.ts +1 -0
- package/build/components/UnAuthorized/index.js +14 -0
- package/build/components/UnAuthorized/index.js.map +1 -0
- package/build/components/UpLinks/UpLinks.js +46 -42
- package/build/components/UpLinks/UpLinks.js.map +1 -1
- package/build/components/UpLinks/UplinkLink.js +17 -12
- package/build/components/UpLinks/UplinkLink.js.map +1 -1
- package/build/components/UpLinks/index.js +13 -1
- package/build/components/UpLinks/index.js.map +1 -1
- package/build/components/UpLinks/styles.d.ts +1 -2
- package/build/components/UpLinks/styles.js +26 -20
- package/build/components/UpLinks/styles.js.map +1 -1
- package/build/components/Versions/HistoryList.d.ts +1 -1
- package/build/components/Versions/HistoryList.js +44 -37
- package/build/components/Versions/HistoryList.js.map +1 -1
- package/build/components/Versions/TagList.d.ts +1 -1
- package/build/components/Versions/TagList.js +33 -26
- package/build/components/Versions/TagList.js.map +1 -1
- package/build/components/Versions/Versions.js +67 -50
- package/build/components/Versions/Versions.js.map +1 -1
- package/build/components/Versions/index.js +13 -1
- package/build/components/Versions/index.js.map +1 -1
- package/build/components/Versions/styles.d.ts +1 -2
- package/build/components/Versions/styles.js +19 -15
- package/build/components/Versions/styles.js.map +1 -1
- package/build/components/Versions/types.d.ts +1 -1
- package/build/components/Versions/types.js +5 -1
- package/build/components/Versions/types.js.map +1 -1
- package/build/configuration.d.ts +2 -0
- package/build/configuration.js +23 -0
- package/build/configuration.js.map +1 -0
- package/build/hooks/index.js +20 -2
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/useLocalStorage.js +31 -18
- package/build/hooks/useLocalStorage.js.map +1 -1
- package/build/hooks/useOnClickOutside.d.ts +1 -1
- package/build/hooks/useOnClickOutside.js +10 -5
- package/build/hooks/useOnClickOutside.js.map +1 -1
- package/build/index.d.ts +6 -14
- package/build/index.js +481 -66
- package/build/index.js.map +1 -1
- package/build/layouts/Security/Dialog.js +16 -11
- package/build/layouts/Security/Dialog.js.map +1 -1
- package/build/layouts/Version/Version.js +16 -9
- package/build/layouts/Version/Version.js.map +1 -1
- package/build/layouts/Version/index.js +13 -1
- package/build/layouts/Version/index.js.map +1 -1
- package/build/pages/Front/Home.d.ts +2 -0
- package/build/pages/Front/Home.js +9 -0
- package/build/pages/Front/Home.js.map +1 -0
- package/build/pages/Front/index.js +14 -0
- package/build/pages/Front/index.js.map +1 -0
- package/build/pages/Security/AddUser.d.ts +2 -0
- package/build/pages/Security/AddUser.js +9 -0
- package/build/pages/Security/AddUser.js.map +1 -0
- package/build/pages/Security/ChangePassword.d.ts +2 -0
- package/build/pages/Security/ChangePassword.js +9 -0
- package/build/pages/Security/ChangePassword.js.map +1 -0
- package/build/pages/Security/Login.d.ts +2 -0
- package/build/pages/Security/Login.js +9 -0
- package/build/pages/Security/Login.js.map +1 -0
- package/build/pages/Security/Success.d.ts +2 -0
- package/build/pages/Security/Success.js +9 -0
- package/build/pages/Security/Success.js.map +1 -0
- package/build/pages/Security/index.js +35 -0
- package/build/pages/Security/index.js.map +1 -0
- package/build/pages/Version/Version.js +32 -0
- package/build/pages/Version/Version.js.map +1 -0
- package/build/pages/Version/index.js +14 -0
- package/build/pages/Version/index.js.map +1 -0
- package/build/providers/AppConfigurationProvider/AppConfigurationProvider.d.ts +8 -6
- package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js +67 -46
- package/build/providers/AppConfigurationProvider/AppConfigurationProvider.js.map +1 -1
- package/build/providers/AppConfigurationProvider/index.d.ts +1 -1
- package/build/providers/AppConfigurationProvider/index.js +18 -1
- package/build/providers/AppConfigurationProvider/index.js.map +1 -1
- package/build/providers/AuthProvider/AuthProvider.d.ts +18 -0
- package/build/providers/AuthProvider/AuthProvider.js +102 -0
- package/build/providers/AuthProvider/AuthProvider.js.map +1 -0
- package/build/providers/AuthProvider/index.d.ts +1 -0
- package/build/providers/AuthProvider/index.js +17 -0
- package/build/providers/AuthProvider/index.js.map +1 -0
- package/build/providers/AuthProvider/types.d.ts +15 -0
- package/build/providers/AuthProvider/types.js +6 -0
- package/build/providers/AuthProvider/types.js.map +1 -0
- package/build/providers/AuthProvider/utils.d.ts +3 -0
- package/build/providers/AuthProvider/utils.js +27 -0
- package/build/providers/AuthProvider/utils.js.map +1 -0
- package/build/providers/DownloadProvider/DownloadProvider.d.ts +13 -0
- package/build/providers/DownloadProvider/DownloadProvider.js +73 -0
- package/build/providers/DownloadProvider/DownloadProvider.js.map +1 -0
- package/build/providers/DownloadProvider/index.d.ts +1 -0
- package/build/providers/DownloadProvider/index.js +19 -0
- package/build/providers/DownloadProvider/index.js.map +1 -0
- package/build/providers/ManifestsProvider/ManifestsProvider.d.ts +26 -0
- package/build/providers/ManifestsProvider/ManifestsProvider.js +33 -0
- package/build/providers/ManifestsProvider/ManifestsProvider.js.map +1 -0
- package/build/providers/ManifestsProvider/README.md +22 -0
- package/build/providers/ManifestsProvider/index.d.ts +1 -0
- package/build/providers/ManifestsProvider/index.js +21 -0
- package/build/providers/ManifestsProvider/index.js.map +1 -0
- package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.d.ts +3 -2
- package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js +39 -17
- package/build/providers/PersistenceSettingProvider/PersistenceSettingProvider.js.map +1 -1
- package/build/providers/PersistenceSettingProvider/index.d.ts +1 -1
- package/build/providers/PersistenceSettingProvider/index.js +18 -1
- package/build/providers/PersistenceSettingProvider/index.js.map +1 -1
- package/build/providers/SearchProvider/SearchProvider.d.ts +19 -0
- package/build/providers/SearchProvider/SearchProvider.js +97 -0
- package/build/providers/SearchProvider/SearchProvider.js.map +1 -0
- package/build/providers/SearchProvider/index.d.ts +1 -0
- package/build/providers/SearchProvider/index.js +25 -0
- package/build/providers/SearchProvider/index.js.map +1 -0
- package/build/providers/TranslatorProvider/TranslatorProvider.d.ts +3 -2
- package/build/providers/TranslatorProvider/TranslatorProvider.js +52 -25
- package/build/providers/TranslatorProvider/TranslatorProvider.js.map +1 -1
- package/build/providers/TranslatorProvider/index.js +20 -1
- package/build/providers/TranslatorProvider/index.js.map +1 -1
- package/build/providers/VersionProvider/VersionProvider.d.ts +13 -31
- package/build/providers/VersionProvider/VersionProvider.js +55 -69
- package/build/providers/VersionProvider/VersionProvider.js.map +1 -1
- package/build/providers/VersionProvider/index.js +20 -1
- package/build/providers/VersionProvider/index.js.map +1 -1
- package/build/providers/index.d.ts +5 -0
- package/build/providers/index.js +93 -3
- package/build/providers/index.js.map +1 -1
- package/build/routes/SecurityRoutes.d.ts +3 -0
- package/build/routes/SecurityRoutes.js +36 -0
- package/build/routes/SecurityRoutes.js.map +1 -0
- package/build/sections/Detail/ContainerContent.js +40 -22
- package/build/sections/Detail/ContainerContent.js.map +1 -1
- package/build/sections/Detail/Detail.js +42 -23
- package/build/sections/Detail/Detail.js.map +1 -1
- package/build/sections/Detail/ReadmeSection.js +13 -8
- package/build/sections/Detail/ReadmeSection.js.map +1 -1
- package/build/sections/Detail/Tabs.js +29 -23
- package/build/sections/Detail/Tabs.js.map +1 -1
- package/build/sections/Detail/index.js +13 -1
- package/build/sections/Detail/index.js.map +1 -1
- package/build/sections/Footer/Footer.js +62 -61
- package/build/sections/Footer/Footer.js.map +1 -1
- package/build/sections/Footer/index.js +13 -1
- package/build/sections/Footer/index.js.map +1 -1
- package/build/sections/Footer/styles.d.ts +1 -2
- package/build/sections/Footer/styles.js +47 -47
- package/build/sections/Footer/styles.js.map +1 -1
- package/build/sections/Header/Header.js +106 -65
- package/build/sections/Header/Header.js.map +1 -1
- package/build/sections/Header/HeaderGreetings.js +17 -13
- package/build/sections/Header/HeaderGreetings.js.map +1 -1
- package/build/sections/Header/HeaderLeft.js +19 -14
- package/build/sections/Header/HeaderLeft.js.map +1 -1
- package/build/sections/Header/HeaderMenu.d.ts +2 -1
- package/build/sections/Header/HeaderMenu.js +29 -24
- package/build/sections/Header/HeaderMenu.js.map +1 -1
- package/build/sections/Header/HeaderRight.js +61 -44
- package/build/sections/Header/HeaderRight.js.map +1 -1
- package/build/sections/Header/HeaderSettingsDialog.js +58 -53
- package/build/sections/Header/HeaderSettingsDialog.js.map +1 -1
- package/build/sections/Header/HeaderToolTip.d.ts +1 -1
- package/build/sections/Header/HeaderToolTip.js +14 -9
- package/build/sections/Header/HeaderToolTip.js.map +1 -1
- package/build/sections/Header/HeaderToolTipIcon.d.ts +4 -1
- package/build/sections/Header/HeaderToolTipIcon.js +30 -26
- package/build/sections/Header/HeaderToolTipIcon.js.map +1 -1
- package/build/sections/Header/LanguageSwitch.js +64 -56
- package/build/sections/Header/LanguageSwitch.js.map +1 -1
- package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.d.ts +2 -1
- package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js +77 -74
- package/build/sections/Header/RegistryInfoContent/RegistryInfoContent.js.map +1 -1
- package/build/sections/Header/RegistryInfoContent/index.js +13 -1
- package/build/sections/Header/RegistryInfoContent/index.js.map +1 -1
- package/build/sections/Header/RegistryInfoContent/styles.d.ts +1 -2
- package/build/sections/Header/RegistryInfoContent/styles.js +20 -13
- package/build/sections/Header/RegistryInfoContent/styles.js.map +1 -1
- package/build/sections/Header/index.js +13 -1
- package/build/sections/Header/index.js.map +1 -1
- package/build/sections/Header/styles.d.ts +1 -2
- package/build/sections/Header/styles.js +60 -50
- package/build/sections/Header/styles.js.map +1 -1
- package/build/sections/Home/Home.js +19 -19
- package/build/sections/Home/Home.js.map +1 -1
- package/build/sections/Home/index.js +13 -1
- package/build/sections/Home/index.js.map +1 -1
- package/build/sections/Security/AddUser.js +146 -85
- package/build/sections/Security/AddUser.js.map +1 -1
- package/build/sections/Security/ChangePassword.js +150 -95
- package/build/sections/Security/ChangePassword.js.map +1 -1
- package/build/sections/Security/Login.js +126 -87
- package/build/sections/Security/Login.js.map +1 -1
- package/build/sections/Security/Success.js +25 -19
- package/build/sections/Security/Success.js.map +1 -1
- package/build/sections/Security/index.js +34 -4
- package/build/sections/Security/index.js.map +1 -1
- package/build/sections/Security/styles.js +15 -15
- package/build/sections/Security/styles.js.map +1 -1
- package/build/sections/Security/utils.js +16 -8
- package/build/sections/Security/utils.js.map +1 -1
- package/build/sections/SideBar/Sidebar.js +49 -40
- package/build/sections/SideBar/Sidebar.js.map +1 -1
- package/build/sections/SideBar/index.js +13 -1
- package/build/sections/SideBar/index.js.map +1 -1
- package/build/sections/index.js +20 -2
- package/build/sections/index.js.map +1 -1
- package/build/store/api.d.ts +1 -1
- package/build/store/api.js +89 -48
- package/build/store/api.js.map +1 -1
- package/build/store/index.d.ts +0 -6
- package/build/store/index.js +13 -2
- package/build/store/index.js.map +1 -1
- package/build/store/{models/routes.d.ts → routes.d.ts} +4 -0
- package/build/store/{models/routes.js → routes.js} +11 -1
- package/build/store/routes.js.map +1 -0
- package/build/store/storage.d.ts +6 -0
- package/build/store/storage.js +28 -4
- package/build/store/storage.js.map +1 -1
- package/build/store/utils.js +14 -0
- package/build/store/utils.js.map +1 -0
- package/build/test/i18n-config.js +12 -4
- package/build/test/i18n-config.js.map +1 -1
- package/build/test/test-react-testing-library.d.ts +19 -4
- package/build/test/test-react-testing-library.js +140 -28
- package/build/test/test-react-testing-library.js.map +1 -1
- package/build/types/external-modules.d.js +2 -0
- package/build/types/external-modules.d.js.map +1 -0
- package/build/types/index.d.ts +1 -1
- package/build/types/index.js +5 -1
- package/build/types/index.js.map +1 -1
- package/build/types/packageMeta.d.ts +1 -6
- package/build/types/packageMeta.js +5 -1
- package/build/types/packageMeta.js.map +1 -1
- package/build/utils/cli-utils.d.ts +1 -1
- package/build/utils/cli-utils.js +30 -18
- package/build/utils/cli-utils.js.map +1 -1
- package/build/utils/index.js +74 -8
- package/build/utils/index.js.map +1 -1
- package/build/utils/loadable.js +15 -7
- package/build/utils/loadable.js.map +1 -1
- package/build/utils/routes.d.ts +11 -3
- package/build/utils/routes.js +20 -4
- package/build/utils/routes.js.map +1 -1
- package/build/utils/schemas.d.ts +34 -0
- package/build/utils/schemas.js +30 -0
- package/build/utils/schemas.js.map +1 -0
- package/build/utils/token-generate.js +17 -6
- package/build/utils/token-generate.js.map +1 -1
- package/build/utils/token.js +23 -9
- package/build/utils/token.js.map +1 -1
- package/build/utils/url.js +20 -10
- package/build/utils/url.js.map +1 -1
- package/build/utils/utils.d.ts +2 -2
- package/build/utils/utils.js +48 -29
- package/build/utils/utils.js.map +1 -1
- package/package.json +28 -29
- package/build/AppTest/pages/Front/Home.d.ts +0 -2
- package/build/AppTest/pages/Front/Home.js +0 -3
- package/build/AppTest/pages/Front/Home.js.map +0 -1
- package/build/AppTest/pages/Front/index.js +0 -2
- package/build/AppTest/pages/Front/index.js.map +0 -1
- package/build/AppTest/pages/Security/AddUser.d.ts +0 -2
- package/build/AppTest/pages/Security/AddUser.js +0 -3
- package/build/AppTest/pages/Security/AddUser.js.map +0 -1
- package/build/AppTest/pages/Security/ChangePassword.d.ts +0 -2
- package/build/AppTest/pages/Security/ChangePassword.js +0 -3
- package/build/AppTest/pages/Security/ChangePassword.js.map +0 -1
- package/build/AppTest/pages/Security/Login.d.ts +0 -2
- package/build/AppTest/pages/Security/Login.js +0 -3
- package/build/AppTest/pages/Security/Login.js.map +0 -1
- package/build/AppTest/pages/Security/Success.d.ts +0 -2
- package/build/AppTest/pages/Security/Success.js +0 -3
- package/build/AppTest/pages/Security/Success.js.map +0 -1
- package/build/AppTest/pages/Security/index.js +0 -5
- package/build/AppTest/pages/Security/index.js.map +0 -1
- package/build/AppTest/pages/Version/Version.js +0 -27
- package/build/AppTest/pages/Version/Version.js.map +0 -1
- package/build/AppTest/pages/Version/index.js +0 -2
- package/build/AppTest/pages/Version/index.js.map +0 -1
- package/build/components/LoginDialog/LoginDialogHeader.d.ts +0 -6
- package/build/components/LoginDialog/LoginDialogHeader.js +0 -59
- package/build/components/LoginDialog/LoginDialogHeader.js.map +0 -1
- package/build/components/TextField/TextField.d.ts +0 -3
- package/build/components/TextField/TextField.js +0 -30
- package/build/components/TextField/TextField.js.map +0 -1
- package/build/components/TextField/index.d.ts +0 -1
- package/build/components/TextField/index.js +0 -2
- package/build/components/TextField/index.js.map +0 -1
- package/build/sections/Security/LoginError.d.ts +0 -7
- package/build/sections/Security/LoginError.js +0 -38
- package/build/sections/Security/LoginError.js.map +0 -1
- package/build/store/models/add-user.d.ts +0 -45
- package/build/store/models/add-user.js +0 -103
- package/build/store/models/add-user.js.map +0 -1
- package/build/store/models/change-password.d.ts +0 -44
- package/build/store/models/change-password.js +0 -118
- package/build/store/models/change-password.js.map +0 -1
- package/build/store/models/configuration.d.ts +0 -24
- package/build/store/models/configuration.js +0 -46
- package/build/store/models/configuration.js.map +0 -1
- package/build/store/models/download.d.ts +0 -16
- package/build/store/models/download.js +0 -38
- package/build/store/models/download.js.map +0 -1
- package/build/store/models/index.d.ts +0 -22
- package/build/store/models/index.js +0 -21
- package/build/store/models/index.js.map +0 -1
- package/build/store/models/login-v1.d.ts +0 -44
- package/build/store/models/login-v1.js +0 -111
- package/build/store/models/login-v1.js.map +0 -1
- package/build/store/models/login.d.ts +0 -69
- package/build/store/models/login.js +0 -102
- package/build/store/models/login.js.map +0 -1
- package/build/store/models/manifest.d.ts +0 -54
- package/build/store/models/manifest.js +0 -117
- package/build/store/models/manifest.js.map +0 -1
- package/build/store/models/packages.d.ts +0 -28
- package/build/store/models/packages.js +0 -47
- package/build/store/models/packages.js.map +0 -1
- package/build/store/models/routes.js.map +0 -1
- package/build/store/models/search.d.ts +0 -42
- package/build/store/models/search.js +0 -92
- package/build/store/models/search.js.map +0 -1
- package/build/store/models/utils.js +0 -7
- package/build/store/models/utils.js.map +0 -1
- package/build/store/store.d.ts +0 -9
- package/build/store/store.js +0 -8
- package/build/store/store.js.map +0 -1
- /package/build/{AppTest/pages → pages}/Front/index.d.ts +0 -0
- /package/build/{AppTest/pages → pages}/Security/index.d.ts +0 -0
- /package/build/{AppTest/pages → pages}/Version/Version.d.ts +0 -0
- /package/build/{AppTest/pages → pages}/Version/index.d.ts +0 -0
- /package/build/store/{models/utils.d.ts → utils.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modes.js","names":["_colors","require","_colors2","DARK_MODE_PRIMARY","common","white","getModePalette","exports","mode","primaryColor","basePrimary","baseColors","primary","main","secondary","background","paper"],"sources":["../../src/Theme/modes.ts"],"sourcesContent":["import { common } from '@mui/material/colors';\nimport type { PaletteOptions } from '@mui/material/styles';\n\nimport { baseColors } from './colors';\n\nexport type ThemeMode = 'light' | 'dark';\n\nconst DARK_MODE_PRIMARY = common.white;\n\nexport const getModePalette = (mode: ThemeMode, primaryColor?: string): PaletteOptions => {\n const basePrimary = primaryColor || baseColors.primary.main;\n const primary = mode === 'dark' ? { main: DARK_MODE_PRIMARY } : { main: basePrimary };\n\n if (mode === 'dark') {\n return {\n mode,\n primary,\n secondary: { main: '#424242' },\n background: {\n default: '#1a202c',\n paper: '#2d3748',\n },\n };\n }\n\n return {\n mode,\n primary,\n secondary: baseColors.secondary,\n background: {\n default: '#f4f4f4',\n paper: '#ffffff',\n },\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAGA,IAAAC,QAAA,GAAAD,OAAA;AAIA,IAAME,iBAAiB,GAAGC,cAAM,CAACC,KAAK;AAE/B,IAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,SAAjBA,cAAcA,CAAIE,IAAe,EAAEC,YAAqB,EAAqB;EACxF,IAAMC,WAAW,GAAGD,YAAY,IAAIE,mBAAU,CAACC,OAAO,CAACC,IAAI;EAC3D,IAAMD,OAAO,GAAGJ,IAAI,KAAK,MAAM,GAAG;IAAEK,IAAI,EAAEV;EAAkB,CAAC,GAAG;IAAEU,IAAI,EAAEH;EAAY,CAAC;EAErF,IAAIF,IAAI,KAAK,MAAM,EAAE;IACnB,OAAO;MACLA,IAAI,EAAJA,IAAI;MACJI,OAAO,EAAPA,OAAO;MACPE,SAAS,EAAE;QAAED,IAAI,EAAE;MAAU,CAAC;MAC9BE,UAAU,EAAE;QACV,WAAS,SAAS;QAClBC,KAAK,EAAE;MACT;IACF,CAAC;EACH;EAEA,OAAO;IACLR,IAAI,EAAJA,IAAI;IACJI,OAAO,EAAPA,OAAO;IACPE,SAAS,EAAEH,mBAAU,CAACG,SAAS;IAC/BC,UAAU,EAAE;MACV,WAAS,SAAS;MAClBC,KAAK,EAAE;IACT;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
package/build/Theme/theme.d.ts
CHANGED
|
@@ -1,120 +1,7 @@
|
|
|
1
|
-
import { Theme as MuiTheme } from '@mui/material/styles';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
white: "#fff";
|
|
6
|
-
red: "#d32f2f";
|
|
7
|
-
orange: "#cd4000";
|
|
8
|
-
greySuperLight: "#f5f5f5";
|
|
9
|
-
greyLight: "#d3d3d3";
|
|
10
|
-
greyLight2: "#908ba1";
|
|
11
|
-
greyLight3: "#f3f4f2";
|
|
12
|
-
greyDark: "#a9a9a9";
|
|
13
|
-
greyDark2: "#586069";
|
|
14
|
-
greyChateau: "#95989a";
|
|
15
|
-
greyGainsboro: "#e3e3e3";
|
|
16
|
-
greyAthens: "#d3dddd";
|
|
17
|
-
eclipse: "#3c3c3c";
|
|
18
|
-
paleNavy: "#e4e8f1";
|
|
19
|
-
saltpan: "#f7f8f6";
|
|
20
|
-
snow: "#f9f9f9";
|
|
21
|
-
love: "#e25555";
|
|
22
|
-
nobel01: "#999999";
|
|
23
|
-
nobel02: "#9f9f9f";
|
|
24
|
-
primary: "#4b5e40";
|
|
25
|
-
secondary: "#20232a";
|
|
26
|
-
background: "#f4f4f4";
|
|
27
|
-
dodgerBlue: "#1ba1f2";
|
|
28
|
-
cyanBlue: "#253341";
|
|
29
|
-
};
|
|
30
|
-
dark: {
|
|
31
|
-
primary: string;
|
|
32
|
-
secondary: string;
|
|
33
|
-
background: string;
|
|
34
|
-
black: "#000";
|
|
35
|
-
white: "#fff";
|
|
36
|
-
red: "#d32f2f";
|
|
37
|
-
orange: "#cd4000";
|
|
38
|
-
greySuperLight: "#f5f5f5";
|
|
39
|
-
greyLight: "#d3d3d3";
|
|
40
|
-
greyLight2: "#908ba1";
|
|
41
|
-
greyLight3: "#f3f4f2";
|
|
42
|
-
greyDark: "#a9a9a9";
|
|
43
|
-
greyDark2: "#586069";
|
|
44
|
-
greyChateau: "#95989a";
|
|
45
|
-
greyGainsboro: "#e3e3e3";
|
|
46
|
-
greyAthens: "#d3dddd";
|
|
47
|
-
eclipse: "#3c3c3c";
|
|
48
|
-
paleNavy: "#e4e8f1";
|
|
49
|
-
saltpan: "#f7f8f6";
|
|
50
|
-
snow: "#f9f9f9";
|
|
51
|
-
love: "#e25555";
|
|
52
|
-
nobel01: "#999999";
|
|
53
|
-
nobel02: "#9f9f9f";
|
|
54
|
-
dodgerBlue: "#1ba1f2";
|
|
55
|
-
cyanBlue: "#253341";
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
export type ThemeMode = keyof typeof themeModes;
|
|
59
|
-
declare const fontSize: {
|
|
60
|
-
readonly xxl: 26;
|
|
61
|
-
readonly xl: 24;
|
|
62
|
-
readonly lg: 21;
|
|
63
|
-
readonly md: 18;
|
|
64
|
-
readonly default: 16;
|
|
65
|
-
readonly sm: 14;
|
|
66
|
-
readonly ssm: 12;
|
|
67
|
-
};
|
|
68
|
-
export type FontSize = keyof typeof fontSize;
|
|
69
|
-
declare const fontWeight: {
|
|
70
|
-
readonly light: 300;
|
|
71
|
-
readonly regular: 400;
|
|
72
|
-
readonly semiBold: 500;
|
|
73
|
-
readonly bold: 700;
|
|
74
|
-
};
|
|
75
|
-
export type FontWeight = keyof typeof fontWeight;
|
|
76
|
-
export declare const breakPoints: {
|
|
77
|
-
readonly xsmall: 400;
|
|
78
|
-
readonly small: 576;
|
|
79
|
-
readonly medium: 768;
|
|
80
|
-
readonly large: 1024;
|
|
81
|
-
readonly container: 1240;
|
|
82
|
-
readonly xlarge: 1275;
|
|
83
|
-
};
|
|
84
|
-
export type BreakPoints = typeof breakPoints;
|
|
85
|
-
declare const customizedTheme: {
|
|
86
|
-
fontSize: {
|
|
87
|
-
readonly xxl: 26;
|
|
88
|
-
readonly xl: 24;
|
|
89
|
-
readonly lg: 21;
|
|
90
|
-
readonly md: 18;
|
|
91
|
-
readonly default: 16;
|
|
92
|
-
readonly sm: 14;
|
|
93
|
-
readonly ssm: 12;
|
|
94
|
-
};
|
|
95
|
-
fontWeight: {
|
|
96
|
-
readonly light: 300;
|
|
97
|
-
readonly regular: 400;
|
|
98
|
-
readonly semiBold: 500;
|
|
99
|
-
readonly bold: 700;
|
|
100
|
-
};
|
|
101
|
-
breakPoints: {
|
|
102
|
-
readonly xsmall: 400;
|
|
103
|
-
readonly small: 576;
|
|
104
|
-
readonly medium: 768;
|
|
105
|
-
readonly large: 1024;
|
|
106
|
-
readonly container: 1240;
|
|
107
|
-
readonly xlarge: 1275;
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
type CustomizedTheme = typeof customizedTheme;
|
|
111
|
-
export interface CustomTheme {
|
|
112
|
-
fontSize: typeof fontSize;
|
|
113
|
-
fontWeight: typeof fontWeight;
|
|
114
|
-
breakPoints: typeof breakPoints;
|
|
115
|
-
}
|
|
116
|
-
export type Theme = MuiTheme & CustomTheme;
|
|
117
|
-
export declare const getTheme: (themeMode: ThemeMode, primaryColor?: string) => Theme;
|
|
1
|
+
import type { Theme as MuiTheme } from '@mui/material/styles';
|
|
2
|
+
import type { ThemeMode } from './modes';
|
|
3
|
+
import type { CustomTheme, CustomizedTheme } from './tokens';
|
|
4
|
+
export type Theme = MuiTheme & CustomizedTheme;
|
|
118
5
|
declare module '@mui/material/styles' {
|
|
119
6
|
interface Theme extends CustomTheme {
|
|
120
7
|
}
|
|
@@ -127,35 +14,4 @@ declare module '@mui/material/styles/createTheme' {
|
|
|
127
14
|
interface DeprecatedThemeOptions extends CustomizedTheme {
|
|
128
15
|
}
|
|
129
16
|
}
|
|
130
|
-
declare
|
|
131
|
-
interface CustomPalette {
|
|
132
|
-
black: string;
|
|
133
|
-
white: string;
|
|
134
|
-
red: string;
|
|
135
|
-
orange: string;
|
|
136
|
-
greySuperLight: string;
|
|
137
|
-
greyLight: string;
|
|
138
|
-
greyLight2: string;
|
|
139
|
-
greyLight3: string;
|
|
140
|
-
greyDark: string;
|
|
141
|
-
greyDark2: string;
|
|
142
|
-
greyChateau: string;
|
|
143
|
-
greyGainsboro: string;
|
|
144
|
-
greyAthens: string;
|
|
145
|
-
eclipse: string;
|
|
146
|
-
paleNavy: string;
|
|
147
|
-
saltpan: string;
|
|
148
|
-
snow: string;
|
|
149
|
-
love: string;
|
|
150
|
-
nobel01: string;
|
|
151
|
-
nobel02: string;
|
|
152
|
-
background: string;
|
|
153
|
-
dodgerBlue: string;
|
|
154
|
-
cyanBlue: string;
|
|
155
|
-
}
|
|
156
|
-
interface Palette extends CustomPalette {
|
|
157
|
-
}
|
|
158
|
-
interface PaletteOptions extends Partial<CustomPalette> {
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
export {};
|
|
17
|
+
export declare const getTheme: (mode: ThemeMode, primaryColor?: string) => Theme;
|
package/build/Theme/theme.js
CHANGED
|
@@ -1,103 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTheme = void 0;
|
|
7
|
+
var _styles = require("@mui/material/styles");
|
|
8
|
+
var _modes = require("./modes");
|
|
9
|
+
var _tokens = require("./tokens");
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
13
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" ==
|
|
5
|
-
function _toPrimitive(t, r) { if ("object" !=
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
black: '#000',
|
|
10
|
-
white: '#fff',
|
|
11
|
-
red: '#d32f2f',
|
|
12
|
-
orange: '#cd4000',
|
|
13
|
-
greySuperLight: '#f5f5f5',
|
|
14
|
-
greyLight: '#d3d3d3',
|
|
15
|
-
greyLight2: '#908ba1',
|
|
16
|
-
greyLight3: '#f3f4f2',
|
|
17
|
-
greyDark: '#a9a9a9',
|
|
18
|
-
greyDark2: '#586069',
|
|
19
|
-
greyChateau: '#95989a',
|
|
20
|
-
greyGainsboro: '#e3e3e3',
|
|
21
|
-
greyAthens: '#d3dddd',
|
|
22
|
-
eclipse: '#3c3c3c',
|
|
23
|
-
paleNavy: '#e4e8f1',
|
|
24
|
-
saltpan: '#f7f8f6',
|
|
25
|
-
snow: '#f9f9f9',
|
|
26
|
-
love: '#e25555',
|
|
27
|
-
nobel01: '#999999',
|
|
28
|
-
nobel02: '#9f9f9f',
|
|
29
|
-
primary: PRIMARY_COLOR,
|
|
30
|
-
secondary: '#20232a',
|
|
31
|
-
background: '#f4f4f4',
|
|
32
|
-
dodgerBlue: '#1ba1f2',
|
|
33
|
-
cyanBlue: '#253341'
|
|
34
|
-
};
|
|
35
|
-
var themeModes = {
|
|
36
|
-
light: _objectSpread({}, colors),
|
|
37
|
-
dark: _objectSpread(_objectSpread({}, colors), {}, {
|
|
38
|
-
primary: '#ffffff',
|
|
39
|
-
secondary: '#424242',
|
|
40
|
-
background: '#1a202c'
|
|
41
|
-
})
|
|
42
|
-
};
|
|
43
|
-
function applyPrimaryColor(mode, primaryColor) {
|
|
44
|
-
if (mode === 'light') {
|
|
45
|
-
themeModes['light'].primary = primaryColor || PRIMARY_COLOR;
|
|
46
|
-
}
|
|
47
|
-
return themeModes[mode];
|
|
48
|
-
}
|
|
49
|
-
var fontSize = {
|
|
50
|
-
xxl: 26,
|
|
51
|
-
xl: 24,
|
|
52
|
-
lg: 21,
|
|
53
|
-
md: 18,
|
|
54
|
-
default: 16,
|
|
55
|
-
sm: 14,
|
|
56
|
-
ssm: 12
|
|
57
|
-
};
|
|
58
|
-
var fontWeight = {
|
|
59
|
-
light: 300,
|
|
60
|
-
regular: 400,
|
|
61
|
-
semiBold: 500,
|
|
62
|
-
bold: 700
|
|
63
|
-
};
|
|
64
|
-
export var breakPoints = {
|
|
65
|
-
xsmall: 400,
|
|
66
|
-
small: 576,
|
|
67
|
-
medium: 768,
|
|
68
|
-
large: 1024,
|
|
69
|
-
container: 1240,
|
|
70
|
-
xlarge: 1275
|
|
71
|
-
};
|
|
72
|
-
var customizedTheme = {
|
|
73
|
-
fontSize,
|
|
74
|
-
fontWeight,
|
|
75
|
-
breakPoints
|
|
76
|
-
};
|
|
77
|
-
export var getTheme = (themeMode, primaryColor) => {
|
|
78
|
-
var palette = applyPrimaryColor(themeMode, primaryColor);
|
|
79
|
-
return createTheme(_objectSpread({
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
|
+
var getTheme = exports.getTheme = function getTheme(mode, primaryColor) {
|
|
17
|
+
return (0, _styles.createTheme)(_objectSpread({
|
|
18
|
+
palette: (0, _modes.getModePalette)(mode, primaryColor),
|
|
80
19
|
typography: {
|
|
81
20
|
fontFamily: ['-apple-system', 'BlinkMacSystemFont', '"Helvetica Neue"', 'Arial', 'sans-serif'].join(',')
|
|
82
21
|
},
|
|
83
|
-
palette: _objectSpread(_objectSpread({
|
|
84
|
-
mode: themeMode
|
|
85
|
-
}, palette), {}, {
|
|
86
|
-
primary: {
|
|
87
|
-
main: palette.primary
|
|
88
|
-
},
|
|
89
|
-
secondary: {
|
|
90
|
-
main: palette.secondary
|
|
91
|
-
},
|
|
92
|
-
error: {
|
|
93
|
-
main: palette.red
|
|
94
|
-
},
|
|
95
|
-
background: {
|
|
96
|
-
default: palette.background
|
|
97
|
-
}
|
|
98
|
-
}),
|
|
99
|
-
// Looks better in darkmode without background opacity
|
|
100
|
-
// https://mui.com/material-ui/migration/v5-component-changes/#change-dark-mode-background-opacity
|
|
101
22
|
components: {
|
|
102
23
|
MuiPaper: {
|
|
103
24
|
styleOverrides: {
|
|
@@ -107,6 +28,6 @@ export var getTheme = (themeMode, primaryColor) => {
|
|
|
107
28
|
}
|
|
108
29
|
}
|
|
109
30
|
}
|
|
110
|
-
}, customizedTheme));
|
|
31
|
+
}, _tokens.customizedTheme));
|
|
111
32
|
};
|
|
112
33
|
//# sourceMappingURL=theme.js.map
|
package/build/Theme/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","names":["
|
|
1
|
+
{"version":3,"file":"theme.js","names":["_styles","require","_modes","_tokens","_typeof","o","Symbol","iterator","constructor","prototype","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","toPrimitive","call","TypeError","String","Number","getTheme","exports","mode","primaryColor","createTheme","palette","getModePalette","typography","fontFamily","join","components","MuiPaper","styleOverrides","root","backgroundImage","customizedTheme"],"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 {}\n interface ThemeOptions extends CustomTheme {}\n}\ndeclare module '@mui/material/styles/createTheme' {\n interface Theme extends CustomizedTheme {}\n\n interface DeprecatedThemeOptions extends CustomizedTheme {}\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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,EACP,YAAY,CACb,CAACC,IAAI,CAAC,GAAG;IACZ,CAAC;IAEDC,UAAU,EAAE;MACVC,QAAQ,EAAE;QACRC,cAAc,EAAE;UACdC,IAAI,EAAE;YACJC,eAAe,EAAE;UACnB;QACF;MACF;IACF;EAAC,GAEEC,uBAAe,CACnB,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const fontSize: {
|
|
2
|
+
readonly xxl: 26;
|
|
3
|
+
readonly xl: 24;
|
|
4
|
+
readonly lg: 21;
|
|
5
|
+
readonly md: 18;
|
|
6
|
+
readonly default: 16;
|
|
7
|
+
readonly sm: 14;
|
|
8
|
+
readonly ssm: 12;
|
|
9
|
+
};
|
|
10
|
+
export type FontSize = keyof typeof fontSize;
|
|
11
|
+
export declare const fontWeight: {
|
|
12
|
+
readonly light: 300;
|
|
13
|
+
readonly regular: 400;
|
|
14
|
+
readonly semiBold: 500;
|
|
15
|
+
readonly bold: 700;
|
|
16
|
+
};
|
|
17
|
+
export type FontWeight = keyof typeof fontWeight;
|
|
18
|
+
export declare const breakPoints: {
|
|
19
|
+
readonly xsmall: 400;
|
|
20
|
+
readonly small: 576;
|
|
21
|
+
readonly medium: 768;
|
|
22
|
+
readonly large: 1024;
|
|
23
|
+
readonly container: 1240;
|
|
24
|
+
readonly xlarge: 1275;
|
|
25
|
+
};
|
|
26
|
+
export type BreakPoints = typeof breakPoints;
|
|
27
|
+
export interface CustomTheme {
|
|
28
|
+
fontSize: typeof fontSize;
|
|
29
|
+
fontWeight: typeof fontWeight;
|
|
30
|
+
breakPoints: typeof breakPoints;
|
|
31
|
+
}
|
|
32
|
+
export declare const customizedTheme: {
|
|
33
|
+
fontSize: {
|
|
34
|
+
readonly xxl: 26;
|
|
35
|
+
readonly xl: 24;
|
|
36
|
+
readonly lg: 21;
|
|
37
|
+
readonly md: 18;
|
|
38
|
+
readonly default: 16;
|
|
39
|
+
readonly sm: 14;
|
|
40
|
+
readonly ssm: 12;
|
|
41
|
+
};
|
|
42
|
+
fontWeight: {
|
|
43
|
+
readonly light: 300;
|
|
44
|
+
readonly regular: 400;
|
|
45
|
+
readonly semiBold: 500;
|
|
46
|
+
readonly bold: 700;
|
|
47
|
+
};
|
|
48
|
+
breakPoints: {
|
|
49
|
+
readonly xsmall: 400;
|
|
50
|
+
readonly small: 576;
|
|
51
|
+
readonly medium: 768;
|
|
52
|
+
readonly large: 1024;
|
|
53
|
+
readonly container: 1240;
|
|
54
|
+
readonly xlarge: 1275;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export type CustomizedTheme = typeof customizedTheme;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.fontWeight = exports.fontSize = exports.customizedTheme = exports.breakPoints = void 0;
|
|
7
|
+
var fontSize = exports.fontSize = {
|
|
8
|
+
xxl: 26,
|
|
9
|
+
xl: 24,
|
|
10
|
+
lg: 21,
|
|
11
|
+
md: 18,
|
|
12
|
+
"default": 16,
|
|
13
|
+
sm: 14,
|
|
14
|
+
ssm: 12
|
|
15
|
+
};
|
|
16
|
+
var fontWeight = exports.fontWeight = {
|
|
17
|
+
light: 300,
|
|
18
|
+
regular: 400,
|
|
19
|
+
semiBold: 500,
|
|
20
|
+
bold: 700
|
|
21
|
+
};
|
|
22
|
+
var breakPoints = exports.breakPoints = {
|
|
23
|
+
xsmall: 400,
|
|
24
|
+
small: 576,
|
|
25
|
+
medium: 768,
|
|
26
|
+
large: 1024,
|
|
27
|
+
container: 1240,
|
|
28
|
+
xlarge: 1275
|
|
29
|
+
};
|
|
30
|
+
var customizedTheme = exports.customizedTheme = {
|
|
31
|
+
fontSize: fontSize,
|
|
32
|
+
fontWeight: fontWeight,
|
|
33
|
+
breakPoints: breakPoints
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","names":["fontSize","exports","xxl","xl","lg","md","sm","ssm","fontWeight","light","regular","semiBold","bold","breakPoints","xsmall","small","medium","large","container","xlarge","customizedTheme"],"sources":["../../src/Theme/tokens.ts"],"sourcesContent":["export const fontSize = {\n xxl: 26,\n xl: 24,\n lg: 21,\n md: 18,\n default: 16,\n sm: 14,\n ssm: 12,\n} as const;\n\nexport type FontSize = keyof typeof fontSize;\n\nexport const fontWeight = {\n light: 300,\n regular: 400,\n semiBold: 500,\n bold: 700,\n} as const;\n\nexport type FontWeight = keyof typeof fontWeight;\n\nexport const breakPoints = {\n xsmall: 400,\n small: 576,\n medium: 768,\n large: 1024,\n container: 1240,\n xlarge: 1275,\n} as const;\n\nexport type BreakPoints = typeof breakPoints;\n\nexport interface CustomTheme {\n fontSize: typeof fontSize;\n fontWeight: typeof fontWeight;\n breakPoints: typeof breakPoints;\n}\n\nexport const customizedTheme = {\n fontSize,\n fontWeight,\n breakPoints,\n};\n\nexport type CustomizedTheme = typeof customizedTheme;\n"],"mappings":";;;;;;AAAO,IAAMA,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG;EACtBE,GAAG,EAAE,EAAE;EACPC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACNC,EAAE,EAAE,EAAE;EACN,WAAS,EAAE;EACXC,EAAE,EAAE,EAAE;EACNC,GAAG,EAAE;AACP,CAAU;AAIH,IAAMC,UAAU,GAAAP,OAAA,CAAAO,UAAA,GAAG;EACxBC,KAAK,EAAE,GAAG;EACVC,OAAO,EAAE,GAAG;EACZC,QAAQ,EAAE,GAAG;EACbC,IAAI,EAAE;AACR,CAAU;AAIH,IAAMC,WAAW,GAAAZ,OAAA,CAAAY,WAAA,GAAG;EACzBC,MAAM,EAAE,GAAG;EACXC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE,GAAG;EACXC,KAAK,EAAE,IAAI;EACXC,SAAS,EAAE,IAAI;EACfC,MAAM,EAAE;AACV,CAAU;AAUH,IAAMC,eAAe,GAAAnB,OAAA,CAAAmB,eAAA,GAAG;EAC7BpB,QAAQ,EAARA,QAAQ;EACRQ,UAAU,EAAVA,UAAU;EACVK,WAAW,EAAXA;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { APIRoute } from '../store/routes';
|
|
2
|
+
export declare const fetcher: <T>(url: string, method: string, body: any, options?: {
|
|
3
|
+
signal?: AbortSignal;
|
|
4
|
+
}) => Promise<T>;
|
|
5
|
+
export declare function useDataMutation<T>(basePath: string, route: APIRoute | string, method?: string, options?: {
|
|
6
|
+
buildUrl?: (basePath: string, route: string) => string;
|
|
7
|
+
}): {
|
|
8
|
+
data: T | undefined;
|
|
9
|
+
error: any;
|
|
10
|
+
isMutating: boolean;
|
|
11
|
+
trigger: import("swr/mutation").TriggerWithOptionsArgs<T, any, string, any>;
|
|
12
|
+
};
|
|
13
|
+
export declare function useTarballDownload(): {
|
|
14
|
+
download: import("swr/mutation").TriggerWithArgs<Blob, any, string, {
|
|
15
|
+
link: string;
|
|
16
|
+
}>;
|
|
17
|
+
isDownloading: boolean;
|
|
18
|
+
error: any;
|
|
19
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.fetcher = void 0;
|
|
8
|
+
exports.useDataMutation = useDataMutation;
|
|
9
|
+
exports.useTarballDownload = useTarballDownload;
|
|
10
|
+
var _mutation = _interopRequireDefault(require("swr/mutation"));
|
|
11
|
+
var _api = _interopRequireDefault(require("../store/api"));
|
|
12
|
+
var _utils = require("../store/utils");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
15
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
22
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
23
|
+
var fetcher = exports.fetcher = /*#__PURE__*/function () {
|
|
24
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(url, method, body, options) {
|
|
25
|
+
var isGet, finalUrl;
|
|
26
|
+
return _regenerator().w(function (_context) {
|
|
27
|
+
while (1) switch (_context.n) {
|
|
28
|
+
case 0:
|
|
29
|
+
isGet = method.toUpperCase() === 'GET';
|
|
30
|
+
finalUrl = url;
|
|
31
|
+
return _context.a(2, _api["default"].request(finalUrl, method, {
|
|
32
|
+
// Only stringify and send body if it's NOT a GET request
|
|
33
|
+
body: isGet ? undefined : JSON.stringify(body),
|
|
34
|
+
headers: _objectSpread({
|
|
35
|
+
Accept: _utils.HEADERS.JSON
|
|
36
|
+
}, isGet ? {} : {
|
|
37
|
+
'Content-Type': _utils.HEADERS.JSON
|
|
38
|
+
}),
|
|
39
|
+
signal: options === null || options === void 0 ? void 0 : options.signal
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
}, _callee);
|
|
43
|
+
}));
|
|
44
|
+
return function fetcher(_x, _x2, _x3, _x4) {
|
|
45
|
+
return _ref.apply(this, arguments);
|
|
46
|
+
};
|
|
47
|
+
}();
|
|
48
|
+
function useDataMutation(basePath, route) {
|
|
49
|
+
var method = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'POST';
|
|
50
|
+
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
51
|
+
var key = options.buildUrl ? options.buildUrl(basePath, route) : "".concat(basePath).concat(route);
|
|
52
|
+
var _useSWRMutation = (0, _mutation["default"])(key, function (url, _ref2) {
|
|
53
|
+
var arg = _ref2.arg;
|
|
54
|
+
return fetcher(url, method, arg !== null && arg !== void 0 ? arg : {});
|
|
55
|
+
}),
|
|
56
|
+
data = _useSWRMutation.data,
|
|
57
|
+
error = _useSWRMutation.error,
|
|
58
|
+
isMutating = _useSWRMutation.isMutating,
|
|
59
|
+
trigger = _useSWRMutation.trigger;
|
|
60
|
+
return {
|
|
61
|
+
data: data,
|
|
62
|
+
error: error,
|
|
63
|
+
isMutating: isMutating,
|
|
64
|
+
trigger: trigger
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function tarballFetcher(_x5, _x6) {
|
|
68
|
+
return _tarballFetcher.apply(this, arguments);
|
|
69
|
+
}
|
|
70
|
+
function _tarballFetcher() {
|
|
71
|
+
_tarballFetcher = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(url, _ref3) {
|
|
72
|
+
var arg;
|
|
73
|
+
return _regenerator().w(function (_context2) {
|
|
74
|
+
while (1) switch (_context2.n) {
|
|
75
|
+
case 0:
|
|
76
|
+
arg = _ref3.arg;
|
|
77
|
+
return _context2.a(2, _api["default"].request(arg.link, 'GET', {
|
|
78
|
+
headers: {
|
|
79
|
+
accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3'
|
|
80
|
+
},
|
|
81
|
+
credentials: 'include'
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
}, _callee2);
|
|
85
|
+
}));
|
|
86
|
+
return _tarballFetcher.apply(this, arguments);
|
|
87
|
+
}
|
|
88
|
+
function useTarballDownload() {
|
|
89
|
+
var _useSWRMutation2 = (0, _mutation["default"])('tarball-download', tarballFetcher),
|
|
90
|
+
trigger = _useSWRMutation2.trigger,
|
|
91
|
+
isMutating = _useSWRMutation2.isMutating,
|
|
92
|
+
error = _useSWRMutation2.error;
|
|
93
|
+
return {
|
|
94
|
+
download: trigger,
|
|
95
|
+
isDownloading: isMutating,
|
|
96
|
+
error: error
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=use-data-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-data-mutation.js","names":["_mutation","_interopRequireDefault","require","_api","_utils","e","__esModule","_regenerator","t","r","Symbol","n","iterator","o","toStringTag","i","c","prototype","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","length","l","TypeError","call","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","w","m","defineProperty","_regeneratorDefine","_invoke","enumerable","configurable","writable","ownKeys","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","push","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","_toPrimitive","_typeof","toPrimitive","String","Number","asyncGeneratorStep","Promise","resolve","then","_asyncToGenerator","_next","_throw","fetcher","exports","_ref","_callee","url","method","body","options","isGet","finalUrl","_context","toUpperCase","API","request","undefined","JSON","stringify","headers","Accept","HEADERS","signal","_x","_x2","_x3","_x4","useDataMutation","basePath","route","key","buildUrl","concat","_useSWRMutation","useSWRMutation","_ref2","arg","data","error","isMutating","trigger","tarballFetcher","_x5","_x6","_tarballFetcher","_callee2","_ref3","_context2","link","accept","credentials","useTarballDownload","_useSWRMutation2","download","isDownloading"],"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"],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AA,eAAA,GAAA7C,iBAAA,cAAAnE,YAAA,GAAAqC,CAAA,CAA7B,SAAA4E,SAA8BvC,GAAW,EAAAwC,KAAA;IAAA,IAAAV,GAAA;IAAA,OAAAxG,YAAA,GAAAoC,CAAA,WAAA+E,SAAA;MAAA,kBAAAA,SAAA,CAAA/G,CAAA;QAAA;UAAIoG,GAAG,GAAAU,KAAA,CAAHV,GAAG;UAAA,OAAAW,SAAA,CAAA9F,CAAA,IACvC6D,eAAG,CAACC,OAAO,CAAOqB,GAAG,CAACY,IAAI,EAAE,KAAK,EAAE;YACxC7B,OAAO,EAAE;cACP8B,MAAM,EACJ;YACJ,CAAC;YACDC,WAAW,EAAE;UACf,CAAC,CAAC;MAAA;IAAA,GAAAL,QAAA;EAAA,CACH;EAAA,OAAAD,eAAA,CAAA9D,KAAA,OAAAE,SAAA;AAAA;AAEM,SAASmE,kBAAkBA,CAAA,EAAG;EACnC,IAAAC,gBAAA,GAAuC,IAAAlB,oBAAc,EACnD,kBAAkB,EAClBO,cACF,CAAC;IAHOD,OAAO,GAAAY,gBAAA,CAAPZ,OAAO;IAAED,UAAU,GAAAa,gBAAA,CAAVb,UAAU;IAAED,KAAK,GAAAc,gBAAA,CAALd,KAAK;EAKlC,OAAO;IACLe,QAAQ,EAAEb,OAAO;IACjBc,aAAa,EAAEf,UAAU;IACzBD,KAAK,EAALA;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useData = useData;
|
|
7
|
+
var _swr = _interopRequireDefault(require("swr"));
|
|
8
|
+
var _api = _interopRequireDefault(require("../store/api"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function buildUrl(basePath, route, packageName, packageVersion) {
|
|
11
|
+
var url = "".concat(basePath).concat(route);
|
|
12
|
+
if (packageName) {
|
|
13
|
+
url += packageName;
|
|
14
|
+
}
|
|
15
|
+
if (packageVersion) {
|
|
16
|
+
url += "?v=".concat(packageVersion);
|
|
17
|
+
}
|
|
18
|
+
return url;
|
|
19
|
+
}
|
|
20
|
+
function useData(basePath, route, packageName, packageVersion) {
|
|
21
|
+
var url = buildUrl(basePath, route, packageName, packageVersion);
|
|
22
|
+
var _useSWR = (0, _swr["default"])(url, function () {
|
|
23
|
+
return _api["default"].request(url);
|
|
24
|
+
}),
|
|
25
|
+
data = _useSWR.data,
|
|
26
|
+
error = _useSWR.error,
|
|
27
|
+
isLoading = _useSWR.isLoading,
|
|
28
|
+
mutate = _useSWR.mutate;
|
|
29
|
+
return {
|
|
30
|
+
data: data,
|
|
31
|
+
error: error,
|
|
32
|
+
isLoading: isLoading,
|
|
33
|
+
mutate: mutate
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=use-data.js.map
|