@scalar/api-client 2.18.0 → 2.18.3
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 +85 -0
- package/dist/components/AddressBar/AddressBar.vue2.js +52 -52
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +15 -15
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts +0 -33
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts.map +1 -1
- package/dist/components/AddressBar/httpStatusCodeColors.js +0 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +112 -112
- package/dist/components/CommandPalette/CommandActionForm.vue.js +18 -18
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +25 -25
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +0 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +14 -14
- package/dist/components/DataTable/DataTable.vue.js +17 -17
- package/dist/components/DataTable/DataTableCell.vue.js +9 -9
- package/dist/components/DataTable/DataTableCheckbox.vue.js +17 -17
- package/dist/components/DataTable/DataTableInput.vue2.js +48 -48
- package/dist/components/DataTable/DataTableInputSelect.vue.js +35 -35
- package/dist/components/DataTable/DataTableText.vue.js +10 -10
- package/dist/components/Form/Form.vue.js +32 -32
- package/dist/components/Form/LabelInput.vue2.js +15 -15
- package/dist/components/HelpfulLink.vue.js +7 -7
- package/dist/components/HttpMethod/HttpMethod.vue2.js +22 -22
- package/dist/components/IconSelector.vue.js +16 -16
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +50 -50
- package/dist/components/ImportCollection/ImportNowButton.vue.js +23 -23
- package/dist/components/ImportCollection/PrefetchError.vue.js +8 -8
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +0 -7
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +16 -16
- package/dist/components/SectionFilter.vue2.js +21 -21
- package/dist/components/SectionFilterButton.vue.js +7 -7
- package/dist/components/Server/ServerDropdown.vue.js +32 -32
- package/dist/components/Server/ServerDropdownItem.vue2.js +39 -39
- package/dist/components/Server/ServerSelector.vue.js +27 -27
- package/dist/components/Server/ServerVariablesForm.vue.js +26 -26
- package/dist/components/Server/ServerVariablesSelect.vue.js +21 -21
- package/dist/components/Server/ServerVariablesTextbox.vue.js +10 -10
- package/dist/components/Server/types.d.ts +2 -1
- package/dist/components/Server/types.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +18 -18
- package/dist/components/SideNav/SideNavRouterLink.vue.js +13 -13
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +11 -11
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +16 -16
- package/dist/components/Sidebar/Sidebar.vue2.js +28 -28
- package/dist/components/Sidebar/SidebarButton.vue.js +12 -12
- package/dist/components/Sidebar/SidebarListElement.vue2.js +34 -34
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +33 -33
- package/dist/components/TopNav/TopNavItem.vue2.js +41 -41
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +43 -43
- package/dist/data/httpHeaders.d.ts +2 -1
- package/dist/data/httpHeaders.d.ts.map +1 -1
- package/dist/hooks/useClientConfig.js +1 -1
- package/dist/hooks/useLayout.js +1 -1
- package/dist/hooks/useSidebar.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/hooks/usePluginManager.d.ts.map +1 -1
- package/dist/plugins/hooks/usePluginManager.js +5 -5
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +5 -5
- package/dist/plugins/plugin-manager.d.ts +0 -2
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/routes.d.ts +0 -10
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +0 -1
- package/dist/store/active-entities.js +1 -1
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +44 -44
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +20 -20
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +14 -14
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -2
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +12 -12
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +65 -65
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +6 -6
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts +4 -3
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +9 -7
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +40 -32
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +1 -3
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +144 -149
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +25 -45
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +90 -139
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts +22 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +77 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +4 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +34 -34
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +6 -6
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +3 -3
- package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +30 -32
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +64 -64
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +29 -29
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +2 -2
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +12 -13
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +8 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +9 -0
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +9 -8
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +67 -67
- package/dist/v2/blocks/response-block/components/Headers.vue.js +35 -35
- package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +24 -24
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +10 -10
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +24 -24
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +10 -10
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +11 -11
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +14 -14
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +11 -11
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +33 -33
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts +3 -6
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.js +0 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +72 -72
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +9 -9
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts +0 -33
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +83 -82
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +10 -10
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +121 -121
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +13 -13
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +33 -33
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +26 -26
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +26 -26
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +130 -122
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +0 -21
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -3
- package/dist/v2/components/code-input/CodeInput.vue2.js +93 -93
- package/dist/v2/components/data-table/DataTable.vue.js +17 -17
- package/dist/v2/components/data-table/DataTableCell.vue.js +9 -9
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +17 -17
- package/dist/v2/components/data-table/DataTableInput.vue2.js +48 -48
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +35 -35
- package/dist/v2/components/data-table/DataTableText.vue.js +10 -10
- package/dist/v2/components/forms/ConfirmationForm.vue.js +13 -13
- package/dist/v2/components/layout/CollapsibleSection.vue.js +42 -42
- package/dist/v2/components/modals/DeleteModal.vue.js +13 -13
- package/dist/v2/components/resize/Resize.vue2.js +11 -11
- package/dist/v2/components/server/ServerDropdown.vue.js +30 -30
- package/dist/v2/components/server/ServerDropdownItem.vue2.js +27 -27
- package/dist/v2/components/sidebar/Sidebar.vue.js +32 -32
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +20 -20
- package/dist/v2/features/app/App.vue.js +25 -25
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +55 -61
- package/dist/v2/features/app/components/AppSidebar.vue2.js +97 -97
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +20 -20
- package/dist/v2/features/app/components/DesktopTab.vue2.js +59 -59
- package/dist/v2/features/app/components/DesktopTabs.vue.js +22 -22
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +6 -6
- package/dist/v2/features/app/components/WebTopNav.vue.js +9 -9
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -5
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +1 -2
- package/dist/v2/features/app/helpers/routes.d.ts +5 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +31 -31
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +17 -17
- package/dist/v2/features/collection/components/Authentication.vue2.js +18 -18
- package/dist/v2/features/collection/components/Cookies.vue.js +10 -10
- package/dist/v2/features/collection/components/Environment.vue.js +10 -10
- package/dist/v2/features/collection/components/Form.vue.js +21 -21
- package/dist/v2/features/collection/components/Overview.vue2.js +25 -25
- package/dist/v2/features/collection/components/Servers.vue.js +37 -37
- package/dist/v2/features/collection/components/Settings.vue.js +22 -22
- package/dist/v2/features/collection/components/Tabs.vue.js +18 -18
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +20 -20
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +17 -17
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +68 -68
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +11 -11
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +2 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +2 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +3 -3
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -1
- package/dist/v2/features/command-palette/types.d.ts +11 -10
- package/dist/v2/features/command-palette/types.d.ts.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.js +36 -36
- package/dist/v2/features/environments/components/Environment.vue.js +16 -16
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +37 -37
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +19 -19
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +14 -14
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +24 -24
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +58 -58
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +23 -23
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue2.js +57 -56
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +5 -4
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +17 -21
- package/dist/v2/features/operation/Operation.vue.d.ts +5 -1
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +41 -39
- package/dist/v2/features/search/components/SearchButton.vue.js +40 -40
- package/dist/v2/features/search/components/SearchModal.vue2.js +43 -43
- package/dist/v2/features/search/components/SearchResult.vue.js +34 -34
- package/dist/v2/features/search/types.d.ts +5 -4
- package/dist/v2/features/search/types.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +51 -51
- package/dist/v2/features/settings/DocumentSettings.vue.js +25 -25
- package/dist/v2/features/settings/components/Appearance.vue.js +27 -27
- package/dist/v2/helpers/handle-hotkeys.d.ts +1 -12
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +0 -2
- package/dist/v2/helpers/plugins.d.ts +2 -2
- package/dist/v2/helpers/plugins.d.ts.map +1 -1
- package/dist/views/Collection/CollectionNavigation.vue.js +13 -13
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +114 -114
- package/dist/views/Collection/components/MarkdownInput.vue2.js +31 -31
- package/dist/views/Cookies/CookieModal.vue2.js +26 -26
- package/dist/views/Environment/EnvironmentColorModal.vue.js +10 -10
- package/dist/views/Environment/EnvironmentColors.vue.js +56 -56
- package/dist/views/Environment/EnvironmentModal.vue.js +26 -26
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +24 -24
- package/dist/views/Request/Request.vue2.js +55 -55
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +17 -17
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +102 -102
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +27 -27
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +91 -91
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +36 -36
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +101 -101
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +154 -154
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +35 -35
- package/dist/views/Request/RequestSection/RequestParams.vue.js +81 -81
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +47 -47
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +90 -90
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +111 -111
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +29 -29
- package/dist/views/Request/RequestSection/index.d.ts +1 -1
- package/dist/views/Request/RequestSection/index.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/index.js +4 -4
- package/dist/views/Request/RequestSidebarItem.vue2.js +149 -149
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +79 -79
- package/dist/views/Request/RequestSubpageHeader.vue2.js +30 -30
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +29 -29
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +24 -24
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +16 -16
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +21 -21
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +30 -30
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +61 -61
- package/package.json +24 -24
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +0 -6
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts +0 -8
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +0 -1
- package/dist/components/ScreenReader.vue.d.ts +0 -20
- package/dist/components/ScreenReader.vue.d.ts.map +0 -1
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts +0 -9
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts.map +0 -1
- package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts +0 -3
- package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/types/post-response.d.ts +0 -7
- package/dist/views/Request/RequestSection/types/post-response.d.ts.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarErrorBoundary as
|
|
3
|
-
import { isDefined as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as S, computed as i, ref as g, useId as I, createBlock as r, openBlock as o, withCtx as u, createElementVNode as c, normalizeClass as B, createElementBlock as p, createVNode as h, Fragment as y, createCommentVNode as d, createTextVNode as A, renderList as E, unref as O, withDirectives as z, resolveDynamicComponent as N, vShow as P } from "vue";
|
|
2
|
+
import { ScalarErrorBoundary as D } from "@scalar/components";
|
|
3
|
+
import { isDefined as L } from "@scalar/helpers/array/is-defined";
|
|
4
|
+
import j from "../../../components/SectionFilter.vue.js";
|
|
5
|
+
import w from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
6
6
|
import V from "./components/Headers.vue.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import F from "./components/ResponseBody.vue.js";
|
|
8
|
+
import U from "./components/ResponseBodyStreaming.vue.js";
|
|
9
|
+
import K from "./components/ResponseBodyVirtual.vue.js";
|
|
10
10
|
/* empty css */
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { textMediaTypes as
|
|
16
|
-
import { parseSetCookie as
|
|
17
|
-
const
|
|
11
|
+
import M from "./components/ResponseCookies.vue.js";
|
|
12
|
+
import Z from "./components/ResponseEmpty.vue.js";
|
|
13
|
+
import G from "./components/ResponseLoadingOverlay.vue.js";
|
|
14
|
+
import J from "./components/ResponseMetaInformation.vue.js";
|
|
15
|
+
import { textMediaTypes as Q } from "./helpers/media-types.js";
|
|
16
|
+
import { parseSetCookie as W } from "./helpers/parse-set-cookie.js";
|
|
17
|
+
const X = { class: "flex h-8 flex-1 items-center" }, Y = ["id", "role"], b = 2e5, pe = /* @__PURE__ */ S({
|
|
18
18
|
__name: "ResponseBlock",
|
|
19
19
|
props: {
|
|
20
20
|
response: {},
|
|
@@ -27,139 +27,139 @@ const Y = { class: "flex h-8 flex-1 items-center" }, x = ["id", "role"], b = 2e5
|
|
|
27
27
|
eventBus: {}
|
|
28
28
|
},
|
|
29
29
|
emits: ["sendRequest"],
|
|
30
|
-
setup(
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
return
|
|
30
|
+
setup(e, { expose: x, emit: C }) {
|
|
31
|
+
const H = C, m = i(() => {
|
|
32
|
+
const t = e.response?.headers;
|
|
33
|
+
return t ? Object.keys(t).map((s) => ({
|
|
34
34
|
name: s,
|
|
35
|
-
value:
|
|
35
|
+
value: t[s] ?? ""
|
|
36
36
|
})) : [];
|
|
37
37
|
}), k = i(
|
|
38
|
-
() =>
|
|
39
|
-
),
|
|
38
|
+
() => e.response?.cookieHeaderKeys.map((t) => W(t)).filter(L) ?? []
|
|
39
|
+
), T = ["Cookies", "Headers", "Body"], n = g("All"), v = i(() => ["All", ...T]), a = i(
|
|
40
40
|
() => Object.fromEntries(
|
|
41
|
-
v.value.map((
|
|
41
|
+
v.value.map((t) => [t, I()])
|
|
42
42
|
)
|
|
43
43
|
), q = i(() => {
|
|
44
|
-
if (!
|
|
44
|
+
if (!e.response || !("size" in e.response))
|
|
45
45
|
return !1;
|
|
46
|
-
const
|
|
47
|
-
return !
|
|
46
|
+
const t = e.response.headers?.["content-type"] || e.response.headers?.["Content-Type"];
|
|
47
|
+
return !t || (e.response.size ?? 0) <= b || t.includes("text/html") ? !1 : Q.some((l) => t.includes(l)) && (e.response.size ?? 0) > b;
|
|
48
48
|
}), R = i(
|
|
49
|
-
() =>
|
|
50
|
-
name:
|
|
51
|
-
value:
|
|
49
|
+
() => e.request?.headers ? [...e.request.headers].map((t) => ({
|
|
50
|
+
name: t[0],
|
|
51
|
+
value: t[1],
|
|
52
52
|
required: !1
|
|
53
53
|
})) : []
|
|
54
|
-
), f = (
|
|
55
|
-
return
|
|
56
|
-
responseHeaders:
|
|
54
|
+
), f = (t) => n.value === "All" || n.value === t;
|
|
55
|
+
return x({
|
|
56
|
+
responseHeaders: m,
|
|
57
57
|
responseCookies: k,
|
|
58
58
|
requestHeaders: R,
|
|
59
59
|
shouldVirtualize: q,
|
|
60
|
-
activeFilter:
|
|
60
|
+
activeFilter: n,
|
|
61
61
|
filters: v
|
|
62
|
-
}), (
|
|
62
|
+
}), (t, s) => (o(), r(w, { "aria-label": "Response" }, {
|
|
63
63
|
title: u(() => [
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
c("div", X, [
|
|
65
|
+
c("div", {
|
|
66
66
|
"aria-live": "polite",
|
|
67
67
|
class: B(["flex items-center", { "animate-response-heading": e.response }])
|
|
68
68
|
}, [
|
|
69
|
-
s[4] || (s[4] =
|
|
70
|
-
e.response ? (
|
|
69
|
+
s[4] || (s[4] = c("span", { class: "response-heading pointer-events-none absolute" }, " Response ", -1)),
|
|
70
|
+
e.response ? (o(), r(J, {
|
|
71
71
|
key: 0,
|
|
72
72
|
class: "animate-response-children",
|
|
73
73
|
events: e.events,
|
|
74
74
|
response: e.response
|
|
75
75
|
}, null, 8, ["events", "response"])) : d("", !0)
|
|
76
76
|
], 2),
|
|
77
|
-
h(
|
|
78
|
-
modelValue:
|
|
79
|
-
"onUpdate:modelValue": s[0] || (s[0] = (l) =>
|
|
77
|
+
h(j, {
|
|
78
|
+
modelValue: n.value,
|
|
79
|
+
"onUpdate:modelValue": s[0] || (s[0] = (l) => n.value = l),
|
|
80
80
|
filterIds: a.value,
|
|
81
81
|
filters: v.value
|
|
82
82
|
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
83
83
|
])
|
|
84
84
|
]),
|
|
85
85
|
default: u(() => [
|
|
86
|
-
|
|
86
|
+
c("div", {
|
|
87
87
|
id: a.value.All,
|
|
88
88
|
class: B(["custom-scroll response-section-content relative grid h-full justify-stretch", {
|
|
89
89
|
"content-start": e.response
|
|
90
90
|
}]),
|
|
91
|
-
role:
|
|
91
|
+
role: n.value === "All" && e.response ? "tabpanel" : "none"
|
|
92
92
|
}, [
|
|
93
|
-
e.response ? (
|
|
94
|
-
f("Cookies") ? (
|
|
93
|
+
e.response ? (o(), p(y, { key: 1 }, [
|
|
94
|
+
f("Cookies") ? (o(), r(M, {
|
|
95
95
|
key: 0,
|
|
96
96
|
id: a.value.Cookies,
|
|
97
97
|
class: "response-section-content-cookies",
|
|
98
98
|
cookies: k.value,
|
|
99
|
-
role:
|
|
99
|
+
role: n.value === "All" ? "none" : "tabpanel"
|
|
100
100
|
}, null, 8, ["id", "cookies", "role"])) : d("", !0),
|
|
101
|
-
f("Headers") ? (
|
|
101
|
+
f("Headers") ? (o(), r(V, {
|
|
102
102
|
key: 1,
|
|
103
103
|
id: a.value.Headers,
|
|
104
104
|
class: "response-section-content-headers",
|
|
105
105
|
headers: R.value,
|
|
106
|
-
role:
|
|
106
|
+
role: n.value === "All" ? "none" : "tabpanel"
|
|
107
107
|
}, {
|
|
108
108
|
title: u(() => [...s[5] || (s[5] = [
|
|
109
109
|
A("Request Headers", -1)
|
|
110
110
|
])]),
|
|
111
111
|
_: 1
|
|
112
112
|
}, 8, ["id", "headers", "role"])) : d("", !0),
|
|
113
|
-
f("Headers") ? (
|
|
113
|
+
f("Headers") ? (o(), r(V, {
|
|
114
114
|
key: 2,
|
|
115
115
|
id: a.value.Headers,
|
|
116
116
|
class: "response-section-content-headers",
|
|
117
|
-
headers:
|
|
118
|
-
role:
|
|
117
|
+
headers: m.value,
|
|
118
|
+
role: n.value === "All" ? "none" : "tabpanel"
|
|
119
119
|
}, {
|
|
120
120
|
title: u(() => [...s[6] || (s[6] = [
|
|
121
121
|
A("Response Headers", -1)
|
|
122
122
|
])]),
|
|
123
123
|
_: 1
|
|
124
124
|
}, 8, ["id", "headers", "role"])) : d("", !0),
|
|
125
|
-
(
|
|
125
|
+
(o(!0), p(y, null, E(e.plugins, (l, $) => (o(), r(O(D), { key: $ }, {
|
|
126
126
|
default: u(() => [
|
|
127
|
-
l.components?.response && e.request && e.response ?
|
|
127
|
+
l.components?.response && e.request && e.response ? z((o(), r(N(l.components.response), {
|
|
128
128
|
key: 0,
|
|
129
129
|
request: e.request,
|
|
130
130
|
response: e.response
|
|
131
131
|
}, null, 8, ["request", "response"])), [
|
|
132
|
-
[
|
|
132
|
+
[P, n.value === "All"]
|
|
133
133
|
]) : d("", !0)
|
|
134
134
|
]),
|
|
135
135
|
_: 2
|
|
136
136
|
}, 1024))), 128)),
|
|
137
|
-
|
|
138
|
-
"reader" in e.response ? (
|
|
137
|
+
n.value === "All" || n.value === "Body" ? (o(), p(y, { key: 3 }, [
|
|
138
|
+
"reader" in e.response ? (o(), r(U, {
|
|
139
139
|
key: 0,
|
|
140
140
|
id: a.value.Body,
|
|
141
141
|
class: "response-section-content-body",
|
|
142
142
|
reader: e.response.reader
|
|
143
|
-
}, null, 8, ["id", "reader"])) : q.value && typeof e.response?.data == "string" ? (
|
|
143
|
+
}, null, 8, ["id", "reader"])) : q.value && typeof e.response?.data == "string" ? (o(), r(K, {
|
|
144
144
|
key: 1,
|
|
145
145
|
id: a.value.Body,
|
|
146
146
|
content: e.response.data,
|
|
147
147
|
data: e.response?.data,
|
|
148
|
-
headers:
|
|
149
|
-
role:
|
|
150
|
-
}, null, 8, ["id", "content", "data", "headers", "role"])) : (
|
|
148
|
+
headers: m.value,
|
|
149
|
+
role: n.value === "All" ? "none" : "tabpanel"
|
|
150
|
+
}, null, 8, ["id", "content", "data", "headers", "role"])) : (o(), r(F, {
|
|
151
151
|
key: 2,
|
|
152
152
|
id: a.value.Body,
|
|
153
153
|
active: !0,
|
|
154
154
|
class: "response-section-content-body",
|
|
155
155
|
data: e.response?.data,
|
|
156
|
-
headers:
|
|
156
|
+
headers: m.value,
|
|
157
157
|
layout: "client",
|
|
158
|
-
role:
|
|
158
|
+
role: n.value === "All" ? "none" : "tabpanel",
|
|
159
159
|
title: "Body"
|
|
160
160
|
}, null, 8, ["id", "data", "headers", "role"]))
|
|
161
161
|
], 64)) : d("", !0)
|
|
162
|
-
], 64)) : (
|
|
162
|
+
], 64)) : (o(), r(Z, {
|
|
163
163
|
key: 0,
|
|
164
164
|
appVersion: e.appVersion,
|
|
165
165
|
events: e.events,
|
|
@@ -170,15 +170,15 @@ const Y = { class: "flex h-8 flex-1 items-center" }, x = ["id", "role"], b = 2e5
|
|
|
170
170
|
payload: void 0
|
|
171
171
|
})),
|
|
172
172
|
onOpenCommandPalette: s[2] || (s[2] = (l) => e.eventBus.emit("ui:open:command-palette")),
|
|
173
|
-
onSendRequest: s[3] || (s[3] = (l) =>
|
|
173
|
+
onSendRequest: s[3] || (s[3] = (l) => H("sendRequest"))
|
|
174
174
|
}, null, 8, ["appVersion", "events", "layout", "totalPerformedRequests"])),
|
|
175
|
-
h(
|
|
176
|
-
], 10,
|
|
175
|
+
h(G, { events: e.events }, null, 8, ["events"])
|
|
176
|
+
], 10, Y)
|
|
177
177
|
]),
|
|
178
178
|
_: 1
|
|
179
179
|
}));
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
182
|
export {
|
|
183
|
-
|
|
183
|
+
pe as default
|
|
184
184
|
};
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { httpHeaders as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as h, createBlock as m, openBlock as t, unref as u, withCtx as e, createElementBlock as l, createVNode as a, createTextVNode as n, Fragment as i, renderList as y, toDisplayString as c, renderSlot as g } from "vue";
|
|
2
|
+
import k from "../../../../components/DataTable/DataTable.vue.js";
|
|
3
|
+
import p from "../../../../components/DataTable/DataTableRow.vue.js";
|
|
4
|
+
import _ from "../../../../components/DataTable/DataTableText.vue.js";
|
|
5
|
+
import w from "../../../../components/HelpfulLink.vue.js";
|
|
6
|
+
import { httpHeaders as b } from "../../../../data/httpHeaders.js";
|
|
7
|
+
import C from "../../../components/layout/CollapsibleSection.vue.js";
|
|
8
|
+
import x from "../../../../components/DataTable/DataTableHeader.vue.js";
|
|
9
|
+
const $ = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "max-h-[calc(100%-32px)] overflow-y-auto"
|
|
12
|
-
},
|
|
12
|
+
}, v = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "text-c-3 bg-b-1 flex min-h-[64px] items-center justify-center border-t px-4 text-sm"
|
|
15
|
-
}, T = /* @__PURE__ */
|
|
15
|
+
}, T = /* @__PURE__ */ h({
|
|
16
16
|
__name: "Headers",
|
|
17
17
|
props: {
|
|
18
18
|
headers: {}
|
|
19
19
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
22
|
-
(
|
|
20
|
+
setup(s) {
|
|
21
|
+
const d = (f) => b.find(
|
|
22
|
+
(r) => r.name.toLowerCase() === f.toLowerCase()
|
|
23
23
|
);
|
|
24
|
-
return (
|
|
24
|
+
return (f, r) => (t(), m(u(C), {
|
|
25
25
|
class: "overflow-auto",
|
|
26
26
|
defaultOpen: !1,
|
|
27
|
-
itemCount:
|
|
27
|
+
itemCount: s.headers.length
|
|
28
28
|
}, {
|
|
29
29
|
title: e(() => [
|
|
30
|
-
|
|
30
|
+
g(f.$slots, "title")
|
|
31
31
|
]),
|
|
32
32
|
default: e(() => [
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
s.headers.length ? (t(), l("div", $, [
|
|
34
|
+
a(k, {
|
|
35
35
|
columns: ["minmax(auto, min-content)", "minmax(50%, 1fr)"],
|
|
36
36
|
scroll: ""
|
|
37
37
|
}, {
|
|
38
38
|
default: e(() => [
|
|
39
|
-
|
|
39
|
+
a(p, { class: "sr-only !block" }, {
|
|
40
40
|
default: e(() => [
|
|
41
|
-
|
|
42
|
-
default: e(() => [...
|
|
41
|
+
a(u(x), null, {
|
|
42
|
+
default: e(() => [...r[0] || (r[0] = [
|
|
43
43
|
n("Header Key", -1)
|
|
44
44
|
])]),
|
|
45
45
|
_: 1
|
|
46
46
|
}),
|
|
47
|
-
|
|
48
|
-
default: e(() => [...
|
|
47
|
+
a(u(x), null, {
|
|
48
|
+
default: e(() => [...r[1] || (r[1] = [
|
|
49
49
|
n("Header Value", -1)
|
|
50
50
|
])]),
|
|
51
51
|
_: 1
|
|
@@ -53,31 +53,31 @@ const C = {
|
|
|
53
53
|
]),
|
|
54
54
|
_: 1
|
|
55
55
|
}),
|
|
56
|
-
(t(!0), l(
|
|
57
|
-
key:
|
|
56
|
+
(t(!0), l(i, null, y(s.headers, (o) => (t(), m(p, {
|
|
57
|
+
key: o.name,
|
|
58
58
|
class: "group/row text-c-1"
|
|
59
59
|
}, {
|
|
60
60
|
default: e(() => [
|
|
61
|
-
|
|
61
|
+
a(_, { class: "bg-b-1 sticky left-0 z-1 max-w-full group-first/row:border-t-0" }, {
|
|
62
62
|
default: e(() => [
|
|
63
|
-
typeof
|
|
63
|
+
typeof d(o.name)?.url == "string" ? (t(), m(w, {
|
|
64
64
|
key: 0,
|
|
65
65
|
class: "decoration-c-3",
|
|
66
|
-
href:
|
|
66
|
+
href: d(o.name).url
|
|
67
67
|
}, {
|
|
68
68
|
default: e(() => [
|
|
69
|
-
n(
|
|
69
|
+
n(c(o.name), 1)
|
|
70
70
|
]),
|
|
71
71
|
_: 2
|
|
72
|
-
}, 1032, ["href"])) : (t(), l(
|
|
73
|
-
n(
|
|
72
|
+
}, 1032, ["href"])) : (t(), l(i, { key: 1 }, [
|
|
73
|
+
n(c(o.name), 1)
|
|
74
74
|
], 64))
|
|
75
75
|
]),
|
|
76
76
|
_: 2
|
|
77
77
|
}, 1024),
|
|
78
|
-
|
|
78
|
+
a(_, {
|
|
79
79
|
class: "z-0 group-first/row:border-t-0",
|
|
80
|
-
text:
|
|
80
|
+
text: o.value
|
|
81
81
|
}, null, 8, ["text"])
|
|
82
82
|
]),
|
|
83
83
|
_: 2
|
|
@@ -85,7 +85,7 @@ const C = {
|
|
|
85
85
|
]),
|
|
86
86
|
_: 1
|
|
87
87
|
})
|
|
88
|
-
])) : (t(), l("div",
|
|
88
|
+
])) : (t(), l("div", v, " No headers "))
|
|
89
89
|
]),
|
|
90
90
|
_: 3
|
|
91
91
|
}, 8, ["itemCount"]));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as h, ref as w, computed as o, createBlock as n, openBlock as l, unref as g, createSlots as x, withCtx as u, createElementBlock as B, createCommentVNode as r, createElementVNode as d, toDisplayString as c, createTextVNode as v, createVNode as k } from "vue";
|
|
2
2
|
import { getMediaTypeConfig as R } from "../helpers/media-types.js";
|
|
3
3
|
import { processResponseBody as T } from "../helpers/process-response-body.js";
|
|
4
4
|
import V from "./ResponseBodyDownload.vue.js";
|
|
@@ -7,10 +7,10 @@ import b from "./ResponseBodyPreview.vue.js";
|
|
|
7
7
|
import C from "./ResponseBodyRaw.vue.js";
|
|
8
8
|
import N from "./ResponseBodyToggle.vue.js";
|
|
9
9
|
import S from "../../../components/layout/CollapsibleSection.vue.js";
|
|
10
|
-
const
|
|
10
|
+
const _ = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "bg-b-1 flex max-h-[calc(100%-32px)] flex-col overflow-hidden"
|
|
13
|
-
},
|
|
13
|
+
}, $ = { class: "box-content flex min-h-8 items-center justify-between border-y px-3" }, E = { class: "text-xxs font-code leading-3" }, H = /* @__PURE__ */ h({
|
|
14
14
|
__name: "ResponseBody",
|
|
15
15
|
props: {
|
|
16
16
|
title: {},
|
|
@@ -18,47 +18,47 @@ const $ = {
|
|
|
18
18
|
data: {},
|
|
19
19
|
headers: {}
|
|
20
20
|
},
|
|
21
|
-
setup(
|
|
22
|
-
const s =
|
|
21
|
+
setup(t) {
|
|
22
|
+
const s = w(!0), m = o(
|
|
23
23
|
() => !!(a.value?.raw && a.value.preview)
|
|
24
|
-
), f =
|
|
24
|
+
), f = o(() => s.value || !m.value), p = o(() => !s.value || !m.value), e = o(
|
|
25
25
|
() => T({
|
|
26
|
-
data:
|
|
27
|
-
headers:
|
|
26
|
+
data: t.data,
|
|
27
|
+
headers: t.headers
|
|
28
28
|
})
|
|
29
|
-
), a =
|
|
29
|
+
), a = o(
|
|
30
30
|
() => R(e.value.mimeType?.essence ?? "")
|
|
31
31
|
);
|
|
32
|
-
return (
|
|
32
|
+
return (P, i) => (l(), n(g(S), {
|
|
33
33
|
class: "max-h-content overflow-y-hidden",
|
|
34
|
-
isStatic:
|
|
35
|
-
},
|
|
34
|
+
isStatic: t.layout === "reference"
|
|
35
|
+
}, x({
|
|
36
36
|
title: u(() => [
|
|
37
|
-
v(c(
|
|
37
|
+
v(c(t.title), 1)
|
|
38
38
|
]),
|
|
39
39
|
default: u(() => [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
m.value ? (
|
|
40
|
+
t.data ? (l(), B("div", _, [
|
|
41
|
+
d("div", $, [
|
|
42
|
+
d("span", E, c(e.value.mimeType?.essence), 1),
|
|
43
|
+
m.value ? (l(), n(N, {
|
|
44
44
|
key: 0,
|
|
45
45
|
modelValue: s.value,
|
|
46
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
46
|
+
"onUpdate:modelValue": i[0] || (i[0] = (y) => s.value = y)
|
|
47
47
|
}, null, 8, ["modelValue"])) : r("", !0)
|
|
48
48
|
]),
|
|
49
|
-
a.value?.raw &&
|
|
49
|
+
a.value?.raw && p.value ? (l(), n(C, {
|
|
50
50
|
key: e.value.dataUrl,
|
|
51
|
-
content:
|
|
51
|
+
content: t.data,
|
|
52
52
|
language: a.value.language
|
|
53
53
|
}, null, 8, ["content", "language"])) : r("", !0),
|
|
54
|
-
a.value?.preview && f.value ? (
|
|
54
|
+
a.value?.preview && f.value ? (l(), n(b, {
|
|
55
55
|
key: e.value.dataUrl,
|
|
56
56
|
alpha: a.value.alpha,
|
|
57
57
|
mode: a.value.preview,
|
|
58
58
|
src: e.value.dataUrl,
|
|
59
59
|
type: e.value.mimeType?.essence ?? ""
|
|
60
60
|
}, null, 8, ["alpha", "mode", "src", "type"])) : r("", !0),
|
|
61
|
-
!a.value?.raw && !a.value?.preview ? (
|
|
61
|
+
!a.value?.raw && !a.value?.preview ? (l(), n(U, { key: 2 }, {
|
|
62
62
|
default: u(() => [...i[1] || (i[1] = [
|
|
63
63
|
v(" Binary file ", -1)
|
|
64
64
|
])]),
|
|
@@ -68,10 +68,10 @@ const $ = {
|
|
|
68
68
|
]),
|
|
69
69
|
_: 2
|
|
70
70
|
}, [
|
|
71
|
-
|
|
71
|
+
t.data && e.value.dataUrl ? {
|
|
72
72
|
name: "actions",
|
|
73
73
|
fn: u(() => [
|
|
74
|
-
|
|
74
|
+
k(V, {
|
|
75
75
|
filename: e.value.attachmentFilename,
|
|
76
76
|
href: e.value.dataUrl,
|
|
77
77
|
type: e.value.mimeType?.essence
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as l, computed as
|
|
1
|
+
import { defineComponent as l, computed as a, createElementBlock as i, openBlock as p, withModifiers as d, createVNode as f, createElementVNode as o, unref as m } from "vue";
|
|
2
2
|
import { ScalarIcon as c } from "@scalar/components";
|
|
3
3
|
import { getMediaTypeConfig as u } from "../../../../views/Request/consts/mediaTypes.js";
|
|
4
4
|
const x = ["download", "href"], h = /* @__PURE__ */ l({
|
|
@@ -8,15 +8,15 @@ const x = ["download", "href"], h = /* @__PURE__ */ l({
|
|
|
8
8
|
type: {},
|
|
9
9
|
filename: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const n =
|
|
13
|
-
const
|
|
14
|
-
return n.filename ? n.filename : `response${
|
|
11
|
+
setup(t) {
|
|
12
|
+
const n = t, r = a(() => {
|
|
13
|
+
const s = u(n.type ?? "")?.extension ?? ".unknown";
|
|
14
|
+
return n.filename ? n.filename : `response${s}`;
|
|
15
15
|
});
|
|
16
|
-
return (
|
|
16
|
+
return (s, e) => (p(), i("a", {
|
|
17
17
|
class: "text-c-3 text-xxs hover:bg-b-3 flex items-center gap-1 rounded px-1.5 py-0.5 no-underline",
|
|
18
18
|
download: `${r.value}`,
|
|
19
|
-
href:
|
|
19
|
+
href: t.href,
|
|
20
20
|
onClick: e[0] || (e[0] = d(() => {
|
|
21
21
|
}, ["stop"]))
|
|
22
22
|
}, [
|
|
@@ -24,9 +24,9 @@ const x = ["download", "href"], h = /* @__PURE__ */ l({
|
|
|
24
24
|
icon: "Download",
|
|
25
25
|
size: "xs"
|
|
26
26
|
}),
|
|
27
|
-
e[1] || (e[1] =
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
e[1] || (e[1] = o("span", null, [
|
|
28
|
+
o("span", null, "Download"),
|
|
29
|
+
o("span", { class: "sr-only" }, "Response Body")
|
|
30
30
|
], -1))
|
|
31
31
|
], 8, x));
|
|
32
32
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as u, ref as d, watch as i, createElementBlock as r, createBlock as c, openBlock as l, normalizeClass as n, createElementVNode as s, withCtx as y, createTextVNode as f } from "vue";
|
|
2
|
+
import m from "./ResponseBodyInfo.vue.js";
|
|
3
|
+
const v = ["src"], k = ["src", "type"], w = ["src", "type"], x = ["data", "type"], $ = /* @__PURE__ */ u({
|
|
4
4
|
__name: "ResponseBodyPreview",
|
|
5
5
|
props: {
|
|
6
6
|
src: {},
|
|
@@ -8,51 +8,51 @@ const c = ["src"], k = ["src", "type"], w = ["src", "type"], B = ["data", "type"
|
|
|
8
8
|
mode: {},
|
|
9
9
|
alpha: { type: Boolean, default: !1 }
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
11
|
+
setup(e) {
|
|
12
|
+
const o = d(!1);
|
|
13
13
|
return i(
|
|
14
|
-
() =>
|
|
15
|
-
() =>
|
|
16
|
-
), (
|
|
14
|
+
() => e.src,
|
|
15
|
+
() => o.value = !1
|
|
16
|
+
), (B, t) => !o.value && e.src ? (l(), r("div", {
|
|
17
17
|
key: 0,
|
|
18
|
-
class:
|
|
18
|
+
class: n(["flex justify-center overflow-auto rounded-b", { "bg-preview p-2": e.alpha }])
|
|
19
19
|
}, [
|
|
20
|
-
e.mode === "image" ? (
|
|
20
|
+
e.mode === "image" ? (l(), r("img", {
|
|
21
21
|
key: 0,
|
|
22
|
-
class:
|
|
22
|
+
class: n(["h-full max-w-full", { rounded: e.alpha }]),
|
|
23
23
|
src: e.src,
|
|
24
|
-
onError:
|
|
25
|
-
}, null, 42,
|
|
24
|
+
onError: t[0] || (t[0] = (a) => o.value = !0)
|
|
25
|
+
}, null, 42, v)) : e.mode === "video" ? (l(), r("video", {
|
|
26
26
|
key: 1,
|
|
27
27
|
autoplay: "",
|
|
28
28
|
controls: "",
|
|
29
29
|
width: "100%",
|
|
30
|
-
onError:
|
|
30
|
+
onError: t[1] || (t[1] = (a) => o.value = !0)
|
|
31
31
|
}, [
|
|
32
|
-
|
|
32
|
+
s("source", {
|
|
33
33
|
src: e.src,
|
|
34
34
|
type: e.type
|
|
35
35
|
}, null, 8, k)
|
|
36
|
-
], 32)) : e.mode === "audio" ? (
|
|
36
|
+
], 32)) : e.mode === "audio" ? (l(), r("audio", {
|
|
37
37
|
key: 2,
|
|
38
38
|
class: "my-12",
|
|
39
39
|
controls: "",
|
|
40
|
-
onError:
|
|
40
|
+
onError: t[2] || (t[2] = (a) => o.value = !0)
|
|
41
41
|
}, [
|
|
42
|
-
|
|
42
|
+
s("source", {
|
|
43
43
|
src: e.src,
|
|
44
44
|
type: e.type
|
|
45
45
|
}, null, 8, w)
|
|
46
|
-
], 32)) : (
|
|
46
|
+
], 32)) : (l(), r("object", {
|
|
47
47
|
key: 3,
|
|
48
48
|
class: "aspect-[4/3] w-full",
|
|
49
49
|
data: e.src,
|
|
50
50
|
type: e.type,
|
|
51
|
-
onError:
|
|
52
|
-
}, null, 40,
|
|
53
|
-
], 2)) : (
|
|
54
|
-
default:
|
|
55
|
-
|
|
51
|
+
onError: t[3] || (t[3] = (a) => o.value = !0)
|
|
52
|
+
}, null, 40, x))
|
|
53
|
+
], 2)) : (l(), c(m, { key: 1 }, {
|
|
54
|
+
default: y(() => [...t[4] || (t[4] = [
|
|
55
|
+
f("Preview unavailable", -1)
|
|
56
56
|
])]),
|
|
57
57
|
_: 1
|
|
58
58
|
}));
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as d, createElementBlock as a, openBlock as r, createElementVNode as l, withModifiers as n, normalizeClass as u } from "vue";
|
|
2
|
+
const m = { class: "text-c-3 text-xxs -my-1 flex justify-center gap-0.5 rounded p-0.5" }, i = /* @__PURE__ */ d({
|
|
3
3
|
__name: "ResponseBodyToggle",
|
|
4
4
|
props: {
|
|
5
5
|
modelValue: { type: Boolean }
|
|
6
6
|
},
|
|
7
7
|
emits: ["update:modelValue"],
|
|
8
|
-
setup(
|
|
9
|
-
return (
|
|
10
|
-
|
|
11
|
-
class:
|
|
8
|
+
setup(t) {
|
|
9
|
+
return (o, e) => (r(), a("div", m, [
|
|
10
|
+
l("button", {
|
|
11
|
+
class: u(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": t.modelValue }]),
|
|
12
12
|
type: "button",
|
|
13
|
-
onClick:
|
|
13
|
+
onClick: e[0] || (e[0] = n((s) => o.$emit("update:modelValue", !0), ["stop"]))
|
|
14
14
|
}, " Preview ", 2),
|
|
15
|
-
|
|
16
|
-
class:
|
|
15
|
+
l("button", {
|
|
16
|
+
class: u(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": !t.modelValue }]),
|
|
17
17
|
type: "button",
|
|
18
|
-
onClick:
|
|
18
|
+
onClick: e[1] || (e[1] = n((s) => o.$emit("update:modelValue", !1), ["stop"]))
|
|
19
19
|
}, " Raw ", 2)
|
|
20
20
|
]));
|
|
21
21
|
}
|