@scalar/api-client 2.2.51 → 2.2.53
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/CHANGELOG.md +66 -0
- package/dist/components/AddressBar/AddressBar.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBar.vue.js +2 -2
- package/dist/components/AddressBar/AddressBar.vue2.js +30 -30
- package/dist/components/AddressBar/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/components/AddressBar/AddressBarHistory.vue.js +2 -2
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +22 -22
- package/dist/components/CodeInput/CodeInput.vue.d.ts +3 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +38 -38
- package/dist/components/CommandPalette/CommandActionForm.vue.js +2 -2
- package/dist/components/CommandPalette/CommandActionInput.vue.js +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteExample.vue.js +13 -13
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +143 -114
- package/dist/components/CommandPalette/CommandPaletteServer.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteServer.vue.js +59 -51
- package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +85 -82
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +2 -2
- package/dist/components/ContextBar.vue.js +2 -2
- package/dist/components/ContextBar.vue2.js +2 -2
- package/dist/components/DataTable/DataTable.vue.js +1 -1
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +11 -11
- package/dist/components/DataTable/DataTableCheckbox.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue.d.ts +175 -6
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue2.js +57 -48
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +1 -1
- package/dist/components/DataTable/DataTableText.vue.js +1 -1
- package/dist/components/EmptyState.vue.js +1 -1
- package/dist/components/EmptyState.vue2.js +4 -4
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +13 -13
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +56 -36
- package/dist/components/Form/LabelInput.vue.d.ts +14 -0
- package/dist/components/Form/LabelInput.vue.d.ts.map +1 -0
- package/dist/components/Form/LabelInput.vue.js +7 -0
- package/dist/components/Form/LabelInput.vue2.js +42 -0
- package/dist/components/HelpfulLink.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue2.js +1 -1
- package/dist/components/IconSelector.vue.js +3 -3
- package/dist/components/ImportCollection/DropEventListener.vue.js +3 -3
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +8 -8
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +1 -1
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/PrefetchError.vue.js +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +15 -15
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts +2 -2
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +13 -13
- package/dist/components/ScalarAsciiArt.vue.js +3 -3
- package/dist/components/Search/useSearch.d.ts.map +1 -1
- package/dist/components/Search/useSearch.js +5 -13
- package/dist/components/Server/ServerDropdown.vue.d.ts +0 -1
- package/dist/components/Server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdown.vue.js +40 -57
- package/dist/components/Server/ServerDropdownItem.vue.d.ts +0 -1
- package/dist/components/Server/ServerDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerDropdownItem.vue.js +1 -1
- package/dist/components/Server/ServerDropdownItem.vue2.js +19 -20
- package/dist/components/Server/ServerSelector.vue.d.ts +12 -0
- package/dist/components/Server/ServerSelector.vue.d.ts.map +1 -0
- package/dist/components/Server/ServerSelector.vue.js +85 -0
- package/dist/components/Server/ServerSelector.vue2.js +4 -0
- package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesForm.vue.js +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.js +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.js +1 -1
- package/dist/components/Server/index.d.ts +1 -0
- package/dist/components/Server/index.d.ts.map +1 -1
- package/dist/components/Server/index.js +6 -4
- package/dist/components/Server/types.d.ts.map +1 -1
- package/dist/components/SideNav/DownloadAppButton.vue.d.ts.map +1 -1
- package/dist/components/SideNav/DownloadAppButton.vue.js +2 -2
- package/dist/components/SideNav/DownloadAppButton.vue2.js +6 -6
- package/dist/components/SideNav/SideHelp.vue.js +12 -12
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +73 -58
- package/dist/components/SideNav/SideNavLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +3 -3
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts +2 -2
- package/dist/components/SideNav/SideNavRouterLink.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavRouterLink.vue.js +17 -28
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +1 -1
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +12 -12
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +4 -4
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +2 -2
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +3 -3
- package/dist/components/Sidebar/Sidebar.vue.d.ts +1 -4
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.js +1 -1
- package/dist/components/Sidebar/Sidebar.vue2.js +34 -34
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +6 -6
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +2 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +36 -46
- package/dist/components/Sidebar/SidebarListElementActions.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +7 -7
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts +1 -8
- package/dist/components/Sidebar/SidebarToggle.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarToggle.vue.js +20 -21
- package/dist/components/TopNav/TopNav.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNav.vue.js +104 -85
- package/dist/components/TopNav/TopNavItem.vue.d.ts +2 -2
- package/dist/components/TopNav/TopNavItem.vue.d.ts.map +1 -1
- package/dist/components/TopNav/TopNavItem.vue.js +2 -2
- package/dist/components/TopNav/TopNavItem.vue2.js +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayout.vue.js +16 -10
- package/dist/components/ViewLayout/ViewLayout.vue2.js +4 -0
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +29 -29
- package/dist/components/ViewLayout/ViewLayoutContent.vue.js +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +20 -13
- package/dist/components/ViewLayout/ViewLayoutSection.vue2.js +4 -0
- package/dist/constants.d.ts +16 -12
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +35 -6
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +5 -7
- package/dist/hooks/useFileDialog.d.ts +1 -1
- package/dist/hooks/useFileDialog.d.ts.map +1 -1
- package/dist/hooks/useFileDialog.js +1 -6
- package/dist/hooks/useResponseBody.d.ts.map +1 -1
- package/dist/hooks/useResponseBody.js +3 -9
- package/dist/hooks/useSidebar.d.ts +19 -2
- package/dist/hooks/useSidebar.d.ts.map +1 -1
- package/dist/hooks/useSidebar.js +25 -9
- package/dist/hooks/useSidebar.test.d.ts +2 -0
- package/dist/hooks/useSidebar.test.d.ts.map +1 -0
- package/dist/layouts/App/ApiClientApp.vue.d.ts.map +1 -1
- package/dist/layouts/App/ApiClientApp.vue.js +41 -35
- package/dist/layouts/App/MainLayout.vue.js +4 -4
- package/dist/layouts/App/create-api-client-app.d.ts +207 -255
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.d.ts.map +1 -1
- package/dist/layouts/Modal/ApiClientModal.vue.js +2 -2
- package/dist/layouts/Modal/ApiClientModal.vue2.js +8 -8
- package/dist/layouts/Modal/create-api-client-modal.d.ts +414 -510
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.d.ts.map +1 -1
- package/dist/layouts/Web/ApiClientWeb.vue.js +39 -33
- package/dist/layouts/Web/create-api-client-web.d.ts +207 -255
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +200 -248
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +79 -63
- package/dist/libs/errors.d.ts.map +1 -1
- package/dist/libs/extractAttachmentFilename.d.ts.map +1 -1
- package/dist/libs/extractAttachmentFilename.js +1 -3
- package/dist/libs/find-request.d.ts.map +1 -1
- package/dist/libs/getOpenApiDocumentDetails.d.ts.map +1 -1
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +2 -12
- package/dist/libs/isUrl.d.ts.map +1 -1
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/local-storage.js +1 -9
- package/dist/libs/normalize-headers.d.ts.map +1 -1
- package/dist/libs/normalize-headers.js +2 -6
- package/dist/libs/parse-curl.d.ts.map +1 -1
- package/dist/libs/parse-curl.js +1 -5
- package/dist/libs/postman.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-body.d.ts +1 -1
- package/dist/libs/send-request/create-fetch-body.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-body.js +1 -2
- package/dist/libs/send-request/create-fetch-headers.d.ts.map +1 -1
- package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +6 -12
- package/dist/libs/send-request/create-request-operation.test.d.ts +0 -3
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/string-template.d.ts.map +1 -1
- package/dist/libs/string-template.js +1 -4
- package/dist/router.d.ts.map +1 -1
- package/dist/routes.d.ts +62 -14
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +93 -75
- package/dist/store/active-entities.d.ts +32 -32
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/active-entities.js +37 -35
- package/dist/store/collections.d.ts +164 -164
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/cookies.d.ts +4 -4
- package/dist/store/cookies.d.ts.map +1 -1
- package/dist/store/cookies.js +1 -5
- package/dist/store/environment.d.ts +4 -4
- package/dist/store/request-example.d.ts +2 -2
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +8 -8
- package/dist/store/store-context.d.ts.map +1 -1
- package/dist/store/store.d.ts +200 -248
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/store/workspace.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/tailwind/desktop-variants.d.ts.map +1 -1
- package/dist/types/vue.d.ts.map +1 -1
- package/dist/views/Collection/Collection.vue.d.ts.map +1 -1
- package/dist/views/Collection/Collection.vue.js +4 -0
- package/dist/views/Collection/Collection.vue2.js +50 -0
- package/dist/views/Collection/CollectionAuthentication.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionAuthentication.vue.js +4 -0
- package/dist/views/Collection/CollectionAuthentication.vue2.js +16 -0
- package/dist/views/Collection/CollectionCookies.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionCookies.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionCookies.vue.js +4 -0
- package/dist/views/Collection/CollectionCookies.vue2.js +16 -0
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionEnvironment.vue.js +4 -0
- package/dist/views/Collection/CollectionEnvironment.vue2.js +16 -0
- package/dist/views/{Servers/Servers.vue.d.ts → Collection/CollectionInfoForm.vue.d.ts} +1 -1
- package/dist/views/Collection/CollectionInfoForm.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionInfoForm.vue.js +7 -0
- package/dist/views/Collection/CollectionInfoForm.vue2.js +70 -0
- package/dist/views/Collection/CollectionNavigation.vue.d.ts +6 -0
- package/dist/views/Collection/CollectionNavigation.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionNavigation.vue.js +142 -0
- package/dist/views/Collection/CollectionNavigation.vue2.js +4 -0
- package/dist/views/Collection/CollectionOverview.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionOverview.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionOverview.vue.js +4 -0
- package/dist/views/Collection/CollectionOverview.vue2.js +37 -0
- package/dist/views/Collection/CollectionScripts.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionScripts.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionScripts.vue.js +4 -0
- package/dist/views/Collection/CollectionScripts.vue2.js +16 -0
- package/dist/views/Collection/CollectionServerForm.vue.d.ts +10 -0
- package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionServerForm.vue.js +74 -0
- package/dist/views/Collection/CollectionServerForm.vue2.js +4 -0
- package/dist/views/{Servers/ServerForm.vue.d.ts → Collection/CollectionServers.vue.d.ts} +1 -1
- package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionServers.vue.js +4 -0
- package/dist/views/Collection/CollectionServers.vue2.js +124 -0
- package/dist/views/Collection/CollectionSettings.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionSettings.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionSettings.vue.js +7 -0
- package/dist/views/Collection/CollectionSettings.vue2.js +124 -0
- package/dist/views/Collection/CollectionSync.vue.d.ts +3 -0
- package/dist/views/Collection/CollectionSync.vue.d.ts.map +1 -0
- package/dist/views/Collection/CollectionSync.vue.js +4 -0
- package/dist/views/Collection/CollectionSync.vue2.js +16 -0
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts +16 -0
- package/dist/views/Collection/components/MarkdownInput.vue.d.ts.map +1 -0
- package/dist/views/Collection/components/MarkdownInput.vue.js +7 -0
- package/dist/views/Collection/components/MarkdownInput.vue2.js +95 -0
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +7 -7
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +1 -3
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +1 -5
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +1 -5
- package/dist/views/Cookies/CookieForm.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieForm.vue.js +18 -23
- package/dist/views/Cookies/CookieModal.vue.d.ts.map +1 -1
- package/dist/views/Cookies/CookieModal.vue.js +1 -1
- package/dist/views/Cookies/CookieModal.vue2.js +7 -7
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +96 -78
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +125 -112
- package/dist/views/Environment/EnvironmentColorModal.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentColorModal.vue.js +5 -5
- package/dist/views/Environment/EnvironmentColors.vue.js +8 -8
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +16 -16
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +114 -171
- package/dist/views/Request/RequestRoot.vue.d.ts +13 -0
- package/dist/views/Request/RequestRoot.vue.d.ts.map +1 -0
- package/dist/views/Request/RequestRoot.vue.js +7 -0
- package/dist/views/Request/RequestRoot.vue2.js +78 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +9 -9
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +5 -5
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +104 -89
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +5 -5
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +59 -65
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +3 -3
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +22 -23
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +14 -14
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +6 -6
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +38 -38
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +34 -33
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +5 -5
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +2 -6
- package/dist/views/Request/RequestSidebar.vue.d.ts +3 -10
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +186 -188
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +290 -173
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +13 -13
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts +1 -4
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue2.js +51 -51
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +12 -12
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +8 -8
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +20 -20
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +25 -26
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +3 -3
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +7 -7
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +7 -7
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.js +12 -37
- package/dist/views/Request/libs/request.d.ts +4 -0
- package/dist/views/Request/libs/request.d.ts.map +1 -1
- package/dist/views/Request/libs/request.js +2 -1
- package/dist/views/Request/libs/watch-mode.d.ts.map +1 -1
- package/dist/views/Request/libs/watch-mode.js +63 -63
- package/dist/views/Request/types/sidebar-item.d.ts +1 -1
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue2.js +8 -8
- package/dist/views/Settings/components/SettingsAppearance.vue.js +6 -6
- package/dist/vitest.setup.d.ts +16 -0
- package/dist/vitest.setup.d.ts.map +1 -0
- package/package.json +16 -21
- package/dist/views/Servers/ServerForm.vue.d.ts.map +0 -1
- package/dist/views/Servers/ServerForm.vue.js +0 -39
- package/dist/views/Servers/ServerForm.vue2.js +0 -4
- package/dist/views/Servers/Servers.vue.d.ts.map +0 -1
- package/dist/views/Servers/Servers.vue.js +0 -4
- package/dist/views/Servers/Servers.vue2.js +0 -168
- package/dist/views/Servers/index.d.ts +0 -2
- package/dist/views/Servers/index.d.ts.map +0 -1
- package/dist/views/Servers/index.js +0 -4
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as q, ref as x, computed as B, openBlock as i, createBlock as b, withCtx as l, createVNode as r, unref as n, createElementVNode as k, createElementBlock as P, Fragment as W, renderList as $, createTextVNode as u, toDisplayString as h, createCommentVNode as I } from "vue";
|
|
2
|
+
import { ScalarDropdown as j, ScalarDropdownItem as z, ScalarButton as M, ScalarIcon as T } from "@scalar/components";
|
|
3
|
+
import { isDefined as U } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { useToasts as A } from "@scalar/use-toasts";
|
|
5
|
+
import { useRouter as F } from "vue-router";
|
|
2
6
|
import _ from "../HttpMethod/HttpMethod.vue.js";
|
|
3
7
|
import { PathId as c } from "../../routes.js";
|
|
4
|
-
import { useActiveEntities as
|
|
5
|
-
import { ScalarDropdown as z, ScalarDropdownItem as M, ScalarButton as T, ScalarIcon as U } from "@scalar/components";
|
|
6
|
-
import { isDefined as A } from "@scalar/oas-utils/helpers";
|
|
7
|
-
import { useToasts as F } from "@scalar/use-toasts";
|
|
8
|
-
import { useRouter as H } from "vue-router";
|
|
8
|
+
import { useActiveEntities as H } from "../../store/active-entities.js";
|
|
9
9
|
import L from "./CommandActionForm.vue.js";
|
|
10
10
|
import O from "./CommandActionInput.vue.js";
|
|
11
11
|
import { useWorkspace as G } from "../../store/store.js";
|
|
12
|
-
const J = { class: "flex items-center gap-2" }, K = { class: "max-h-40
|
|
12
|
+
const J = { class: "flex items-center gap-2" }, K = { class: "custom-scroll max-h-40" }, ne = /* @__PURE__ */ q({
|
|
13
13
|
__name: "CommandPaletteExample",
|
|
14
14
|
props: {
|
|
15
15
|
metaData: {}
|
|
@@ -17,7 +17,7 @@ const J = { class: "flex items-center gap-2" }, K = { class: "max-h-40 custom-sc
|
|
|
17
17
|
emits: ["close", "back"],
|
|
18
18
|
setup(C, { emit: E }) {
|
|
19
19
|
var v;
|
|
20
|
-
const w = C, p = E, { push: D } =
|
|
20
|
+
const w = C, p = E, { push: D } = F(), { activeRequest: S, activeWorkspace: g, activeWorkspaceRequests: y } = H(), { requests: s, requestExampleMutators: N } = G(), { toast: d } = A(), m = x(""), a = x(
|
|
21
21
|
// Ensure we pre-select the correct request
|
|
22
22
|
s[((v = w.metaData) == null ? void 0 : v.itemUid) ?? ""] ?? S.value
|
|
23
23
|
), f = (o) => a.value = o, V = () => {
|
|
@@ -43,7 +43,7 @@ const J = { class: "flex items-center gap-2" }, K = { class: "max-h-40 custom-sc
|
|
|
43
43
|
}
|
|
44
44
|
}), p("close"));
|
|
45
45
|
}, R = B(
|
|
46
|
-
() => y.value.map((o) => s == null ? void 0 : s[o]).filter(
|
|
46
|
+
() => y.value.map((o) => s == null ? void 0 : s[o]).filter(U)
|
|
47
47
|
);
|
|
48
48
|
return (o, e) => a.value ? (i(), b(L, {
|
|
49
49
|
key: 0,
|
|
@@ -51,13 +51,13 @@ const J = { class: "flex items-center gap-2" }, K = { class: "max-h-40 custom-sc
|
|
|
51
51
|
onSubmit: V
|
|
52
52
|
}, {
|
|
53
53
|
options: l(() => [
|
|
54
|
-
r(n(
|
|
54
|
+
r(n(j), {
|
|
55
55
|
placement: "bottom",
|
|
56
56
|
resize: ""
|
|
57
57
|
}, {
|
|
58
58
|
items: l(() => [
|
|
59
59
|
k("div", K, [
|
|
60
|
-
(i(!0), P(W, null, $(R.value, (t) => (i(), b(n(
|
|
60
|
+
(i(!0), P(W, null, $(R.value, (t) => (i(), b(n(z), {
|
|
61
61
|
key: t.uid,
|
|
62
62
|
class: "flex h-7 w-full items-center justify-between px-1 pr-[26px]",
|
|
63
63
|
onClick: (Q) => f(t)
|
|
@@ -73,8 +73,8 @@ const J = { class: "flex items-center gap-2" }, K = { class: "max-h-40 custom-sc
|
|
|
73
73
|
])
|
|
74
74
|
]),
|
|
75
75
|
default: l(() => [
|
|
76
|
-
r(n(
|
|
77
|
-
class: "
|
|
76
|
+
r(n(M), {
|
|
77
|
+
class: "hover:bg-b-2 max-h-8 w-full justify-between gap-1 p-2 text-xs",
|
|
78
78
|
variant: "outlined",
|
|
79
79
|
onClick: e[2] || (e[2] = (t) => f(a.value))
|
|
80
80
|
}, {
|
|
@@ -84,7 +84,7 @@ const J = { class: "flex items-center gap-2" }, K = { class: "max-h-40 custom-sc
|
|
|
84
84
|
r(_, {
|
|
85
85
|
method: a.value.method
|
|
86
86
|
}, null, 8, ["method"]),
|
|
87
|
-
r(n(
|
|
87
|
+
r(n(T), {
|
|
88
88
|
class: "text-c-3",
|
|
89
89
|
icon: "ChevronDown",
|
|
90
90
|
size: "md"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"CommandPaletteImport.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteImport.vue"],"names":[],"mappings":";;;;;;;AAqtBA,wBAOG"}
|
|
@@ -1,113 +1,142 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useLoadingState as
|
|
3
|
-
import { useToasts as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
1
|
+
import { defineComponent as J, ref as L, computed as C, watch as R, openBlock as i, createBlock as U, unref as s, withCtx as v, createElementVNode as w, createVNode as b, createTextVNode as f, createElementBlock as c, Fragment as g, toDisplayString as V, createCommentVNode as Y } from "vue";
|
|
2
|
+
import { useLoadingState as q, ScalarButton as T, ScalarIcon as G, ScalarTooltip as H, ScalarCodeBlock as K } from "@scalar/components";
|
|
3
|
+
import { useToasts as Q } from "@scalar/use-toasts";
|
|
4
|
+
import { useRouter as X } from "vue-router";
|
|
5
|
+
import { useActiveEntities as Z } from "../../store/active-entities.js";
|
|
6
|
+
import ee from "./CommandActionForm.vue.js";
|
|
7
|
+
import te from "./CommandActionInput.vue.js";
|
|
8
|
+
import oe from "./WatchModeToggle.vue.js";
|
|
9
|
+
import { isPostmanCollection as _, getPostmanDocumentDetails as le, convertPostmanToOpenApi as F } from "../../libs/postman.js";
|
|
10
|
+
import { getOpenApiDocumentDetails as ae } from "../../libs/getOpenApiDocumentDetails.js";
|
|
11
|
+
import { isUrl as P } from "../../libs/isUrl.js";
|
|
12
|
+
import { useFileDialog as ne } from "../../hooks/useFileDialog.js";
|
|
13
|
+
import { PathId as M } from "../../routes.js";
|
|
14
|
+
import { useWorkspace as ie } from "../../store/store.js";
|
|
15
|
+
const re = { class: "flex justify-between" }, se = { class: "flex w-full flex-row items-center justify-between gap-3" }, ue = { class: "w-content bg-b-1 z-100 text-xxs text-c-1 pointer-events-none z-10 grid max-w-[320px] gap-1.5 rounded p-2 leading-5 shadow-lg" }, ce = { class: "text-c-2 flex items-center" }, me = {
|
|
14
16
|
key: 0,
|
|
15
17
|
class: "text-pretty"
|
|
16
|
-
},
|
|
18
|
+
}, de = {
|
|
17
19
|
key: 1,
|
|
18
20
|
class: "text-pretty"
|
|
19
|
-
},
|
|
21
|
+
}, _e = /* @__PURE__ */ J({
|
|
20
22
|
__name: "CommandPaletteImport",
|
|
21
23
|
emits: ["close", "back"],
|
|
22
|
-
setup(
|
|
23
|
-
const S =
|
|
24
|
-
() =>
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
setup(pe, { emit: $ }) {
|
|
25
|
+
const S = $, z = X(), { activeWorkspace: m } = Z(), { importSpecFile: k, importSpecFromUrl: B } = ie(), { toast: d } = Q(), p = q(), o = L(""), y = L(!0), r = C(() => _(o.value) ? le(o.value) : ae(o.value)), A = C(
|
|
26
|
+
() => r.value ? r.value.type : "json"
|
|
27
|
+
);
|
|
28
|
+
function x(l) {
|
|
29
|
+
var e;
|
|
30
|
+
l && z.push({
|
|
31
|
+
name: "collection",
|
|
32
|
+
params: {
|
|
33
|
+
[M.Workspace]: (e = m.value) == null ? void 0 : e.uid,
|
|
34
|
+
[M.Collection]: l.uid
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const h = C(() => P(o.value)), N = C(() => !!r.value), { open: j } = ne({
|
|
39
|
+
onChange: async (l) => {
|
|
40
|
+
const e = l == null ? void 0 : l[0];
|
|
28
41
|
if (e) {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
const
|
|
42
|
+
const a = new FileReader();
|
|
43
|
+
a.onload = async (I) => {
|
|
44
|
+
var u, O, D;
|
|
45
|
+
const t = (u = I.target) == null ? void 0 : u.result;
|
|
33
46
|
try {
|
|
34
|
-
|
|
35
|
-
await
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
47
|
+
if (_(t)) {
|
|
48
|
+
const n = await k(
|
|
49
|
+
await F(t),
|
|
50
|
+
((O = m.value) == null ? void 0 : O.uid) ?? ""
|
|
51
|
+
);
|
|
52
|
+
x(n == null ? void 0 : n.collection);
|
|
53
|
+
} else {
|
|
54
|
+
const n = await k(
|
|
55
|
+
t,
|
|
56
|
+
((D = m.value) == null ? void 0 : D.uid) ?? ""
|
|
57
|
+
);
|
|
58
|
+
x(n == null ? void 0 : n.collection);
|
|
59
|
+
}
|
|
60
|
+
d("Import successful", "info"), S("close");
|
|
61
|
+
} catch (n) {
|
|
62
|
+
console.error(n);
|
|
63
|
+
const E = (n == null ? void 0 : n.message) || "Unknown error";
|
|
64
|
+
d(`Import failed: ${E}`, "error");
|
|
42
65
|
}
|
|
43
|
-
},
|
|
66
|
+
}, a.readAsText(e);
|
|
44
67
|
}
|
|
45
68
|
},
|
|
46
69
|
multiple: !1,
|
|
47
70
|
accept: ".json,.yaml,.yml"
|
|
48
71
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}),
|
|
52
|
-
|
|
72
|
+
R(h, (l) => {
|
|
73
|
+
l || (y.value = !1);
|
|
74
|
+
}), R(o, (l) => {
|
|
75
|
+
P(l) || (y.value = !1);
|
|
53
76
|
});
|
|
54
|
-
async function
|
|
55
|
-
var
|
|
56
|
-
if (!(!
|
|
57
|
-
|
|
77
|
+
async function W() {
|
|
78
|
+
var l, e, a, I;
|
|
79
|
+
if (!(!o.value || p.isLoading)) {
|
|
80
|
+
p.startLoading();
|
|
58
81
|
try {
|
|
59
|
-
if (
|
|
60
|
-
const [
|
|
61
|
-
|
|
62
|
-
((
|
|
82
|
+
if (h.value) {
|
|
83
|
+
const [t, u] = await B(
|
|
84
|
+
o.value,
|
|
85
|
+
((l = m.value) == null ? void 0 : l.uid) ?? "",
|
|
63
86
|
{
|
|
64
|
-
proxyUrl: (e =
|
|
65
|
-
watchMode:
|
|
87
|
+
proxyUrl: (e = m.value) == null ? void 0 : e.proxyUrl,
|
|
88
|
+
watchMode: y.value
|
|
66
89
|
}
|
|
67
90
|
);
|
|
68
|
-
if (
|
|
69
|
-
|
|
91
|
+
if (x(u == null ? void 0 : u.collection), t) {
|
|
92
|
+
d(
|
|
70
93
|
"There was a possible CORS error while importing your spec, please make sure this server is allowed in the CORS policy of your OpenAPI document.",
|
|
71
94
|
"error",
|
|
72
95
|
{ timeout: 5e3 }
|
|
73
|
-
),
|
|
96
|
+
), p.invalidate(2e3, !0);
|
|
74
97
|
return;
|
|
75
98
|
}
|
|
76
|
-
} else if (
|
|
77
|
-
|
|
78
|
-
await
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
(
|
|
83
|
-
|
|
99
|
+
} else if (N.value)
|
|
100
|
+
if (_(o.value)) {
|
|
101
|
+
const t = await k(
|
|
102
|
+
await F(o.value),
|
|
103
|
+
((a = m.value) == null ? void 0 : a.uid) ?? ""
|
|
104
|
+
);
|
|
105
|
+
x(t == null ? void 0 : t.collection), d("Successfully converted Postman collection", "info");
|
|
106
|
+
} else {
|
|
107
|
+
const t = await k(
|
|
108
|
+
o.value,
|
|
109
|
+
((I = m.value) == null ? void 0 : I.uid) ?? ""
|
|
110
|
+
);
|
|
111
|
+
x(t == null ? void 0 : t.collection);
|
|
112
|
+
}
|
|
84
113
|
else {
|
|
85
|
-
|
|
114
|
+
d("Import failed: Invalid URL or OpenAPI document", "error"), p.invalidate(2e3, !0);
|
|
86
115
|
return;
|
|
87
116
|
}
|
|
88
|
-
|
|
89
|
-
} catch (
|
|
90
|
-
console.error("[importCollection]",
|
|
91
|
-
const
|
|
92
|
-
|
|
117
|
+
p.clear(), S("close"), d("Import successful", "info");
|
|
118
|
+
} catch (t) {
|
|
119
|
+
console.error("[importCollection]", t);
|
|
120
|
+
const u = (t == null ? void 0 : t.message) || "Unknown error";
|
|
121
|
+
p.invalidate(2e3, !0), d(`Import failed: ${u}`, "error");
|
|
93
122
|
}
|
|
94
123
|
}
|
|
95
124
|
}
|
|
96
|
-
return (
|
|
97
|
-
disabled: !
|
|
98
|
-
loading:
|
|
99
|
-
onSubmit:
|
|
125
|
+
return (l, e) => (i(), U(ee, {
|
|
126
|
+
disabled: !o.value.trim(),
|
|
127
|
+
loading: s(p),
|
|
128
|
+
onSubmit: W
|
|
100
129
|
}, {
|
|
101
|
-
options:
|
|
102
|
-
|
|
103
|
-
|
|
130
|
+
options: v(() => [
|
|
131
|
+
w("div", se, [
|
|
132
|
+
b(s(T), {
|
|
104
133
|
class: "hover:bg-b-2 relative max-h-8 gap-1.5 p-2 text-xs",
|
|
105
134
|
variant: "outlined",
|
|
106
|
-
onClick:
|
|
135
|
+
onClick: s(j)
|
|
107
136
|
}, {
|
|
108
|
-
default:
|
|
109
|
-
e[6] || (e[6] =
|
|
110
|
-
|
|
137
|
+
default: v(() => [
|
|
138
|
+
e[6] || (e[6] = f(" JSON, or YAML File ")),
|
|
139
|
+
b(s(G), {
|
|
111
140
|
class: "text-c-3",
|
|
112
141
|
icon: "UploadSimple",
|
|
113
142
|
size: "md"
|
|
@@ -115,23 +144,23 @@ const ae = { class: "flex justify-between" }, le = { class: "flex w-full flex-ro
|
|
|
115
144
|
]),
|
|
116
145
|
_: 1
|
|
117
146
|
}, 8, ["onClick"]),
|
|
118
|
-
|
|
147
|
+
b(s(H), {
|
|
119
148
|
as: "div",
|
|
120
149
|
class: "z-[10001]",
|
|
121
150
|
side: "bottom",
|
|
122
151
|
sideOffset: 5
|
|
123
152
|
}, {
|
|
124
|
-
trigger:
|
|
125
|
-
|
|
126
|
-
modelValue:
|
|
127
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
128
|
-
disabled: !
|
|
153
|
+
trigger: v(() => [
|
|
154
|
+
b(oe, {
|
|
155
|
+
modelValue: y.value,
|
|
156
|
+
"onUpdate:modelValue": e[3] || (e[3] = (a) => y.value = a),
|
|
157
|
+
disabled: !h.value
|
|
129
158
|
}, null, 8, ["modelValue", "disabled"])
|
|
130
159
|
]),
|
|
131
|
-
content:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
160
|
+
content: v(() => [
|
|
161
|
+
w("div", ue, [
|
|
162
|
+
w("div", ce, [
|
|
163
|
+
h.value ? (i(), c("span", me, " Automatically updates the API client when the OpenAPI URL content changes, ensuring your client remains up-to-date. ")) : (i(), c("span", de, " Watch Mode is only available for URL imports. It automatically updates the API client when the OpenAPI URL content changes. "))
|
|
135
164
|
])
|
|
136
165
|
])
|
|
137
166
|
]),
|
|
@@ -139,48 +168,48 @@ const ae = { class: "flex justify-between" }, le = { class: "flex w-full flex-ro
|
|
|
139
168
|
})
|
|
140
169
|
])
|
|
141
170
|
]),
|
|
142
|
-
submit:
|
|
143
|
-
e[7] || (e[7] =
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
], 64)) :
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
], 64)) : (
|
|
150
|
-
|
|
171
|
+
submit: v(() => [
|
|
172
|
+
e[7] || (e[7] = f(" Import ")),
|
|
173
|
+
h.value ? (i(), c(g, { key: 0 }, [
|
|
174
|
+
f(" from URL ")
|
|
175
|
+
], 64)) : r.value && A.value ? (i(), c(g, { key: 1 }, [
|
|
176
|
+
r.value.title ? (i(), c(g, { key: 0 }, [
|
|
177
|
+
f(' "' + V(r.value.title) + '" ', 1)
|
|
178
|
+
], 64)) : (i(), c(g, { key: 1 }, [
|
|
179
|
+
f(V(r.value.version), 1)
|
|
151
180
|
], 64))
|
|
152
|
-
], 64)) : (
|
|
153
|
-
|
|
181
|
+
], 64)) : (i(), c(g, { key: 2 }, [
|
|
182
|
+
f(" Collection ")
|
|
154
183
|
], 64))
|
|
155
184
|
]),
|
|
156
|
-
default:
|
|
157
|
-
!
|
|
185
|
+
default: v(() => [
|
|
186
|
+
!r.value || s(P)(o.value) ? (i(), U(te, {
|
|
158
187
|
key: 0,
|
|
159
|
-
modelValue:
|
|
160
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
188
|
+
modelValue: o.value,
|
|
189
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => o.value = a),
|
|
161
190
|
placeholder: "OpenAPI/Swagger/Postman URL or document",
|
|
162
|
-
onOnDelete: e[1] || (e[1] = (
|
|
163
|
-
}, null, 8, ["modelValue"])) : (
|
|
164
|
-
|
|
165
|
-
e[5] || (e[5] =
|
|
166
|
-
|
|
191
|
+
onOnDelete: e[1] || (e[1] = (a) => S("back", a))
|
|
192
|
+
}, null, 8, ["modelValue"])) : (i(), c(g, { key: 1 }, [
|
|
193
|
+
w("div", re, [
|
|
194
|
+
e[5] || (e[5] = w("div", { class: "text-c-2 min-h-8 py-2 pl-8 text-xs" }, "Preview", -1)),
|
|
195
|
+
b(s(T), {
|
|
167
196
|
class: "hover:bg-b-2 relative ml-auto max-h-8 gap-1.5 p-2 text-xs",
|
|
168
197
|
variant: "ghost",
|
|
169
|
-
onClick: e[2] || (e[2] = (
|
|
198
|
+
onClick: e[2] || (e[2] = (a) => o.value = "")
|
|
170
199
|
}, {
|
|
171
|
-
default:
|
|
172
|
-
|
|
200
|
+
default: v(() => e[4] || (e[4] = [
|
|
201
|
+
f(" Clear ")
|
|
173
202
|
])),
|
|
174
203
|
_: 1
|
|
175
204
|
})
|
|
176
205
|
]),
|
|
177
|
-
|
|
206
|
+
r.value && !s(P)(o.value) ? (i(), U(s(K), {
|
|
178
207
|
key: 0,
|
|
179
208
|
class: "bg-b-2 mt-1 max-h-[40dvh] rounded border [--scalar-small:--scalar-font-size-4]",
|
|
180
|
-
content:
|
|
209
|
+
content: o.value,
|
|
181
210
|
copy: !1,
|
|
182
|
-
lang:
|
|
183
|
-
}, null, 8, ["content", "lang"])) :
|
|
211
|
+
lang: A.value
|
|
212
|
+
}, null, 8, ["content", "lang"])) : Y("", !0)
|
|
184
213
|
], 64))
|
|
185
214
|
]),
|
|
186
215
|
_: 1
|
|
@@ -188,5 +217,5 @@ const ae = { class: "flex justify-between" }, le = { class: "flex w-full flex-ro
|
|
|
188
217
|
}
|
|
189
218
|
});
|
|
190
219
|
export {
|
|
191
|
-
|
|
220
|
+
_e as default
|
|
192
221
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteServer.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandPaletteServer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteServer.vue"],"names":[],"mappings":"AAoJA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;CACF,CAAC;;;;;;;;AAsQF,wBAQG"}
|
|
@@ -1,92 +1,100 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
3
|
-
import { useToasts as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import R from "./
|
|
7
|
-
import
|
|
8
|
-
|
|
1
|
+
import { defineComponent as N, ref as p, computed as h, openBlock as u, createBlock as c, withCtx as l, createVNode as m, unref as s, createElementVNode as f, normalizeClass as B, toDisplayString as M, createTextVNode as T } from "vue";
|
|
2
|
+
import { ScalarListbox as j, ScalarButton as b, ScalarIcon as z } from "@scalar/components";
|
|
3
|
+
import { useToasts as E } from "@scalar/use-toasts";
|
|
4
|
+
import { useRouter as I } from "vue-router";
|
|
5
|
+
import { useActiveEntities as L } from "../../store/active-entities.js";
|
|
6
|
+
import R from "./CommandActionForm.vue.js";
|
|
7
|
+
import W from "./CommandActionInput.vue.js";
|
|
8
|
+
import { PathId as C } from "../../routes.js";
|
|
9
|
+
import { useWorkspace as $ } from "../../store/store.js";
|
|
10
|
+
const X = /* @__PURE__ */ N({
|
|
9
11
|
__name: "CommandPaletteServer",
|
|
10
12
|
props: {
|
|
11
13
|
metaData: {}
|
|
12
14
|
},
|
|
13
15
|
emits: ["close", "back"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
collectionMutators:
|
|
17
|
-
serverMutators:
|
|
18
|
-
events:
|
|
19
|
-
collections:
|
|
20
|
-
} =
|
|
21
|
-
() =>
|
|
22
|
-
(
|
|
23
|
-
var e,
|
|
24
|
-
return ((e =
|
|
25
|
-
id:
|
|
26
|
-
label: ((
|
|
16
|
+
setup(x, { emit: S }) {
|
|
17
|
+
const n = x, d = S, k = I(), { toast: v } = E(), { activeCollection: V, activeWorkspaceCollections: g } = L(), {
|
|
18
|
+
collectionMutators: D,
|
|
19
|
+
serverMutators: U,
|
|
20
|
+
events: w,
|
|
21
|
+
collections: y
|
|
22
|
+
} = $(), r = p(""), i = h(
|
|
23
|
+
() => g.value.flatMap(
|
|
24
|
+
(t) => {
|
|
25
|
+
var e, o;
|
|
26
|
+
return ((e = t.info) == null ? void 0 : e.title) === "Drafts" ? [] : {
|
|
27
|
+
id: t.uid,
|
|
28
|
+
label: ((o = t.info) == null ? void 0 : o.title) ?? "Unititled Collection"
|
|
27
29
|
};
|
|
28
30
|
}
|
|
29
31
|
)
|
|
30
32
|
), a = p(
|
|
31
|
-
|
|
32
|
-
(
|
|
33
|
-
var e,
|
|
34
|
-
return
|
|
33
|
+
n.metaData ? i.value.find(
|
|
34
|
+
(t) => {
|
|
35
|
+
var e, o;
|
|
36
|
+
return t.id === ((e = n.metaData) == null ? void 0 : e.itemUid) || t.id === ((o = n.metaData) == null ? void 0 : o.parentUid);
|
|
35
37
|
}
|
|
36
38
|
) : i.value.find(
|
|
37
|
-
(
|
|
39
|
+
(t) => {
|
|
38
40
|
var e;
|
|
39
|
-
return
|
|
41
|
+
return t.id === ((e = V.value) == null ? void 0 : e.uid);
|
|
40
42
|
}
|
|
41
43
|
)
|
|
42
|
-
),
|
|
43
|
-
var
|
|
44
|
+
), P = () => {
|
|
45
|
+
var o;
|
|
44
46
|
if (!r.value.trim()) {
|
|
45
47
|
v("Please enter a valid url before creating a server.", "error");
|
|
46
48
|
return;
|
|
47
49
|
}
|
|
48
|
-
const
|
|
49
|
-
if (!
|
|
50
|
+
const t = y[((o = a.value) == null ? void 0 : o.id) ?? ""];
|
|
51
|
+
if (!t) {
|
|
50
52
|
v("Please select a collection before creating a server.", "error");
|
|
51
53
|
return;
|
|
52
54
|
}
|
|
53
|
-
const e =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
const e = U.add({ url: r.value }, t.uid);
|
|
56
|
+
D.edit(t.uid, "selectedServerUid", e.uid), k.push({
|
|
57
|
+
name: "collection.servers.edit",
|
|
58
|
+
params: {
|
|
59
|
+
[C.Collection]: t.uid,
|
|
60
|
+
[C.Servers]: e.uid
|
|
61
|
+
}
|
|
62
|
+
}), d("close");
|
|
63
|
+
}, _ = () => {
|
|
64
|
+
w.commandPalette.emit({ commandName: "Create Collection" });
|
|
57
65
|
};
|
|
58
|
-
return (
|
|
66
|
+
return (t, e) => (u(), c(R, {
|
|
59
67
|
disabled: !r.value.trim() || !a.value,
|
|
60
|
-
onSubmit:
|
|
68
|
+
onSubmit: P
|
|
61
69
|
}, {
|
|
62
70
|
options: l(() => [
|
|
63
|
-
|
|
71
|
+
m(s(j), {
|
|
64
72
|
modelValue: a.value,
|
|
65
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
73
|
+
"onUpdate:modelValue": e[2] || (e[2] = (o) => a.value = o),
|
|
66
74
|
options: i.value
|
|
67
75
|
}, {
|
|
68
76
|
default: l(() => [
|
|
69
|
-
i.value.length > 0 ? (u(), c(
|
|
77
|
+
i.value.length > 0 ? (u(), c(s(b), {
|
|
70
78
|
key: 0,
|
|
71
79
|
class: "hover:bg-b-2 max-h-8 w-fit justify-between gap-1 p-2 text-xs",
|
|
72
80
|
variant: "outlined"
|
|
73
81
|
}, {
|
|
74
82
|
default: l(() => [
|
|
75
83
|
f("span", {
|
|
76
|
-
class:
|
|
77
|
-
},
|
|
78
|
-
|
|
84
|
+
class: B(a.value ? "text-c-1" : "text-c-3")
|
|
85
|
+
}, M(a.value ? a.value.label : "Select Collection"), 3),
|
|
86
|
+
m(s(z), {
|
|
79
87
|
class: "text-c-3",
|
|
80
88
|
icon: "ChevronDown",
|
|
81
89
|
size: "md"
|
|
82
90
|
})
|
|
83
91
|
]),
|
|
84
92
|
_: 1
|
|
85
|
-
})) : (u(), c(
|
|
93
|
+
})) : (u(), c(s(b), {
|
|
86
94
|
key: 1,
|
|
87
95
|
class: "hover:bg-b-2 max-h-8 w-fit justify-between gap-1 p-2 text-xs",
|
|
88
96
|
variant: "outlined",
|
|
89
|
-
onClick:
|
|
97
|
+
onClick: _
|
|
90
98
|
}, {
|
|
91
99
|
default: l(() => e[3] || (e[3] = [
|
|
92
100
|
f("span", { class: "text-c-1" }, "Create Collection", -1)
|
|
@@ -98,15 +106,15 @@ const G = /* @__PURE__ */ _({
|
|
|
98
106
|
}, 8, ["modelValue", "options"])
|
|
99
107
|
]),
|
|
100
108
|
submit: l(() => e[4] || (e[4] = [
|
|
101
|
-
|
|
109
|
+
T(" Create Server ")
|
|
102
110
|
])),
|
|
103
111
|
default: l(() => [
|
|
104
|
-
|
|
112
|
+
m(W, {
|
|
105
113
|
modelValue: r.value,
|
|
106
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
114
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => r.value = o),
|
|
107
115
|
label: "Server URL",
|
|
108
|
-
placeholder: "
|
|
109
|
-
onOnDelete: e[1] || (e[1] = (
|
|
116
|
+
placeholder: "https://void.scalar.com",
|
|
117
|
+
onOnDelete: e[1] || (e[1] = (o) => d("back", o))
|
|
110
118
|
}, null, 8, ["modelValue"])
|
|
111
119
|
]),
|
|
112
120
|
_: 1
|
|
@@ -114,5 +122,5 @@ const G = /* @__PURE__ */ _({
|
|
|
114
122
|
}
|
|
115
123
|
});
|
|
116
124
|
export {
|
|
117
|
-
|
|
125
|
+
X as default
|
|
118
126
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"CommandPaletteWorkspace.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/CommandPaletteWorkspace.vue"],"names":[],"mappings":";;;;;;;AAwMA,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAoZA;;;;GAIG;;AACH,wBAieI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA9f9B,
|
|
1
|
+
{"version":3,"file":"TheCommandPalette.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CommandPalette/TheCommandPalette.vue"],"names":[],"mappings":"AAoZA;;;;GAIG;;AACH,wBAieI;AAEJ,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA9f9B,CAhOY;qBAgOZ,CAhOmC;;;;;;;mBAgOnC,CAhOY;qBAgOZ,CAhOmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsuBzB,CAAA;AAEV,yCAAyC;AACzC,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,YAAY,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CACA"}
|
|
@@ -2,8 +2,8 @@ import o from "./TheCommandPalette.vue2.js";
|
|
|
2
2
|
import { PaletteComponents as s } from "./TheCommandPalette.vue2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3a12eca9"]]);
|
|
6
6
|
export {
|
|
7
7
|
s as PaletteComponents,
|
|
8
|
-
|
|
8
|
+
r as default
|
|
9
9
|
};
|