@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,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const l = ["aria-controls", "aria-selected", "tabindex"],
|
|
1
|
+
import { defineComponent as o, createElementBlock as n, openBlock as r, normalizeClass as s, renderSlot as c } from "vue";
|
|
2
|
+
const l = ["aria-controls", "aria-selected", "tabindex"], d = /* @__PURE__ */ o({
|
|
3
3
|
__name: "SectionFilterButton",
|
|
4
4
|
props: {
|
|
5
5
|
selected: { type: Boolean },
|
|
6
6
|
controls: {}
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
return (
|
|
8
|
+
setup(e) {
|
|
9
|
+
return (t, a) => (r(), n("button", {
|
|
10
10
|
"aria-controls": e.controls ?? "",
|
|
11
11
|
"aria-selected": !!e.selected,
|
|
12
|
-
class:
|
|
12
|
+
class: s(["hover:bg-b-2 flex w-fit cursor-pointer items-center rounded p-1 px-2 text-center font-medium whitespace-nowrap has-[:focus-visible]:outline", { "text-c-1 pointer-events-none": e.selected }]),
|
|
13
13
|
role: "tab",
|
|
14
14
|
tabindex: e.selected ? 0 : -1,
|
|
15
15
|
type: "button"
|
|
16
16
|
}, [
|
|
17
|
-
|
|
17
|
+
c(t.$slots, "default")
|
|
18
18
|
], 10, l));
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
d as default
|
|
23
23
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as V, computed as u, watch as z, useTemplateRef as E, createBlock as
|
|
2
|
-
import { ScalarPopover as W, ScalarButton as q, ScalarIcon as
|
|
1
|
+
import { defineComponent as V, computed as u, watch as z, useTemplateRef as E, createBlock as m, openBlock as o, unref as n, withCtx as v, createVNode as c, createElementBlock as a, Fragment as d, createElementVNode as s, createTextVNode as L, toDisplayString as T, createCommentVNode as S, renderList as g } from "vue";
|
|
2
|
+
import { ScalarPopover as W, ScalarButton as q, ScalarIcon as h, ScalarFloatingBackdrop as F, ScalarDropdownDivider as I } from "@scalar/components";
|
|
3
3
|
import { emitCustomEvent as M } from "@scalar/workspace-store/events";
|
|
4
4
|
import { useLayout as O } from "../../hooks/useLayout.js";
|
|
5
5
|
import { useWorkspace as P } from "../../store/store.js";
|
|
6
|
-
import
|
|
6
|
+
import k from "./ServerDropdownItem.vue.js";
|
|
7
7
|
const $ = ["onClick"], j = { class: "flex h-4 w-4 items-center justify-center" }, X = /* @__PURE__ */ V({
|
|
8
8
|
__name: "ServerDropdown",
|
|
9
9
|
props: {
|
|
@@ -12,42 +12,42 @@ const $ = ["onClick"], j = { class: "flex h-4 w-4 items-center justify-center" }
|
|
|
12
12
|
server: {},
|
|
13
13
|
target: {}
|
|
14
14
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const { layout:
|
|
17
|
-
() =>
|
|
18
|
-
id:
|
|
19
|
-
label:
|
|
15
|
+
setup(e) {
|
|
16
|
+
const { layout: w } = O(), { servers: f, collectionMutators: y, events: U, serverMutators: C } = P(), p = u(
|
|
17
|
+
() => e.operation?.servers?.map((r) => ({
|
|
18
|
+
id: r,
|
|
19
|
+
label: f[r]?.url ?? "Unknown server"
|
|
20
20
|
}))
|
|
21
|
-
),
|
|
21
|
+
), x = u(
|
|
22
22
|
() => (
|
|
23
23
|
// Filters out servers already present in the request
|
|
24
|
-
|
|
25
|
-
id:
|
|
26
|
-
label:
|
|
24
|
+
e.collection?.servers?.filter((r) => !e.operation?.servers?.includes(r)).map((r) => ({
|
|
25
|
+
id: r,
|
|
26
|
+
label: f[r]?.url ?? "Unknown server"
|
|
27
27
|
}))
|
|
28
28
|
)
|
|
29
29
|
), A = u(
|
|
30
|
-
() =>
|
|
30
|
+
() => p.value?.length && x.value?.length
|
|
31
31
|
);
|
|
32
|
-
z([() =>
|
|
33
|
-
if (!
|
|
32
|
+
z([() => e.collection, () => e.operation], ([r, t]) => {
|
|
33
|
+
if (!r || r.selectedServerUid || t?.selectedServerUid)
|
|
34
34
|
return;
|
|
35
|
-
const l =
|
|
36
|
-
l && y.edit(
|
|
35
|
+
const l = e.collection.servers?.[0];
|
|
36
|
+
l && y.edit(e.collection.uid, "selectedServerUid", l);
|
|
37
37
|
});
|
|
38
38
|
const D = () => U.commandPalette.emit({
|
|
39
39
|
commandName: "Add Server"
|
|
40
|
-
}), B = u(() =>
|
|
41
|
-
if (!
|
|
40
|
+
}), B = u(() => e.server?.url?.endsWith("/") ? e.server.url.slice(0, -1) : e.server?.url || ""), b = (r, t) => {
|
|
41
|
+
if (!e.server)
|
|
42
42
|
return;
|
|
43
|
-
const l =
|
|
44
|
-
l[
|
|
43
|
+
const l = e.server.variables || {};
|
|
44
|
+
l[r] = { ...l[r], default: t }, C.edit(e.server.uid, "variables", l), M(
|
|
45
45
|
N.value?.$el,
|
|
46
46
|
"scalar-update-selected-server-variables",
|
|
47
|
-
{ key:
|
|
47
|
+
{ key: r, value: t }
|
|
48
48
|
);
|
|
49
49
|
}, N = E("wrapper-ref");
|
|
50
|
-
return (
|
|
50
|
+
return (r, t) => (o(), m(n(W), {
|
|
51
51
|
ref: "wrapper-ref",
|
|
52
52
|
class: "max-h-[inherit] p-0 text-base",
|
|
53
53
|
focus: "",
|
|
@@ -62,42 +62,42 @@ const $ = ["onClick"], j = { class: "flex h-4 w-4 items-center justify-center" }
|
|
|
62
62
|
class: "custom-scroll flex max-h-[inherit] flex-col gap-1 border-t p-1",
|
|
63
63
|
onClick: l
|
|
64
64
|
}, [
|
|
65
|
-
(o(!0), a(d, null,
|
|
65
|
+
(o(!0), a(d, null, g(p.value, (i) => (o(), m(k, {
|
|
66
66
|
key: i.id,
|
|
67
67
|
collection: e.collection,
|
|
68
68
|
operation: e.operation,
|
|
69
69
|
server: e.server,
|
|
70
70
|
serverOption: i,
|
|
71
71
|
type: "request",
|
|
72
|
-
"onUpdate:variable":
|
|
72
|
+
"onUpdate:variable": b
|
|
73
73
|
}, null, 8, ["collection", "operation", "server", "serverOption"]))), 128)),
|
|
74
74
|
A.value ? (o(), a(d, { key: 0 }, [
|
|
75
75
|
c(n(I)),
|
|
76
76
|
t[2] || (t[2] = s("div", { class: "text-xxs text-c-2 px-2.5 py-1" }, "Collection", -1))
|
|
77
|
-
], 64)) :
|
|
78
|
-
(o(!0), a(d, null,
|
|
77
|
+
], 64)) : S("", !0),
|
|
78
|
+
(o(!0), a(d, null, g(x.value, (i) => (o(), m(k, {
|
|
79
79
|
key: i.id,
|
|
80
80
|
collection: e.collection,
|
|
81
81
|
operation: e.operation,
|
|
82
82
|
server: e.server,
|
|
83
83
|
serverOption: i,
|
|
84
84
|
type: "collection",
|
|
85
|
-
"onUpdate:variable":
|
|
85
|
+
"onUpdate:variable": b
|
|
86
86
|
}, null, 8, ["collection", "operation", "server", "serverOption"]))), 128)),
|
|
87
|
-
n(
|
|
87
|
+
n(w) !== "modal" ? (o(), a("button", {
|
|
88
88
|
key: 1,
|
|
89
89
|
class: "text-xxs hover:bg-b-2 flex cursor-pointer items-center gap-1.5 rounded p-1.75",
|
|
90
90
|
type: "button",
|
|
91
91
|
onClick: D
|
|
92
92
|
}, [
|
|
93
93
|
s("div", j, [
|
|
94
|
-
c(n(
|
|
94
|
+
c(n(h), {
|
|
95
95
|
icon: "Add",
|
|
96
96
|
size: "sm"
|
|
97
97
|
})
|
|
98
98
|
]),
|
|
99
99
|
t[3] || (t[3] = s("span", null, "Add Server", -1))
|
|
100
|
-
])) :
|
|
100
|
+
])) : S("", !0)
|
|
101
101
|
], 8, $)
|
|
102
102
|
]),
|
|
103
103
|
backdrop: v(() => [
|
|
@@ -114,7 +114,7 @@ const $ = ["onClick"], j = { class: "flex h-4 w-4 items-center justify-center" }
|
|
|
114
114
|
L(" " + T(B.value), 1)
|
|
115
115
|
], 64)) : (o(), a(d, { key: 1 }, [
|
|
116
116
|
t[1] || (t[1] = s("span", { class: "sr-only" }, "Add Server", -1)),
|
|
117
|
-
c(n(
|
|
117
|
+
c(n(h), {
|
|
118
118
|
icon: "Add",
|
|
119
119
|
size: "xs"
|
|
120
120
|
})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as U, useId as C, computed as S, useTemplateRef as V, createElementBlock as n, openBlock as d, normalizeClass as q, createElementVNode as c, createCommentVNode as x, mergeProps as E, unref as s, createVNode as p, toDisplayString as M, withModifiers as _ } from "vue";
|
|
2
2
|
import { ScalarListboxCheckbox as I, ScalarMarkdown as N } from "@scalar/components";
|
|
3
3
|
import { emitCustomEvent as y } from "@scalar/workspace-store/events";
|
|
4
4
|
import B from "./ServerVariablesForm.vue.js";
|
|
5
5
|
import { useWorkspace as D } from "../../store/store.js";
|
|
6
|
-
const P = ["aria-expanded"], j = { class: "overflow-hidden text-ellipsis whitespace-nowrap" }, z = ["id"], L = { key: 0 }, R = { class: "description text-c-3 px-3 py-1.5" }, G = /* @__PURE__ */
|
|
6
|
+
const P = ["aria-expanded"], j = { class: "overflow-hidden text-ellipsis whitespace-nowrap" }, z = ["id"], L = { key: 0 }, R = { class: "description text-c-3 px-3 py-1.5" }, G = /* @__PURE__ */ U({
|
|
7
7
|
__name: "ServerDropdownItem",
|
|
8
8
|
props: {
|
|
9
9
|
collection: {},
|
|
@@ -13,69 +13,69 @@ const P = ["aria-expanded"], j = { class: "overflow-hidden text-ellipsis whitesp
|
|
|
13
13
|
type: {}
|
|
14
14
|
},
|
|
15
15
|
emits: ["update:variable"],
|
|
16
|
-
setup(
|
|
17
|
-
const e =
|
|
18
|
-
if (
|
|
19
|
-
e.operation?.servers?.length &&
|
|
16
|
+
setup(o, { emit: h }) {
|
|
17
|
+
const e = o, g = h, u = C(), { collectionMutators: v, requestMutators: l, servers: f } = D(), k = (t, r) => {
|
|
18
|
+
if (m(t) && r?.stopPropagation(), i.value) {
|
|
19
|
+
e.operation?.servers?.length && l.edit(e.operation.uid, "selectedServerUid", null), e.type === "collection" ? (v.edit(
|
|
20
20
|
e.collection.uid,
|
|
21
21
|
"selectedServerUid",
|
|
22
22
|
void 0
|
|
23
|
-
), y(
|
|
23
|
+
), y(b.value, "scalar-update-selected-server", {
|
|
24
24
|
value: void 0,
|
|
25
25
|
options: { disableOldStoreUpdate: !0 }
|
|
26
|
-
})) : e.type === "request" && e.operation &&
|
|
26
|
+
})) : e.type === "request" && e.operation && l.edit(e.operation.uid, "selectedServerUid", null);
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
e.type === "collection" && e.collection ? (e.operation?.servers?.length &&
|
|
29
|
+
e.type === "collection" && e.collection ? (e.operation?.servers?.length && l.edit(e.operation.uid, "selectedServerUid", null), v.edit(
|
|
30
30
|
e.collection.uid,
|
|
31
31
|
"selectedServerUid",
|
|
32
|
-
|
|
33
|
-
), y(
|
|
34
|
-
value:
|
|
32
|
+
t
|
|
33
|
+
), y(b.value, "scalar-update-selected-server", {
|
|
34
|
+
value: f[t]?.url,
|
|
35
35
|
options: { disableOldStoreUpdate: !0 }
|
|
36
|
-
})) : e.type === "request" && e.operation &&
|
|
37
|
-
},
|
|
38
|
-
if (!
|
|
36
|
+
})) : e.type === "request" && e.operation && l.edit(e.operation.uid, "selectedServerUid", t);
|
|
37
|
+
}, i = S(() => e.type === "collection" ? e.collection.selectedServerUid === e.serverOption.id && !e.operation?.selectedServerUid : e.type === "request" && e.operation ? e.operation.selectedServerUid === e.serverOption.id : !1), m = (t) => {
|
|
38
|
+
if (!t)
|
|
39
39
|
return !1;
|
|
40
|
-
const
|
|
41
|
-
return Object.keys(
|
|
42
|
-
},
|
|
43
|
-
() =>
|
|
44
|
-
), w = (
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
return (
|
|
40
|
+
const r = f[t];
|
|
41
|
+
return Object.keys(r?.variables ?? {}).length > 0;
|
|
42
|
+
}, a = S(
|
|
43
|
+
() => i.value && m(e.server?.uid ?? "")
|
|
44
|
+
), w = (t, r) => {
|
|
45
|
+
g("update:variable", t, r);
|
|
46
|
+
}, b = V("wrapper-ref");
|
|
47
|
+
return (t, r) => (d(), n("div", {
|
|
48
48
|
ref: "wrapper-ref",
|
|
49
|
-
class:
|
|
49
|
+
class: q(["group/item flex min-h-fit flex-col rounded border", { "border-transparent": !i.value }])
|
|
50
50
|
}, [
|
|
51
|
-
|
|
52
|
-
"aria-expanded":
|
|
53
|
-
class: ["flex min-h-8 cursor-pointer items-center gap-1.5 rounded px-1.5",
|
|
51
|
+
c("button", E(a.value ? { "aria-controls": s(u) } : {}, {
|
|
52
|
+
"aria-expanded": a.value,
|
|
53
|
+
class: ["flex min-h-8 cursor-pointer items-center gap-1.5 rounded px-1.5", i.value ? "text-c-1 bg-b-2" : "hover:bg-b-2"],
|
|
54
54
|
type: "button",
|
|
55
|
-
onClick:
|
|
55
|
+
onClick: r[0] || (r[0] = (O) => k(o.serverOption.id, O))
|
|
56
56
|
}), [
|
|
57
|
-
p(s(I), { selected:
|
|
58
|
-
|
|
57
|
+
p(s(I), { selected: i.value }, null, 8, ["selected"]),
|
|
58
|
+
c("span", j, M(o.serverOption.label), 1)
|
|
59
59
|
], 16, P),
|
|
60
|
-
|
|
60
|
+
a.value ? (d(), n("div", {
|
|
61
61
|
key: 0,
|
|
62
|
-
id: s(
|
|
62
|
+
id: s(u),
|
|
63
63
|
class: "bg-b-2 divide divide-y rounded-b border-t *:pl-4",
|
|
64
|
-
onClick:
|
|
64
|
+
onClick: r[1] || (r[1] = _(() => {
|
|
65
65
|
}, ["stop"]))
|
|
66
66
|
}, [
|
|
67
67
|
p(B, {
|
|
68
|
-
variables:
|
|
68
|
+
variables: o.server?.variables,
|
|
69
69
|
"onUpdate:variable": w
|
|
70
70
|
}, null, 8, ["variables"]),
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
o.server?.description ? (d(), n("div", L, [
|
|
72
|
+
c("div", R, [
|
|
73
73
|
p(s(N), {
|
|
74
|
-
value:
|
|
74
|
+
value: o.server.description
|
|
75
75
|
}, null, 8, ["value"])
|
|
76
76
|
])
|
|
77
|
-
])) :
|
|
78
|
-
], 8, z)) :
|
|
77
|
+
])) : x("", !0)
|
|
78
|
+
], 8, z)) : x("", !0)
|
|
79
79
|
], 2));
|
|
80
80
|
}
|
|
81
81
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as x, computed as a, watch as w, createBlock as b, createElementBlock as h, openBlock as v, unref as n, withCtx as f, createVNode as m, createElementVNode as l, toDisplayString as
|
|
1
|
+
import { defineComponent as x, computed as a, watch as w, createBlock as b, createElementBlock as h, openBlock as v, unref as n, withCtx as f, createVNode as m, createElementVNode as l, toDisplayString as g } from "vue";
|
|
2
2
|
import { ScalarListbox as y, ScalarButton as k } from "@scalar/components";
|
|
3
3
|
import { ScalarIconCaretDown as U } from "@scalar/icons";
|
|
4
4
|
import { useWorkspace as V } from "../../store/store.js";
|
|
@@ -13,45 +13,45 @@ const B = { class: "overflow-x-auto" }, W = {
|
|
|
13
13
|
target: {}
|
|
14
14
|
},
|
|
15
15
|
emits: ["updateServer"],
|
|
16
|
-
setup(
|
|
17
|
-
const i =
|
|
18
|
-
() =>
|
|
19
|
-
id:
|
|
20
|
-
label: o[
|
|
16
|
+
setup(t, { emit: p }) {
|
|
17
|
+
const i = p, { servers: o, collectionMutators: u } = V(), s = a(
|
|
18
|
+
() => t.collection?.servers.map((r) => ({
|
|
19
|
+
id: r,
|
|
20
|
+
label: o[r]?.url ?? "Unknown server"
|
|
21
21
|
}))
|
|
22
22
|
), c = a({
|
|
23
|
-
get: () =>
|
|
24
|
-
set: (
|
|
25
|
-
if (!
|
|
23
|
+
get: () => t.server ? s.value.find((r) => r.id === t.server.uid) : void 0,
|
|
24
|
+
set: (r) => {
|
|
25
|
+
if (!r)
|
|
26
26
|
return;
|
|
27
27
|
u.edit(
|
|
28
|
-
|
|
28
|
+
t.collection.uid,
|
|
29
29
|
"selectedServerUid",
|
|
30
|
-
|
|
30
|
+
r.id
|
|
31
31
|
);
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const e = o[r.id]?.url;
|
|
33
|
+
e && i("updateServer", e);
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
w(
|
|
37
|
-
() =>
|
|
38
|
-
(
|
|
39
|
-
if (!
|
|
37
|
+
() => t.collection,
|
|
38
|
+
(r) => {
|
|
39
|
+
if (!r || r.selectedServerUid)
|
|
40
40
|
return;
|
|
41
|
-
const
|
|
42
|
-
|
|
41
|
+
const e = t.collection.servers?.[0];
|
|
42
|
+
e && (u.edit(t.collection.uid, "selectedServerUid", e), o[e]?.url && i("updateServer", o[e].url));
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
|
-
const d = a(() =>
|
|
46
|
-
return (
|
|
45
|
+
const d = a(() => t.server?.url?.endsWith("/") ? t.server.url.slice(0, -1) : t.server?.url || "");
|
|
46
|
+
return (r, e) => s.value.length > 1 ? (v(), b(n(y), {
|
|
47
47
|
key: 0,
|
|
48
48
|
modelValue: c.value,
|
|
49
|
-
"onUpdate:modelValue":
|
|
49
|
+
"onUpdate:modelValue": e[0] || (e[0] = (S) => c.value = S),
|
|
50
50
|
options: s.value,
|
|
51
51
|
placement: "bottom-start",
|
|
52
52
|
resize: "",
|
|
53
|
-
target:
|
|
54
|
-
teleport: `#${
|
|
53
|
+
target: t.target,
|
|
54
|
+
teleport: `#${t.target}`,
|
|
55
55
|
class: "group"
|
|
56
56
|
}, {
|
|
57
57
|
default: f(() => [
|
|
@@ -60,8 +60,8 @@ const B = { class: "overflow-x-auto" }, W = {
|
|
|
60
60
|
variant: "ghost"
|
|
61
61
|
}, {
|
|
62
62
|
default: f(() => [
|
|
63
|
-
|
|
64
|
-
l("span", B,
|
|
63
|
+
e[1] || (e[1] = l("span", { class: "sr-only" }, "Server:", -1)),
|
|
64
|
+
l("span", B, g(d.value), 1),
|
|
65
65
|
m(n(U), {
|
|
66
66
|
weight: "bold",
|
|
67
67
|
class: "text-c-2 ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100"
|
|
@@ -72,8 +72,8 @@ const B = { class: "overflow-x-auto" }, W = {
|
|
|
72
72
|
]),
|
|
73
73
|
_: 1
|
|
74
74
|
}, 8, ["modelValue", "options", "target", "teleport"])) : (v(), h("div", W, [
|
|
75
|
-
|
|
76
|
-
l("span", z,
|
|
75
|
+
e[2] || (e[2] = l("span", { class: "sr-only" }, "Server:", -1)),
|
|
76
|
+
l("span", z, g(d.value), 1)
|
|
77
77
|
]));
|
|
78
78
|
}
|
|
79
79
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as m, useId as v, createElementBlock as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as m, useId as v, createElementBlock as u, createCommentVNode as g, openBlock as a, Fragment as h, renderList as y, normalizeClass as k, createElementVNode as $, createBlock as b, unref as o, toDisplayString as C } from "vue";
|
|
2
|
+
import x from "./ServerVariablesSelect.vue.js";
|
|
3
3
|
import V from "./ServerVariablesTextbox.vue.js";
|
|
4
4
|
const B = ["for"], F = /* @__PURE__ */ m({
|
|
5
5
|
__name: "ServerVariablesForm",
|
|
@@ -10,38 +10,38 @@ const B = ["for"], F = /* @__PURE__ */ m({
|
|
|
10
10
|
layout: { default: "client" }
|
|
11
11
|
},
|
|
12
12
|
emits: ["update:variable"],
|
|
13
|
-
setup(
|
|
14
|
-
const f = d,
|
|
15
|
-
function
|
|
16
|
-
f("update:variable",
|
|
13
|
+
setup(t, { emit: d }) {
|
|
14
|
+
const f = d, n = v();
|
|
15
|
+
function i(l, c) {
|
|
16
|
+
f("update:variable", l, c);
|
|
17
17
|
}
|
|
18
|
-
const
|
|
19
|
-
return (
|
|
20
|
-
key:
|
|
21
|
-
class:
|
|
18
|
+
const s = (l) => (t.values?.[l] ?? t.variables?.[l]?.default ?? "").toString();
|
|
19
|
+
return (l, c) => t.variables && Object.keys(t.variables ?? {}).length ? (a(!0), u(h, { key: 0 }, y(Object.keys(t.variables), (e) => (a(), u("div", {
|
|
20
|
+
key: e,
|
|
21
|
+
class: k([
|
|
22
22
|
"group/label flex h-8 w-full",
|
|
23
|
-
|
|
23
|
+
t.layout === "reference" && "items-center border-x border-b last:rounded-b-lg"
|
|
24
24
|
])
|
|
25
25
|
}, [
|
|
26
|
-
|
|
26
|
+
$("label", {
|
|
27
27
|
class: "flex items-center py-2 pl-3 group-has-[input]/label:mr-0 after:content-[':']",
|
|
28
|
-
for: `${
|
|
29
|
-
},
|
|
30
|
-
|
|
28
|
+
for: `${o(n)}-${e}`
|
|
29
|
+
}, C(e), 9, B),
|
|
30
|
+
t.variables?.[e]?.enum?.length ? (a(), b(x, {
|
|
31
31
|
key: 0,
|
|
32
|
-
id: `${
|
|
33
|
-
controls:
|
|
34
|
-
enum:
|
|
35
|
-
value:
|
|
36
|
-
onChange: (
|
|
37
|
-
}, null, 8, ["id", "controls", "enum", "value", "onChange"])) : (
|
|
32
|
+
id: `${o(n)}-${e}`,
|
|
33
|
+
controls: t.controls,
|
|
34
|
+
enum: t.variables[e]?.enum?.map((r) => `${r}`) ?? [],
|
|
35
|
+
value: s(e),
|
|
36
|
+
onChange: (r) => i(e, r)
|
|
37
|
+
}, null, 8, ["id", "controls", "enum", "value", "onChange"])) : (a(), b(V, {
|
|
38
38
|
key: 1,
|
|
39
|
-
id: `${
|
|
40
|
-
controls:
|
|
41
|
-
value:
|
|
42
|
-
onChange: (
|
|
39
|
+
id: `${o(n)}-${e}`,
|
|
40
|
+
controls: t.controls,
|
|
41
|
+
value: s(e),
|
|
42
|
+
onChange: (r) => i(e, r)
|
|
43
43
|
}, null, 8, ["id", "controls", "value", "onChange"]))
|
|
44
|
-
], 2))), 128)) :
|
|
44
|
+
], 2))), 128)) : g("", !0);
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as f, computed as
|
|
2
|
-
import { ScalarListbox as
|
|
1
|
+
import { defineComponent as f, computed as s, createBlock as v, openBlock as c, unref as a, withCtx as i, createVNode as u, createElementVNode as g, normalizeClass as x, createElementBlock as S, createCommentVNode as V, createTextVNode as b, toDisplayString as h } from "vue";
|
|
2
|
+
import { ScalarListbox as C, ScalarButton as k } from "@scalar/components";
|
|
3
3
|
import { ScalarIconCaretDown as B } from "@scalar/icons";
|
|
4
4
|
const N = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "sr-only"
|
|
7
|
-
},
|
|
7
|
+
}, D = /* @__PURE__ */ f({
|
|
8
8
|
__name: "ServerVariablesSelect",
|
|
9
9
|
props: {
|
|
10
10
|
enum: {},
|
|
@@ -12,32 +12,32 @@ const N = {
|
|
|
12
12
|
controls: {}
|
|
13
13
|
},
|
|
14
14
|
emits: ["change"],
|
|
15
|
-
setup(
|
|
16
|
-
const o =
|
|
15
|
+
setup(t, { emit: m }) {
|
|
16
|
+
const o = t, d = m, n = s(
|
|
17
17
|
() => o.enum.map((e) => ({ id: e, label: e }))
|
|
18
|
-
),
|
|
19
|
-
get: () =>
|
|
20
|
-
set: (e) =>
|
|
18
|
+
), l = s({
|
|
19
|
+
get: () => n.value.find((e) => e.id === o.value),
|
|
20
|
+
set: (e) => d("change", e?.id ?? "")
|
|
21
21
|
});
|
|
22
|
-
return (e,
|
|
23
|
-
modelValue:
|
|
24
|
-
"onUpdate:modelValue":
|
|
25
|
-
options:
|
|
22
|
+
return (e, r) => (c(), v(a(C), {
|
|
23
|
+
modelValue: l.value,
|
|
24
|
+
"onUpdate:modelValue": r[0] || (r[0] = (p) => l.value = p),
|
|
25
|
+
options: n.value
|
|
26
26
|
}, {
|
|
27
|
-
default:
|
|
28
|
-
|
|
29
|
-
"aria-controls":
|
|
27
|
+
default: i(() => [
|
|
28
|
+
u(a(k), {
|
|
29
|
+
"aria-controls": t.controls,
|
|
30
30
|
class: "group/button h-8 gap-1.5 p-1.5 text-base font-normal",
|
|
31
31
|
variant: "ghost"
|
|
32
32
|
}, {
|
|
33
|
-
default:
|
|
33
|
+
default: i(() => [
|
|
34
34
|
g("span", {
|
|
35
|
-
class:
|
|
35
|
+
class: x({ "text-c-1": t.value })
|
|
36
36
|
}, [
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
t.value ? (c(), S("span", N, " Selected: ")) : V("", !0),
|
|
38
|
+
b(" " + h(t.value || "Select value"), 1)
|
|
39
39
|
], 2),
|
|
40
|
-
|
|
40
|
+
u(a(B), {
|
|
41
41
|
weight: "bold",
|
|
42
42
|
class: "mt-0.25 size-3 transition-transform duration-100 group-aria-expanded/button:rotate-180"
|
|
43
43
|
})
|
|
@@ -50,5 +50,5 @@ const N = {
|
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
export {
|
|
53
|
-
|
|
53
|
+
D as default
|
|
54
54
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as c, computed as u, withDirectives as p, createElementBlock as m, openBlock as i, mergeProps as d, vModelText as f } from "vue";
|
|
2
|
+
const x = /* @__PURE__ */ c({
|
|
3
3
|
__name: "ServerVariablesTextbox",
|
|
4
4
|
props: {
|
|
5
5
|
value: {},
|
|
6
6
|
controls: {}
|
|
7
7
|
},
|
|
8
8
|
emits: ["change"],
|
|
9
|
-
setup(
|
|
10
|
-
const a =
|
|
9
|
+
setup(e, { emit: r }) {
|
|
10
|
+
const a = e, n = r, o = u({
|
|
11
11
|
get: () => a.value,
|
|
12
|
-
set: (
|
|
12
|
+
set: (t) => n("change", t)
|
|
13
13
|
});
|
|
14
|
-
return (
|
|
15
|
-
"onUpdate:modelValue":
|
|
16
|
-
}, e.controls ? { ...
|
|
14
|
+
return (t, l) => p((i(), m("input", d({
|
|
15
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => o.value = s)
|
|
16
|
+
}, e.controls ? { ...t.$attrs, "aria-controls": e.controls } : {}, {
|
|
17
17
|
autocomplete: "off",
|
|
18
18
|
class: "text-c-1 w-full border-transparent px-1.5 py-1.25 -outline-offset-1 group-last/label:rounded-br-lg",
|
|
19
19
|
placeholder: "value",
|
|
20
20
|
spellcheck: "false",
|
|
21
21
|
type: "text"
|
|
22
22
|
}), null, 16)), [
|
|
23
|
-
[f,
|
|
23
|
+
[f, o.value]
|
|
24
24
|
]);
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
x as default
|
|
29
29
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { OpenAPIV3, OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
type ServerVariable = OpenAPIV3.ServerVariableObject | OpenAPIV3_1.ServerVariableObject;
|
|
2
3
|
export type ServerVariables = {
|
|
3
4
|
[variable: string]: ServerVariable;
|
|
4
5
|
};
|
|
5
6
|
export type ServerVariableValues = {
|
|
6
7
|
[variable: string]: string;
|
|
7
8
|
};
|
|
8
|
-
export
|
|
9
|
+
export {};
|
|
9
10
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Server/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnE,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;CAC3B,CAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Server/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnE,KAAK,cAAc,GAAG,SAAS,CAAC,oBAAoB,GAAG,WAAW,CAAC,oBAAoB,CAAA;AAEvF,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAA;CAC3B,CAAA"}
|