@scalar/api-client 2.15.0 → 2.17.1
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 +166 -0
- package/dist/hooks/useResponseBody.js +6 -6
- package/dist/libs/errors.d.ts +1 -0
- package/dist/libs/errors.d.ts.map +1 -1
- package/dist/libs/errors.js +1 -0
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +41 -35
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +28 -38
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +84 -45
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -11
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +2 -2
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +28 -35
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts +10 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +22 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts +31 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +31 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +3 -9
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +56 -0
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +10 -3
- package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-security.js +46 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +45 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/build-request.js +66 -0
- package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +9 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts +16 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +4 -0
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +17 -0
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts +9 -3
- package/dist/v2/blocks/operation-block/helpers/get-example.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-example.js +21 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +53 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/helpers/send-request.js +120 -0
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +89 -110
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +2 -2
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +8 -13
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +22 -28
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +19 -8
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +30 -24
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +12 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +20 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts +10 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +4 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +14 -12
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +191 -169
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +10 -10
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +2 -1
- 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 +15 -19
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +2 -2
- package/dist/v2/blocks/operation-code-sample/index.d.ts +1 -1
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/types.d.ts +16 -0
- package/dist/v2/blocks/operation-code-sample/types.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +15 -10
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +158 -125
- 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 +59 -50
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +8 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +127 -0
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +4 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +24 -23
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +148 -149
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts +1 -0
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +28 -27
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -2
- 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 +13 -3
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +4 -4
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +3 -3
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +41 -45
- package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.js +27 -27
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +1 -1
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts +18 -0
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.d.ts.map +1 -0
- package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +12 -0
- package/dist/v2/blocks/response-block/helpers/process-response-body.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +0 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +97 -87
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts +19 -0
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +24 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -2
- 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 +59 -56
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +3 -1
- 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 -24
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -1
- 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 +44 -43
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +4 -4
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -2
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +7 -6
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +2 -2
- package/dist/v2/components/code-input/CodeInput.vue2.js +61 -59
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +2 -2
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +44 -44
- package/dist/v2/components/resize/index.d.ts +0 -1
- package/dist/v2/components/resize/index.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts +5 -5
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +49 -47
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.d.ts +3 -0
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +128 -139
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +3 -3
- package/dist/v2/features/app/components/AppSidebar.vue2.js +137 -105
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/{ItemDecorator.vue.d.ts → SidebarItemMenu.vue.d.ts} +1 -1
- package/dist/v2/features/app/components/SidebarItemMenu.vue.d.ts.map +1 -0
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +129 -0
- package/dist/v2/features/app/components/SidebarItemMenu.vue2.js +4 -0
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts +1 -1
- package/dist/v2/features/app/components/WebTopNav.vue.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -2
- 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 +8 -8
- package/dist/v2/features/app/helpers/routes.d.ts +32 -6
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +25 -16
- package/dist/v2/{hooks/use-sidebar-state.d.ts → features/app/hooks/use-app-sidebar.d.ts} +10 -11
- package/dist/v2/features/app/hooks/use-app-sidebar.d.ts.map +1 -0
- package/dist/v2/{hooks/use-sidebar-state.js → features/app/hooks/use-app-sidebar.js} +19 -19
- package/dist/v2/features/app/hooks/use-document-watcher.d.ts.map +1 -0
- package/dist/v2/{hooks → features/app/hooks}/use-sync-path.d.ts +2 -2
- package/dist/v2/features/app/hooks/use-sync-path.d.ts.map +1 -0
- package/dist/v2/features/app/hooks/use-sync-path.js +52 -0
- package/dist/v2/{hooks → features/app/hooks}/use-tabs.d.ts +2 -2
- package/dist/v2/features/app/hooks/use-tabs.d.ts.map +1 -0
- package/dist/v2/{hooks → features/app/hooks}/use-tabs.js +1 -1
- package/dist/v2/{hooks/use-workspace-client-events.d.ts → features/app/hooks/use-workspace-client-app-events.d.ts} +5 -5
- package/dist/v2/features/app/hooks/use-workspace-client-app-events.d.ts.map +1 -0
- package/dist/v2/{hooks/use-workspace-client-events.js → features/app/hooks/use-workspace-client-app-events.js} +48 -45
- package/dist/v2/features/app/hooks/use-workspace-selector.d.ts.map +1 -0
- package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.js +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +92 -2
- package/dist/v2/features/collection/DocumentCollection.vue2.js +2 -91
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +42 -2
- package/dist/v2/features/collection/WorkspaceCollection.vue2.js +2 -41
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +2 -2
- package/dist/v2/features/collection/components/Authentication.vue2.js +14 -12
- package/dist/v2/features/collection/components/Cookies.vue.js +30 -1
- package/dist/v2/features/collection/components/Cookies.vue2.js +1 -29
- package/dist/v2/features/collection/components/Environment.vue.js +32 -1
- package/dist/v2/features/collection/components/Environment.vue2.js +1 -31
- package/dist/v2/features/collection/components/Overview.vue2.js +5 -4
- package/dist/v2/features/collection/components/Servers.vue.js +142 -2
- package/dist/v2/features/collection/components/Servers.vue2.js +2 -141
- package/dist/v2/features/collection/components/Settings.vue.js +58 -2
- package/dist/v2/features/collection/components/Settings.vue2.js +2 -57
- package/dist/v2/features/modal/Modal.vue.d.ts +23 -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 +118 -31
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +18 -32
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/modal/helpers/create-api-client-modal.js +46 -26
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +55 -0
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -0
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +29 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +42 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -0
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js +93 -0
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts +18 -0
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -0
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +30 -0
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +59 -28
- package/dist/v2/features/operation/helpers/get-operation-header.d.ts +17 -0
- package/dist/v2/features/operation/helpers/get-operation-header.d.ts.map +1 -0
- package/dist/v2/features/operation/helpers/get-operation-header.js +12 -0
- package/dist/v2/features/operation/helpers/get-security-requirements.d.ts +1 -1
- package/dist/v2/features/operation/helpers/get-security-requirements.d.ts.map +1 -1
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts +7 -0
- package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -0
- package/dist/v2/features/operation/helpers/get-selected-security.js +19 -0
- package/dist/v2/features/operation/index.d.ts +0 -1
- package/dist/v2/features/operation/index.d.ts.map +1 -1
- package/dist/v2/features/search/components/SearchModal.vue.d.ts.map +1 -1
- package/dist/v2/features/search/components/SearchModal.vue.js +3 -3
- package/dist/v2/features/search/components/SearchModal.vue2.js +45 -44
- package/dist/v2/helpers/generate-location-id.d.ts +19 -0
- package/dist/v2/helpers/generate-location-id.d.ts.map +1 -0
- package/dist/v2/helpers/generate-location-id.js +10 -0
- package/dist/v2/helpers/get-active-environment.d.ts +5 -0
- package/dist/v2/helpers/get-active-environment.d.ts.map +1 -0
- package/dist/v2/helpers/get-active-environment.js +22 -0
- package/dist/v2/helpers/get-tab-details.d.ts +2 -2
- package/dist/v2/helpers/get-tab-details.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +1 -1
- package/dist/v2/helpers/plugins.d.ts +59 -0
- package/dist/v2/helpers/plugins.d.ts.map +1 -0
- package/dist/v2/helpers/plugins.js +11 -0
- package/dist/v2/hooks/use-scroll-lock.d.ts +28 -0
- package/dist/v2/hooks/use-scroll-lock.d.ts.map +1 -0
- package/dist/v2/hooks/use-scroll-lock.js +21 -0
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +2 -0
- 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 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/index.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +20 -20
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts +0 -7
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.js +0 -28
- package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts +0 -6
- package/dist/v2/blocks/request-block/helpers/get-parameter-example.d.ts.map +0 -1
- package/dist/v2/blocks/request-block/helpers/get-parameter-example.js +0 -12
- package/dist/v2/features/app/components/ItemDecorator.vue.d.ts.map +0 -1
- package/dist/v2/features/app/components/ItemDecorator.vue.js +0 -138
- package/dist/v2/features/app/components/ItemDecorator.vue2.js +0 -4
- package/dist/v2/hooks/use-document-watcher.d.ts.map +0 -1
- package/dist/v2/hooks/use-sidebar-state.d.ts.map +0 -1
- package/dist/v2/hooks/use-sync-path.d.ts.map +0 -1
- package/dist/v2/hooks/use-sync-path.js +0 -51
- package/dist/v2/hooks/use-tabs.d.ts.map +0 -1
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +0 -1
- package/dist/v2/hooks/use-workspace-selector.d.ts.map +0 -1
- package/dist/v2/plugins.d.ts +0 -44
- package/dist/v2/plugins.d.ts.map +0 -1
- /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.d.ts +0 -0
- /package/dist/v2/{hooks → features/app/hooks}/use-document-watcher.js +0 -0
- /package/dist/v2/{hooks → features/app/hooks}/use-workspace-selector.d.ts +0 -0
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarWrappingText as
|
|
3
|
-
import { REQUEST_METHODS as
|
|
4
|
-
import { ScalarIconWarningCircle as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
1
|
+
import { defineComponent as I, useId as L, computed as w, ref as S, useTemplateRef as U, onMounted as M, onBeforeUnmount as N, createElementBlock as z, openBlock as h, unref as n, createElementVNode as s, normalizeClass as D, createVNode as a, createCommentVNode as E, normalizeStyle as F, createBlock as H, createTextVNode as p, toDisplayString as m, withCtx as W } from "vue";
|
|
2
|
+
import { ScalarWrappingText as O, ScalarButton as P, ScalarIcon as K } from "@scalar/components";
|
|
3
|
+
import { REQUEST_METHODS as Q } from "@scalar/helpers/http/http-info";
|
|
4
|
+
import { ScalarIconWarningCircle as j } from "@scalar/icons";
|
|
5
|
+
import { useLoadingAnimation as G } from "../hooks/use-loading-animation.js";
|
|
6
|
+
import J from "./AddressBarHistory.vue.js";
|
|
7
|
+
import X from "../../../../components/HttpMethod/HttpMethod.vue.js";
|
|
8
|
+
import Y from "../../../components/server/ServerDropdown.vue.js";
|
|
9
|
+
import Z from "../../../components/code-input/CodeInput.vue.js";
|
|
10
|
+
const _ = ["id"], ee = { class: "pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border" }, te = { class: "z-context-plus flex gap-1" }, oe = { class: "scroll-timeline-x scroll-timeline-x-hidden z-context-plus relative flex w-full bg-blend-normal" }, se = {
|
|
10
11
|
key: 0,
|
|
11
12
|
class: "z-context absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6"
|
|
12
|
-
},
|
|
13
|
+
}, ne = { class: "text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1" }, le = { class: "min-w-0 flex-1" }, re = {
|
|
13
14
|
"aria-hidden": "true",
|
|
14
15
|
class: "inline-flex items-center gap-1"
|
|
15
|
-
},
|
|
16
|
+
}, ae = { class: "sr-only" }, be = /* @__PURE__ */ I({
|
|
16
17
|
__name: "AddressBar",
|
|
17
18
|
props: {
|
|
18
19
|
path: {},
|
|
@@ -21,76 +22,84 @@ const G = ["id"], J = { class: "pointer-events-none absolute top-0 left-0 block
|
|
|
21
22
|
servers: {},
|
|
22
23
|
history: {},
|
|
23
24
|
layout: {},
|
|
24
|
-
percentage: { default: 100 },
|
|
25
25
|
eventBus: {},
|
|
26
26
|
environment: {}
|
|
27
27
|
},
|
|
28
28
|
emits: ["execute", "update:servers"],
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
31
|
-
backgroundColor: `color-mix(in srgb, transparent 90%, ${
|
|
32
|
-
transform: `translate3d(-${
|
|
33
|
-
})), d =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
29
|
+
setup(o, { expose: R, emit: $ }) {
|
|
30
|
+
const f = $, v = L(), { percentage: b, startLoading: g, stopLoading: c } = G(), V = w(() => ({
|
|
31
|
+
backgroundColor: `color-mix(in srgb, transparent 90%, ${Q[o.method].colorVar})`,
|
|
32
|
+
transform: `translate3d(-${b.value}%,0,0)`
|
|
33
|
+
})), d = S(null), r = S(null), x = w(() => r.value || d.value), B = (e, t, l) => {
|
|
34
|
+
const A = i.value?.cursorPosition();
|
|
35
|
+
o.eventBus.emit(
|
|
36
|
+
"operation:update:pathMethod",
|
|
37
|
+
{
|
|
38
|
+
meta: { method: o.method, path: o.path },
|
|
39
|
+
payload: { method: e, path: t },
|
|
40
|
+
callback: (u) => {
|
|
41
|
+
(u === "success" || u === "no-change") && (r.value = null, d.value = null), u === "success" ? o.eventBus.emit("ui:focus:address-bar", { position: A }) : u === "conflict" && (e !== o.method && (r.value = e), t !== o.path && (d.value = t));
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
l
|
|
45
|
+
);
|
|
46
|
+
}, q = (e) => B(e, d.value ?? o.path), T = (e) => {
|
|
47
|
+
const t = e.startsWith("/") ? e : `/${e}`;
|
|
48
|
+
B(r.value ?? o.method, t, {
|
|
49
|
+
debounceKey: `operation:update:pathMethod-${o.path}-${o.method}`
|
|
50
|
+
});
|
|
51
|
+
}, y = U("sendButtonRef"), i = U("addressBarRef"), C = () => y.value?.$el?.focus(), k = (e) => {
|
|
52
|
+
if (i.value?.isFocused && o.layout !== "desktop")
|
|
53
|
+
return;
|
|
54
|
+
const t = e && "position" in e ? e.position : "end";
|
|
55
|
+
i.value?.focus(t), e && "event" in e && e.event.preventDefault();
|
|
47
56
|
};
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
}),
|
|
51
|
-
|
|
52
|
-
}),
|
|
53
|
-
methodConflict:
|
|
57
|
+
return M(() => {
|
|
58
|
+
o.eventBus.on("ui:focus:address-bar", k), o.eventBus.on("ui:focus:send-button", C), o.eventBus.on("hooks:on:request:sent", g), o.eventBus.on("hooks:on:request:complete", c);
|
|
59
|
+
}), N(() => {
|
|
60
|
+
o.eventBus.off("ui:focus:address-bar", k), o.eventBus.off("ui:focus:send-button", C), o.eventBus.off("hooks:on:request:sent", g), o.eventBus.off("hooks:on:request:complete", c), c();
|
|
61
|
+
}), R({
|
|
62
|
+
methodConflict: r,
|
|
54
63
|
pathConflict: d
|
|
55
|
-
}), (e, t) => (
|
|
56
|
-
id:
|
|
64
|
+
}), (e, t) => (h(), z("div", {
|
|
65
|
+
id: n(v),
|
|
57
66
|
class: "scalar-address-bar order-last flex h-(--scalar-address-bar-height) w-full [--scalar-address-bar-height:32px] lg:order-none lg:w-auto"
|
|
58
67
|
}, [
|
|
59
|
-
|
|
60
|
-
class:
|
|
61
|
-
"outline-c-danger outline":
|
|
68
|
+
s("div", {
|
|
69
|
+
class: D(["address-bar-bg-states text-xxs group relative order-last flex w-full max-w-[calc(100dvw-24px)] flex-1 flex-row items-stretch rounded-lg p-0.75 lg:order-none lg:max-w-[580px] lg:min-w-[580px] xl:max-w-[720px] xl:min-w-[720px]", {
|
|
70
|
+
"outline-c-danger outline": x.value
|
|
62
71
|
}])
|
|
63
72
|
}, [
|
|
64
|
-
|
|
65
|
-
|
|
73
|
+
s("div", ee, [
|
|
74
|
+
s("div", {
|
|
66
75
|
class: "absolute top-0 left-0 z-[1002] h-full w-full",
|
|
67
|
-
style:
|
|
76
|
+
style: F(V.value)
|
|
68
77
|
}, null, 4)
|
|
69
78
|
]),
|
|
70
|
-
|
|
71
|
-
|
|
79
|
+
s("div", te, [
|
|
80
|
+
a(n(X), {
|
|
72
81
|
isEditable: e.layout !== "modal",
|
|
73
82
|
isSquare: "",
|
|
74
|
-
method:
|
|
83
|
+
method: r.value ?? e.method,
|
|
75
84
|
teleport: "",
|
|
76
|
-
onChange:
|
|
85
|
+
onChange: q
|
|
77
86
|
}, null, 8, ["isEditable", "method"])
|
|
78
87
|
]),
|
|
79
|
-
|
|
80
|
-
e.servers.length ? (
|
|
88
|
+
s("div", oe, [
|
|
89
|
+
e.servers.length ? (h(), H(n(Y), {
|
|
81
90
|
key: 0,
|
|
82
91
|
layout: e.layout,
|
|
83
92
|
server: e.server,
|
|
84
93
|
servers: e.servers,
|
|
85
|
-
target:
|
|
86
|
-
"onUpdate:selectedServer": t[0] || (t[0] = (
|
|
87
|
-
"onUpdate:servers": t[1] || (t[1] = (
|
|
88
|
-
"onUpdate:variable": t[2] || (t[2] = (
|
|
89
|
-
}, null, 8, ["layout", "server", "servers", "target"])) :
|
|
90
|
-
t[6] || (t[6] =
|
|
91
|
-
|
|
94
|
+
target: n(v),
|
|
95
|
+
"onUpdate:selectedServer": t[0] || (t[0] = (l) => e.eventBus.emit("server:update:selected", l)),
|
|
96
|
+
"onUpdate:servers": t[1] || (t[1] = (l) => f("update:servers")),
|
|
97
|
+
"onUpdate:variable": t[2] || (t[2] = (l) => e.eventBus.emit("server:update:variables", l))
|
|
98
|
+
}, null, 8, ["layout", "server", "servers", "target"])) : E("", !0),
|
|
99
|
+
t[6] || (t[6] = s("div", { class: "fade-left" }, null, -1)),
|
|
100
|
+
a(n(Z), {
|
|
92
101
|
ref_key: "addressBarRef",
|
|
93
|
-
ref:
|
|
102
|
+
ref: i,
|
|
94
103
|
alwaysEmitChange: "",
|
|
95
104
|
"aria-label": "Path",
|
|
96
105
|
class: "min-w-fit outline-none",
|
|
@@ -101,62 +110,63 @@ const G = ["id"], J = { class: "pointer-events-none absolute top-0 left-0 block
|
|
|
101
110
|
emitOnBlur: !1,
|
|
102
111
|
environment: e.environment,
|
|
103
112
|
importCurl: "",
|
|
113
|
+
layout: e.layout,
|
|
104
114
|
modelValue: e.path,
|
|
105
115
|
placeholder: e.server ? "" : "Enter a URL or cURL command",
|
|
106
116
|
server: "",
|
|
107
|
-
onCurl: t[3] || (t[3] = (
|
|
117
|
+
onCurl: t[3] || (t[3] = (l) => e.eventBus.emit("ui:open:command-palette", {
|
|
108
118
|
action: "import-curl-command",
|
|
109
119
|
payload: {
|
|
110
|
-
curl:
|
|
120
|
+
curl: l
|
|
111
121
|
}
|
|
112
122
|
})),
|
|
113
|
-
onSubmit: t[4] || (t[4] = (
|
|
114
|
-
"onUpdate:modelValue":
|
|
115
|
-
}, null, 8, ["disabled", "environment", "modelValue", "placeholder"]),
|
|
116
|
-
t[7] || (t[7] =
|
|
123
|
+
onSubmit: t[4] || (t[4] = (l) => f("execute")),
|
|
124
|
+
"onUpdate:modelValue": T
|
|
125
|
+
}, null, 8, ["disabled", "environment", "layout", "modelValue", "placeholder"]),
|
|
126
|
+
t[7] || (t[7] = s("div", { class: "fade-right" }, null, -1))
|
|
117
127
|
]),
|
|
118
|
-
|
|
128
|
+
a(J, {
|
|
119
129
|
history: e.history,
|
|
120
|
-
target:
|
|
130
|
+
target: n(v)
|
|
121
131
|
}, null, 8, ["history", "target"]),
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
t[8] || (t[8] =
|
|
127
|
-
|
|
128
|
-
t[9] || (t[9] =
|
|
129
|
-
|
|
132
|
+
x.value ? (h(), z("div", se, [
|
|
133
|
+
s("div", ne, [
|
|
134
|
+
a(n(j), { size: "sm" }),
|
|
135
|
+
s("div", le, [
|
|
136
|
+
t[8] || (t[8] = p(" A ", -1)),
|
|
137
|
+
s("em", null, m(r.value?.toUpperCase() ?? e.method.toUpperCase()), 1),
|
|
138
|
+
t[9] || (t[9] = p(" request to ", -1)),
|
|
139
|
+
a(n(O), {
|
|
130
140
|
text: d.value ?? e.path
|
|
131
141
|
}, null, 8, ["text"]),
|
|
132
|
-
t[10] || (t[10] =
|
|
142
|
+
t[10] || (t[10] = p(" already exists in this document ", -1))
|
|
133
143
|
])
|
|
134
144
|
])
|
|
135
|
-
])) :
|
|
136
|
-
|
|
145
|
+
])) : E("", !0),
|
|
146
|
+
a(n(P), {
|
|
137
147
|
ref_key: "sendButtonRef",
|
|
138
|
-
ref:
|
|
148
|
+
ref: y,
|
|
139
149
|
class: "z-context-plus relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold",
|
|
140
|
-
disabled:
|
|
141
|
-
onClick: t[5] || (t[5] = (
|
|
150
|
+
disabled: n(b) < 100,
|
|
151
|
+
onClick: t[5] || (t[5] = (l) => f("execute"))
|
|
142
152
|
}, {
|
|
143
|
-
default:
|
|
144
|
-
|
|
145
|
-
|
|
153
|
+
default: W(() => [
|
|
154
|
+
s("span", re, [
|
|
155
|
+
a(n(K), {
|
|
146
156
|
class: "relative shrink-0 fill-current",
|
|
147
157
|
icon: "Play",
|
|
148
158
|
size: "xs"
|
|
149
159
|
}),
|
|
150
|
-
t[11] || (t[11] =
|
|
160
|
+
t[11] || (t[11] = s("span", { class: "text-xxs hidden lg:flex" }, "Send", -1))
|
|
151
161
|
]),
|
|
152
|
-
|
|
162
|
+
s("span", ae, " Send " + m(e.method) + " request to " + m(e.server?.url ?? "") + m(e.path), 1)
|
|
153
163
|
]),
|
|
154
164
|
_: 1
|
|
155
165
|
}, 8, ["disabled"])
|
|
156
166
|
], 2)
|
|
157
|
-
], 8,
|
|
167
|
+
], 8, _));
|
|
158
168
|
}
|
|
159
169
|
});
|
|
160
170
|
export {
|
|
161
|
-
|
|
171
|
+
be as default
|
|
162
172
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Manages the loading animation for the address bar.
|
|
4
|
+
*
|
|
5
|
+
* The animation has two phases:
|
|
6
|
+
* 1. While requesting: Animates asymptotically toward 85% to indicate ongoing work
|
|
7
|
+
* 2. After request completes: Animates linearly to 100% over 400ms for smooth completion
|
|
8
|
+
*
|
|
9
|
+
* This creates a natural feel where the bar does not instantly jump to 100%,
|
|
10
|
+
* making the loading experience more predictable and less jarring.
|
|
11
|
+
*
|
|
12
|
+
* @returns An object with methods to control the loading animation and the current percentage
|
|
13
|
+
*/
|
|
14
|
+
export declare const useLoadingAnimation: () => {
|
|
15
|
+
startLoading: () => void;
|
|
16
|
+
stopLoading: () => void;
|
|
17
|
+
percentage: Ref<number>;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=use-loading-animation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-loading-animation.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAe9B;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,QAAO;IACrC,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAwExB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ref as n } from "vue";
|
|
2
|
+
const l = 20, s = 100, I = 0, i = 15, r = 60, c = 400, A = c / l, M = () => {
|
|
3
|
+
const e = n(s), o = n(0), t = n(!1), a = n(), u = () => {
|
|
4
|
+
clearInterval(a.value), a.value = void 0, e.value = s, t.value = !1;
|
|
5
|
+
}, v = () => {
|
|
6
|
+
t.value ? e.value -= (e.value - i) / r : e.value -= o.value / A, e.value <= I && u();
|
|
7
|
+
};
|
|
8
|
+
return {
|
|
9
|
+
startLoading: () => {
|
|
10
|
+
if (a.value) {
|
|
11
|
+
t.value = !0;
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
t.value = !0, a.value = setInterval(v, l);
|
|
15
|
+
},
|
|
16
|
+
stopLoading: () => {
|
|
17
|
+
o.value = e.value, t.value = !1;
|
|
18
|
+
},
|
|
19
|
+
percentage: e
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
M as useLoadingAnimation
|
|
24
|
+
};
|
|
@@ -12,10 +12,11 @@ type __VLS_Props = {
|
|
|
12
12
|
/** Creates a static disclosure that cannot be collapsed */
|
|
13
13
|
isStatic?: boolean;
|
|
14
14
|
meta: AuthMeta;
|
|
15
|
-
|
|
15
|
+
proxyUrl: string;
|
|
16
|
+
securityRequirements: OpenApiDocument['security'];
|
|
16
17
|
securitySchemes: NonNullable<OpenApiDocument['components']>['securitySchemes'];
|
|
17
18
|
selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
|
|
18
|
-
server: ServerObject |
|
|
19
|
+
server: ServerObject | null;
|
|
19
20
|
title: string;
|
|
20
21
|
};
|
|
21
22
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAiTA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;
|
|
1
|
+
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAiTA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAEvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;;cA+BqC,IAAI;cAAQ,MAAM;;;;;AA6bzD,wBAOG"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as
|
|
1
|
+
import { defineComponent as U, useId as $, ref as f, computed as S, createBlock as b, openBlock as r, unref as a, withCtx as c, createVNode as m, createCommentVNode as x, createElementBlock as h, Fragment as g, createElementVNode as u, createTextVNode as k, toDisplayString as v, withModifiers as q, normalizeClass as M } from "vue";
|
|
2
|
+
import { useModal as N, ScalarComboboxMultiselect as T, ScalarButton as z, ScalarListboxCheckbox as j, ScalarIconButton as E } from "@scalar/components";
|
|
3
3
|
import { ScalarIconCaretDown as L, ScalarIconTrash as F } from "@scalar/icons";
|
|
4
4
|
import { getResolvedRef as P } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
5
5
|
import G from "./DeleteRequestAuthModal.vue.js";
|
|
6
|
-
import {
|
|
7
|
-
import Q from "
|
|
8
|
-
import W from "
|
|
9
|
-
|
|
6
|
+
import { isAuthOptional as H } from "../helpers/is-auth-optional.js";
|
|
7
|
+
import { getSecuritySchemeOptions as J, formatComplexScheme as K, formatScheme as Q } from "../helpers/security-scheme.js";
|
|
8
|
+
import W from "./RequestAuthDataTable.vue.js";
|
|
9
|
+
import X from "../../../components/layout/CollapsibleSection.vue.js";
|
|
10
|
+
const Y = ["id"], Z = { class: "min-w-0 flex-1 truncate" }, re = /* @__PURE__ */ U({
|
|
10
11
|
__name: "AuthSelector",
|
|
11
12
|
props: {
|
|
12
13
|
environment: {},
|
|
@@ -14,69 +15,70 @@ const X = ["id"], Y = { class: "min-w-0 flex-1 truncate" }, oe = /* @__PURE__ */
|
|
|
14
15
|
isReadOnly: { type: Boolean, default: !1 },
|
|
15
16
|
isStatic: { type: Boolean, default: !1 },
|
|
16
17
|
meta: {},
|
|
17
|
-
|
|
18
|
+
proxyUrl: {},
|
|
19
|
+
securityRequirements: {},
|
|
18
20
|
securitySchemes: {},
|
|
19
21
|
selectedSecurity: {},
|
|
20
22
|
server: {},
|
|
21
23
|
title: {}
|
|
22
24
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const C =
|
|
25
|
-
if (!
|
|
25
|
+
setup(n, { expose: I }) {
|
|
26
|
+
const C = $(), O = f(null), B = f(!1), d = N(), o = f(null), p = S(() => {
|
|
27
|
+
if (!n.securityRequirements?.length)
|
|
26
28
|
return null;
|
|
27
|
-
const e =
|
|
28
|
-
(l) => Object.keys(l).length > 1
|
|
29
|
-
), s = a.security.some(
|
|
30
|
-
(l) => Object.keys(l).length === 0
|
|
31
|
-
) && !e;
|
|
29
|
+
const e = H(n.securityRequirements);
|
|
32
30
|
return {
|
|
33
|
-
icon:
|
|
34
|
-
text:
|
|
31
|
+
icon: e ? "Unlock" : "Lock",
|
|
32
|
+
text: e ? "Optional" : "Required"
|
|
35
33
|
};
|
|
36
34
|
}), R = S(
|
|
37
|
-
() =>
|
|
35
|
+
() => J(
|
|
36
|
+
n.securityRequirements ?? [],
|
|
37
|
+
n.securitySchemes ?? {},
|
|
38
|
+
n.isReadOnly
|
|
39
|
+
)
|
|
38
40
|
), i = S(() => {
|
|
39
|
-
const e =
|
|
41
|
+
const e = n.selectedSecurity?.selectedSchemes;
|
|
40
42
|
return e?.length ? e.flatMap((t) => {
|
|
41
43
|
const s = Object.keys(t);
|
|
42
44
|
if (s.length === 0)
|
|
43
45
|
return [];
|
|
44
46
|
if (s.length > 1)
|
|
45
|
-
return
|
|
47
|
+
return K(t);
|
|
46
48
|
const l = s[0];
|
|
47
49
|
if (!l)
|
|
48
50
|
return [];
|
|
49
|
-
const
|
|
50
|
-
return
|
|
51
|
+
const y = P(n.securitySchemes?.[l]);
|
|
52
|
+
return y ? Q({
|
|
51
53
|
name: l,
|
|
52
|
-
type:
|
|
54
|
+
type: y.type,
|
|
53
55
|
value: t
|
|
54
56
|
}) : [];
|
|
55
57
|
}) : [];
|
|
56
58
|
}), w = (e) => {
|
|
57
59
|
B.value && e.stopPropagation(), O.value?.$el.click();
|
|
58
|
-
},
|
|
60
|
+
}, A = (e) => {
|
|
59
61
|
const t = e.filter((l) => l.payload === void 0).map((l) => l.value), s = e.filter((l) => l.payload !== void 0).map((l) => ({
|
|
60
62
|
name: l.label,
|
|
61
63
|
scheme: l.payload
|
|
62
64
|
}));
|
|
63
|
-
|
|
65
|
+
n.eventBus.emit("auth:update:selected-security-schemes", {
|
|
64
66
|
selectedRequirements: t,
|
|
65
67
|
newSchemes: s,
|
|
66
|
-
meta:
|
|
68
|
+
meta: n.meta
|
|
67
69
|
});
|
|
68
70
|
}, D = (e) => {
|
|
69
71
|
o.value = { label: e.label, payload: e.value }, d.show();
|
|
70
|
-
},
|
|
71
|
-
o.value && (
|
|
72
|
+
}, V = () => {
|
|
73
|
+
o.value && (n.eventBus.emit("auth:delete:security-scheme", {
|
|
72
74
|
names: Object.keys(o.value.payload)
|
|
73
75
|
}), o.value = null, d.hide());
|
|
74
76
|
};
|
|
75
77
|
return I({
|
|
76
|
-
authIndicator:
|
|
78
|
+
authIndicator: p,
|
|
77
79
|
selectedSchemeOptions: i,
|
|
78
80
|
schemeOptions: R
|
|
79
|
-
}), (e, t) => (r(), b(
|
|
81
|
+
}), (e, t) => (r(), b(a(X), {
|
|
80
82
|
class: "group/params relative",
|
|
81
83
|
isStatic: e.isStatic,
|
|
82
84
|
itemCount: i.value.length,
|
|
@@ -84,20 +86,20 @@ const X = ["id"], Y = { class: "min-w-0 flex-1 truncate" }, oe = /* @__PURE__ */
|
|
|
84
86
|
}, {
|
|
85
87
|
title: c(() => [
|
|
86
88
|
u("div", {
|
|
87
|
-
id:
|
|
89
|
+
id: a(C),
|
|
88
90
|
class: "inline-flex items-center gap-0.5 leading-[20px]"
|
|
89
91
|
}, [
|
|
90
|
-
u("span", null,
|
|
91
|
-
|
|
92
|
+
u("span", null, v(e.title), 1),
|
|
93
|
+
p.value ? (r(), h("span", {
|
|
92
94
|
key: 0,
|
|
93
|
-
class:
|
|
95
|
+
class: M(["text-c-3 hover:bg-b-3 hover:text-c-1 -mr-1 cursor-pointer rounded px-1 py-0.5 text-xs leading-[normal]", { "text-c-1": p.value.text === "Required" }]),
|
|
94
96
|
"data-testid": "auth-indicator",
|
|
95
97
|
onClick: w
|
|
96
|
-
},
|
|
97
|
-
], 8,
|
|
98
|
+
}, v(p.value.text), 3)) : x("", !0)
|
|
99
|
+
], 8, Y)
|
|
98
100
|
]),
|
|
99
101
|
actions: c(() => [
|
|
100
|
-
m(
|
|
102
|
+
m(a(T), {
|
|
101
103
|
class: "w-72 text-xs",
|
|
102
104
|
modelValue: i.value,
|
|
103
105
|
multiple: "",
|
|
@@ -105,43 +107,43 @@ const X = ["id"], Y = { class: "min-w-0 flex-1 truncate" }, oe = /* @__PURE__ */
|
|
|
105
107
|
placement: "bottom-end",
|
|
106
108
|
teleport: "",
|
|
107
109
|
onDelete: D,
|
|
108
|
-
"onUpdate:modelValue":
|
|
110
|
+
"onUpdate:modelValue": A
|
|
109
111
|
}, {
|
|
110
112
|
option: c(({ option: s, selected: l }) => [
|
|
111
|
-
m(
|
|
113
|
+
m(a(j), {
|
|
112
114
|
multiselect: "",
|
|
113
115
|
selected: l
|
|
114
116
|
}, null, 8, ["selected"]),
|
|
115
|
-
u("div",
|
|
116
|
-
s.isDeletable ?? !e.isReadOnly ? (r(), b(
|
|
117
|
+
u("div", Z, v(s.label), 1),
|
|
118
|
+
s.isDeletable ?? !e.isReadOnly ? (r(), b(a(E), {
|
|
117
119
|
key: 0,
|
|
118
120
|
class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
|
|
119
|
-
icon:
|
|
121
|
+
icon: a(F),
|
|
120
122
|
label: `Delete ${s.label}`,
|
|
121
123
|
size: "xs",
|
|
122
|
-
onClick:
|
|
124
|
+
onClick: q((y) => D(s), ["stop"])
|
|
123
125
|
}, null, 8, ["icon", "label", "onClick"])) : x("", !0)
|
|
124
126
|
]),
|
|
125
127
|
default: c(() => [
|
|
126
|
-
m(
|
|
128
|
+
m(a(z), {
|
|
127
129
|
ref_key: "comboboxButtonRef",
|
|
128
130
|
ref: O,
|
|
129
|
-
"aria-describedby":
|
|
131
|
+
"aria-describedby": a(C),
|
|
130
132
|
class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal",
|
|
131
133
|
variant: "ghost"
|
|
132
134
|
}, {
|
|
133
135
|
default: c(() => [
|
|
134
|
-
i.value.length === 1 ? (r(),
|
|
136
|
+
i.value.length === 1 ? (r(), h(g, { key: 0 }, [
|
|
135
137
|
t[2] || (t[2] = u("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
|
|
136
|
-
k(" " +
|
|
137
|
-
], 64)) : i.value.length > 1 ? (r(),
|
|
138
|
+
k(" " + v(i.value[0]?.label), 1)
|
|
139
|
+
], 64)) : i.value.length > 1 ? (r(), h(g, { key: 1 }, [
|
|
138
140
|
t[3] || (t[3] = k(" Multiple ", -1)),
|
|
139
141
|
t[4] || (t[4] = u("span", { class: "sr-only" }, "Auth Types Selected", -1))
|
|
140
|
-
], 64)) : (r(),
|
|
142
|
+
], 64)) : (r(), h(g, { key: 2 }, [
|
|
141
143
|
t[5] || (t[5] = u("span", { class: "sr-only" }, "Select", -1)),
|
|
142
144
|
t[6] || (t[6] = k(" Auth Type ", -1))
|
|
143
145
|
], 64)),
|
|
144
|
-
m(
|
|
146
|
+
m(a(L), {
|
|
145
147
|
class: "size-3 shrink-0 transition-transform duration-100 group-aria-expanded/combobox-button:rotate-180",
|
|
146
148
|
weight: "bold"
|
|
147
149
|
})
|
|
@@ -153,23 +155,24 @@ const X = ["id"], Y = { class: "min-w-0 flex-1 truncate" }, oe = /* @__PURE__ */
|
|
|
153
155
|
}, 8, ["modelValue", "options"])
|
|
154
156
|
]),
|
|
155
157
|
default: c(() => [
|
|
156
|
-
m(
|
|
158
|
+
m(W, {
|
|
157
159
|
activeAuthIndex: e.selectedSecurity?.selectedIndex ?? 0,
|
|
158
160
|
environment: e.environment,
|
|
159
161
|
eventBus: e.eventBus,
|
|
160
162
|
isStatic: e.isStatic,
|
|
161
163
|
meta: e.meta,
|
|
164
|
+
proxyUrl: e.proxyUrl,
|
|
162
165
|
securitySchemes: e.securitySchemes,
|
|
163
166
|
selectedSchemeOptions: i.value,
|
|
164
167
|
server: e.server
|
|
165
|
-
}, null, 8, ["activeAuthIndex", "environment", "eventBus", "isStatic", "meta", "securitySchemes", "selectedSchemeOptions", "server"]),
|
|
168
|
+
}, null, 8, ["activeAuthIndex", "environment", "eventBus", "isStatic", "meta", "proxyUrl", "securitySchemes", "selectedSchemeOptions", "server"]),
|
|
166
169
|
o.value ? (r(), b(G, {
|
|
167
170
|
key: 0,
|
|
168
171
|
label: o.value.label,
|
|
169
172
|
scheme: o.value,
|
|
170
|
-
state:
|
|
171
|
-
onClose: t[0] || (t[0] = (s) =>
|
|
172
|
-
onDelete:
|
|
173
|
+
state: a(d),
|
|
174
|
+
onClose: t[0] || (t[0] = (s) => a(d).hide()),
|
|
175
|
+
onDelete: V
|
|
173
176
|
}, null, 8, ["label", "scheme", "state"])) : x("", !0)
|
|
174
177
|
]),
|
|
175
178
|
_: 1
|
|
@@ -177,5 +180,5 @@ const X = ["id"], Y = { class: "min-w-0 flex-1 truncate" }, oe = /* @__PURE__ */
|
|
|
177
180
|
}
|
|
178
181
|
});
|
|
179
182
|
export {
|
|
180
|
-
|
|
183
|
+
re as default
|
|
181
184
|
};
|
|
@@ -5,7 +5,7 @@ type __VLS_Props = {
|
|
|
5
5
|
flows: OAuthFlowsObject;
|
|
6
6
|
type: keyof OAuthFlowsObject;
|
|
7
7
|
selectedScopes: string[];
|
|
8
|
-
server: ServerObject |
|
|
8
|
+
server: ServerObject | null;
|
|
9
9
|
proxyUrl: string;
|
|
10
10
|
};
|
|
11
11
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue"],"names":[],"mappings":"AA2PA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAEnH,OAAO,KAAK,EAEV,gBAAgB,EAChB,YAAY,EACb,MAAM,8DAA8D,CAAA;AASrE,KAAK,WAAW,GAAG;IACf,WAAW,EAAE,kBAAkB,CAAA;IAC/B,KAAK,EAAE,gBAAgB,CAAA;IACvB,IAAI,EAAE,MAAM,gBAAgB,CAAA;IAC5B,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,MAAM,EAAE,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"OAuth2.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue"],"names":[],"mappings":"AA2PA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAEnH,OAAO,KAAK,EAEV,gBAAgB,EAChB,YAAY,EACb,MAAM,8DAA8D,CAAA;AASrE,KAAK,WAAW,GAAG;IACf,WAAW,EAAE,kBAAkB,CAAA;IAC/B,KAAK,EAAE,gBAAgB,CAAA;IACvB,IAAI,EAAE,MAAM,gBAAgB,CAAA;IAC5B,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwhBJ,wBAOG"}
|
|
@@ -12,10 +12,12 @@ type __VLS_Props = {
|
|
|
12
12
|
selectedSchemeOptions: SecuritySchemeOption[];
|
|
13
13
|
/** Index of the currently active authentication tab */
|
|
14
14
|
activeAuthIndex: number;
|
|
15
|
+
/** Proxy URL */
|
|
16
|
+
proxyUrl: string;
|
|
15
17
|
/** OpenAPI security scheme definitions */
|
|
16
18
|
securitySchemes: ComponentsObject['securitySchemes'];
|
|
17
19
|
/** Current server configuration */
|
|
18
|
-
server: ServerObject |
|
|
20
|
+
server: ServerObject | null;
|
|
19
21
|
/** Event bus for authentication updates */
|
|
20
22
|
eventBus: WorkspaceEventBus;
|
|
21
23
|
/** Metadata for authentication context */
|
package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuthDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue"],"names":[],"mappings":"AAuJA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gEAAgE,CAAA;AAK1G,KAAK,WAAW,GAAG;IACjB,4CAA4C;IAC5C,WAAW,EAAE,kBAAkB,CAAA;IAC/B,mEAAmE;IACnE,QAAQ,EAAE,OAAO,CAAA;IACjB,8CAA8C;IAC9C,qBAAqB,EAAE,oBAAoB,EAAE,CAAA;IAC7C,uDAAuD;IACvD,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,0CAA0C;IAC1C,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IACpD,mCAAmC;IACnC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,2CAA2C;IAC3C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,0CAA0C;IAC1C,IAAI,EAAE,QAAQ,CAAA;CACf,CAAC;;;;AA0OF,wBAOG"}
|