@scalar/api-client 2.15.0 → 2.17.0
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 +150 -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 +2 -2
- package/dist/v2/features/app/components/AppSidebar.vue2.js +103 -80
- 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/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 +18 -18
- 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/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,4 +1,44 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as l, createElementBlock as r, openBlock as n, createElementVNode as e, createVNode as o, unref as s, toDisplayString as i, mergeProps as m } from "vue";
|
|
2
|
+
import { ScalarIconGlobe as p } from "@scalar/icons";
|
|
3
|
+
import { RouterView as d } from "vue-router";
|
|
4
|
+
import u from "./components/Tabs.vue.js";
|
|
5
|
+
const _ = { class: "custom-scroll h-full" }, f = { class: "w-full md:mx-auto md:max-w-[720px]" }, x = ["aria-label"], h = { class: "group relative ml-1.25" }, v = { class: "text-c-1 flex h-8 items-center" }, k = { class: "px-1.5 py-8" }, w = {}, B = /* @__PURE__ */ l({
|
|
6
|
+
...w,
|
|
7
|
+
__name: "WorkspaceCollection",
|
|
8
|
+
props: {
|
|
9
|
+
documentSlug: {},
|
|
10
|
+
document: {},
|
|
11
|
+
eventBus: {},
|
|
12
|
+
layout: {},
|
|
13
|
+
path: {},
|
|
14
|
+
method: {},
|
|
15
|
+
exampleName: {},
|
|
16
|
+
environment: {},
|
|
17
|
+
workspaceStore: {},
|
|
18
|
+
activeWorkspace: {},
|
|
19
|
+
plugins: {}
|
|
20
|
+
},
|
|
21
|
+
setup(a) {
|
|
22
|
+
const c = a;
|
|
23
|
+
return (t, g) => (n(), r("div", _, [
|
|
24
|
+
e("div", f, [
|
|
25
|
+
e("div", {
|
|
26
|
+
"aria-label": `title: ${t.activeWorkspace.name}`,
|
|
27
|
+
class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
|
|
28
|
+
}, [
|
|
29
|
+
o(s(p), { class: "text-c-2 size-6" }),
|
|
30
|
+
e("div", h, [
|
|
31
|
+
e("span", v, i(t.activeWorkspace.name), 1)
|
|
32
|
+
])
|
|
33
|
+
], 8, x),
|
|
34
|
+
o(u, { type: "workspace" }),
|
|
35
|
+
e("div", k, [
|
|
36
|
+
o(s(d), m(c, { collectionType: "workspace" }), null, 16)
|
|
37
|
+
])
|
|
38
|
+
])
|
|
39
|
+
]));
|
|
40
|
+
}
|
|
41
|
+
});
|
|
2
42
|
export {
|
|
3
|
-
|
|
43
|
+
B as default
|
|
4
44
|
};
|
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ScalarIconGlobe as p } from "@scalar/icons";
|
|
3
|
-
import { RouterView as d } from "vue-router";
|
|
4
|
-
import _ from "./components/Tabs.vue.js";
|
|
5
|
-
const u = { class: "custom-scroll h-full" }, f = { class: "w-full md:mx-auto md:max-w-[720px]" }, x = ["aria-label"], h = { class: "group relative ml-1.25" }, v = { class: "text-c-1 flex h-8 items-center" }, k = { class: "px-1.5 py-8" }, w = {}, B = /* @__PURE__ */ l({
|
|
6
|
-
...w,
|
|
7
|
-
__name: "WorkspaceCollection",
|
|
8
|
-
props: {
|
|
9
|
-
documentSlug: {},
|
|
10
|
-
document: {},
|
|
11
|
-
eventBus: {},
|
|
12
|
-
layout: {},
|
|
13
|
-
path: {},
|
|
14
|
-
method: {},
|
|
15
|
-
exampleName: {},
|
|
16
|
-
environment: {},
|
|
17
|
-
workspaceStore: {},
|
|
18
|
-
activeWorkspace: {}
|
|
19
|
-
},
|
|
20
|
-
setup(s) {
|
|
21
|
-
const c = s;
|
|
22
|
-
return (t, g) => (n(), r("div", u, [
|
|
23
|
-
e("div", f, [
|
|
24
|
-
e("div", {
|
|
25
|
-
"aria-label": `title: ${t.activeWorkspace.name}`,
|
|
26
|
-
class: "mx-auto flex h-fit w-full flex-col gap-2 pt-6 pb-3 md:mx-auto md:max-w-[720px]"
|
|
27
|
-
}, [
|
|
28
|
-
o(a(p), { class: "text-c-2 size-6" }),
|
|
29
|
-
e("div", h, [
|
|
30
|
-
e("span", v, m(t.activeWorkspace.name), 1)
|
|
31
|
-
])
|
|
32
|
-
], 8, x),
|
|
33
|
-
o(_, { type: "workspace" }),
|
|
34
|
-
e("div", k, [
|
|
35
|
-
o(a(d), i(c, { collectionType: "workspace" }), null, 16)
|
|
36
|
-
])
|
|
37
|
-
])
|
|
38
|
-
]));
|
|
39
|
-
}
|
|
40
|
-
});
|
|
1
|
+
import f from "./WorkspaceCollection.vue.js";
|
|
41
2
|
export {
|
|
42
|
-
|
|
3
|
+
f as default
|
|
43
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Authentication.vue"],"names":[],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Authentication.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/collection/components/Authentication.vue"],"names":[],"mappings":";;;;;;;;;;;;;AA8NA,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./Authentication.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ o(t, [["__scopeId", "data-v-e15e1c6f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as u, computed as l, createElementBlock as m, openBlock as d, createElementVNode as n, createVNode as
|
|
1
|
+
import { defineComponent as u, computed as l, createElementBlock as m, openBlock as d, createElementVNode as n, createVNode as r, unref as a, normalizeClass as i } from "vue";
|
|
2
2
|
import { ScalarToggle as p } from "@scalar/components";
|
|
3
3
|
import v from "../../../blocks/scalar-auth-selector-block/components/AuthSelector.vue.js";
|
|
4
|
-
const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }, h = { class: "flex h-8 items-center justify-between" },
|
|
4
|
+
const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }, h = { class: "flex h-8 items-center justify-between" }, b = /* @__PURE__ */ u({
|
|
5
5
|
__name: "Authentication",
|
|
6
6
|
props: {
|
|
7
7
|
documentSlug: {},
|
|
@@ -14,21 +14,22 @@ const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }
|
|
|
14
14
|
environment: {},
|
|
15
15
|
workspaceStore: {},
|
|
16
16
|
activeWorkspace: {},
|
|
17
|
+
plugins: {},
|
|
17
18
|
collectionType: {}
|
|
18
19
|
},
|
|
19
20
|
setup(o) {
|
|
20
21
|
const s = l(
|
|
21
22
|
() => o.document?.["x-scalar-set-operation-security"] ?? !1
|
|
22
|
-
),
|
|
23
|
+
), c = l(
|
|
23
24
|
() => o.document?.servers?.find(
|
|
24
25
|
({ url: e }) => e === o.document?.["x-scalar-selected-server"]
|
|
25
|
-
)
|
|
26
|
+
) ?? null
|
|
26
27
|
);
|
|
27
28
|
return (e, t) => (d(), m("div", y, [
|
|
28
29
|
n("div", f, [
|
|
29
30
|
n("div", h, [
|
|
30
31
|
t[1] || (t[1] = n("h3", { class: "font-bold" }, "Authentication", -1)),
|
|
31
|
-
|
|
32
|
+
r(a(p), {
|
|
32
33
|
class: "w-4",
|
|
33
34
|
modelValue: s.value,
|
|
34
35
|
"onUpdate:modelValue": t[0] || (t[0] = () => e.eventBus.emit("document:toggle:security"))
|
|
@@ -37,10 +38,10 @@ const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }
|
|
|
37
38
|
t[2] || (t[2] = n("p", { class: "pr-6 text-sm" }, " If enabled, all selected authentication will apply to all operations in this document. You can override this by disabling the toggle and authentication will then be applied at the operation level. ", -1))
|
|
38
39
|
]),
|
|
39
40
|
n("div", {
|
|
40
|
-
class:
|
|
41
|
+
class: i(!s.value && "cursor-not-allowed")
|
|
41
42
|
}, [
|
|
42
|
-
|
|
43
|
-
class:
|
|
43
|
+
r(a(v), {
|
|
44
|
+
class: i([
|
|
44
45
|
"scalar-collection-auth !border-none",
|
|
45
46
|
!s.value && "pointer-events-none opacity-50 mix-blend-luminosity"
|
|
46
47
|
]),
|
|
@@ -48,16 +49,17 @@ const y = { class: "flex flex-col gap-4" }, f = { class: "flex flex-col gap-2" }
|
|
|
48
49
|
eventBus: e.eventBus,
|
|
49
50
|
isStatic: "",
|
|
50
51
|
meta: { type: "document" },
|
|
51
|
-
|
|
52
|
+
proxyUrl: e.workspaceStore.workspace["x-scalar-active-proxy"] ?? "",
|
|
53
|
+
securityRequirements: e.document?.security ?? [],
|
|
52
54
|
securitySchemes: e.document?.components?.securitySchemes ?? {},
|
|
53
55
|
selectedSecurity: e.document?.["x-scalar-selected-security"],
|
|
54
|
-
server:
|
|
56
|
+
server: c.value,
|
|
55
57
|
title: "Authentication"
|
|
56
|
-
}, null, 8, ["class", "environment", "eventBus", "
|
|
58
|
+
}, null, 8, ["class", "environment", "eventBus", "proxyUrl", "securityRequirements", "securitySchemes", "selectedSecurity", "server"])
|
|
57
59
|
], 2)
|
|
58
60
|
]));
|
|
59
61
|
}
|
|
60
62
|
});
|
|
61
63
|
export {
|
|
62
|
-
|
|
64
|
+
b as default
|
|
63
65
|
};
|
|
@@ -1,4 +1,33 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as c, computed as n, createElementBlock as l, openBlock as a, createStaticVNode as i, createVNode as r, unref as u } from "vue";
|
|
2
|
+
import d from "../../global-cookies/components/CookiesTable.vue.js";
|
|
3
|
+
const p = { class: "flex flex-col gap-4" }, f = /* @__PURE__ */ c({
|
|
4
|
+
__name: "Cookies",
|
|
5
|
+
props: {
|
|
6
|
+
documentSlug: {},
|
|
7
|
+
document: {},
|
|
8
|
+
eventBus: {},
|
|
9
|
+
layout: {},
|
|
10
|
+
path: {},
|
|
11
|
+
method: {},
|
|
12
|
+
exampleName: {},
|
|
13
|
+
environment: {},
|
|
14
|
+
workspaceStore: {},
|
|
15
|
+
activeWorkspace: {},
|
|
16
|
+
plugins: {},
|
|
17
|
+
collectionType: {}
|
|
18
|
+
},
|
|
19
|
+
setup(e) {
|
|
20
|
+
const s = n(() => (e.collectionType === "document" ? e.document["x-scalar-cookies"] : e.workspaceStore.workspace["x-scalar-cookies"]) ?? []);
|
|
21
|
+
return (o, t) => (a(), l("div", p, [
|
|
22
|
+
t[0] || (t[0] = i('<div class="flex items-start justify-between gap-2"><div class="flex flex-col gap-2"><div class="flex h-8 items-center"><h3 class="font-bold">Cookies</h3></div><p class="text-c-2 mb-4 text-sm"> Manage your collection's cookies here.<br>Cookies allow you to store and send key-value data with your API requests—often used for things like session tokens, authentication, and saving user preferences.<br></p></div></div>', 1)),
|
|
23
|
+
r(u(d), {
|
|
24
|
+
cookies: s.value,
|
|
25
|
+
eventBus: o.eventBus,
|
|
26
|
+
collectionType: o.collectionType
|
|
27
|
+
}, null, 8, ["cookies", "eventBus", "collectionType"])
|
|
28
|
+
]));
|
|
29
|
+
}
|
|
30
|
+
});
|
|
2
31
|
export {
|
|
3
32
|
f as default
|
|
4
33
|
};
|
|
@@ -1,32 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import d from "../../global-cookies/components/CookiesTable.vue.js";
|
|
3
|
-
const p = { class: "flex flex-col gap-4" }, f = /* @__PURE__ */ c({
|
|
4
|
-
__name: "Cookies",
|
|
5
|
-
props: {
|
|
6
|
-
documentSlug: {},
|
|
7
|
-
document: {},
|
|
8
|
-
eventBus: {},
|
|
9
|
-
layout: {},
|
|
10
|
-
path: {},
|
|
11
|
-
method: {},
|
|
12
|
-
exampleName: {},
|
|
13
|
-
environment: {},
|
|
14
|
-
workspaceStore: {},
|
|
15
|
-
activeWorkspace: {},
|
|
16
|
-
collectionType: {}
|
|
17
|
-
},
|
|
18
|
-
setup(e) {
|
|
19
|
-
const s = n(() => (e.collectionType === "document" ? e.document["x-scalar-cookies"] : e.workspaceStore.workspace["x-scalar-cookies"]) ?? []);
|
|
20
|
-
return (o, t) => (a(), l("div", p, [
|
|
21
|
-
t[0] || (t[0] = i('<div class="flex items-start justify-between gap-2"><div class="flex flex-col gap-2"><div class="flex h-8 items-center"><h3 class="font-bold">Cookies</h3></div><p class="text-c-2 mb-4 text-sm"> Manage your collection's cookies here.<br>Cookies allow you to store and send key-value data with your API requests—often used for things like session tokens, authentication, and saving user preferences.<br></p></div></div>', 1)),
|
|
22
|
-
r(u(d), {
|
|
23
|
-
cookies: s.value,
|
|
24
|
-
eventBus: o.eventBus,
|
|
25
|
-
collectionType: o.collectionType
|
|
26
|
-
}, null, 8, ["cookies", "eventBus", "collectionType"])
|
|
27
|
-
]));
|
|
28
|
-
}
|
|
29
|
-
});
|
|
1
|
+
import f from "./Cookies.vue.js";
|
|
30
2
|
export {
|
|
31
3
|
f as default
|
|
32
4
|
};
|
|
@@ -1,4 +1,35 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as s, computed as c, createElementBlock as l, openBlock as a, createStaticVNode as i, createVNode as r, unref as m } from "vue";
|
|
2
|
+
import v from "../../environments/EnvironmentsList.vue.js";
|
|
3
|
+
const d = { class: "flex flex-col gap-4" }, f = /* @__PURE__ */ s({
|
|
4
|
+
__name: "Environment",
|
|
5
|
+
props: {
|
|
6
|
+
documentSlug: {},
|
|
7
|
+
document: {},
|
|
8
|
+
eventBus: {},
|
|
9
|
+
layout: {},
|
|
10
|
+
path: {},
|
|
11
|
+
method: {},
|
|
12
|
+
exampleName: {},
|
|
13
|
+
environment: {},
|
|
14
|
+
workspaceStore: {},
|
|
15
|
+
activeWorkspace: {},
|
|
16
|
+
plugins: {},
|
|
17
|
+
collectionType: {}
|
|
18
|
+
},
|
|
19
|
+
setup(e) {
|
|
20
|
+
const o = c(
|
|
21
|
+
() => (e.collectionType === "document" ? e.document["x-scalar-environments"] : e.workspaceStore.workspace["x-scalar-environments"]) ?? {}
|
|
22
|
+
);
|
|
23
|
+
return (t, n) => (a(), l("div", d, [
|
|
24
|
+
n[0] || (n[0] = i('<div class="flex items-start justify-between gap-2"><div class="flex flex-col gap-2"><div class="flex h-8 items-center"><h3 class="font-bold">Environment Variables</h3></div><p class="text-c-2 mb-4 text-sm"> Set environment variables at your collection level. Use <code class="font-code text-c-2"> {{ variable }} </code> to add / search among the selected environment's variables in your request inputs. </p></div></div>', 1)),
|
|
25
|
+
r(m(v), {
|
|
26
|
+
collectionType: t.collectionType,
|
|
27
|
+
environments: o.value,
|
|
28
|
+
eventBus: t.eventBus
|
|
29
|
+
}, null, 8, ["collectionType", "environments", "eventBus"])
|
|
30
|
+
]));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
2
33
|
export {
|
|
3
34
|
f as default
|
|
4
35
|
};
|
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import v from "../../environments/EnvironmentsList.vue.js";
|
|
3
|
-
const d = { class: "flex flex-col gap-4" }, f = /* @__PURE__ */ s({
|
|
4
|
-
__name: "Environment",
|
|
5
|
-
props: {
|
|
6
|
-
documentSlug: {},
|
|
7
|
-
document: {},
|
|
8
|
-
eventBus: {},
|
|
9
|
-
layout: {},
|
|
10
|
-
path: {},
|
|
11
|
-
method: {},
|
|
12
|
-
exampleName: {},
|
|
13
|
-
environment: {},
|
|
14
|
-
workspaceStore: {},
|
|
15
|
-
activeWorkspace: {},
|
|
16
|
-
collectionType: {}
|
|
17
|
-
},
|
|
18
|
-
setup(e) {
|
|
19
|
-
const o = c(
|
|
20
|
-
() => (e.collectionType === "document" ? e.document["x-scalar-environments"] : e.workspaceStore.workspace["x-scalar-environments"]) ?? {}
|
|
21
|
-
);
|
|
22
|
-
return (t, n) => (a(), l("div", d, [
|
|
23
|
-
n[0] || (n[0] = i('<div class="flex items-start justify-between gap-2"><div class="flex flex-col gap-2"><div class="flex h-8 items-center"><h3 class="font-bold">Environment Variables</h3></div><p class="text-c-2 mb-4 text-sm"> Set environment variables at your collection level. Use <code class="font-code text-c-2"> {{ variable }} </code> to add / search among the selected environment's variables in your request inputs. </p></div></div>', 1)),
|
|
24
|
-
r(m(v), {
|
|
25
|
-
collectionType: t.collectionType,
|
|
26
|
-
environments: o.value,
|
|
27
|
-
eventBus: t.eventBus
|
|
28
|
-
}, null, 8, ["collectionType", "environments", "eventBus"])
|
|
29
|
-
]));
|
|
30
|
-
}
|
|
31
|
-
});
|
|
1
|
+
import f from "./Environment.vue.js";
|
|
32
2
|
export {
|
|
33
3
|
f as default
|
|
34
4
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as k, computed as x, ref as y, useTemplateRef as w, createElementBlock as i, openBlock as t, createElementVNode as o, createBlock as c, createCommentVNode as h, unref as n, withCtx as m, createVNode as d, Fragment as v, nextTick as B } from "vue";
|
|
2
2
|
import { ScalarButton as f, ScalarMarkdown as C } from "@scalar/components";
|
|
3
3
|
import { ScalarIconPencil as b } from "@scalar/icons";
|
|
4
4
|
import I from "../../../components/code-input/CodeInput.vue.js";
|
|
5
5
|
const V = { class: "flex flex-col gap-2" }, z = { class: "flex items-center justify-between gap-2 pl-1.5" }, S = { class: "has-[:focus-visible]:bg-b-1 group rounded-lg" }, N = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "text-c-3 flex items-center justify-center rounded-lg border p-4"
|
|
8
|
-
}, j = /* @__PURE__ */
|
|
8
|
+
}, j = /* @__PURE__ */ k({
|
|
9
9
|
__name: "Overview",
|
|
10
10
|
props: {
|
|
11
11
|
documentSlug: {},
|
|
@@ -18,11 +18,12 @@ const V = { class: "flex flex-col gap-2" }, z = { class: "flex items-center just
|
|
|
18
18
|
environment: {},
|
|
19
19
|
workspaceStore: {},
|
|
20
20
|
activeWorkspace: {},
|
|
21
|
+
plugins: {},
|
|
21
22
|
collectionType: {}
|
|
22
23
|
},
|
|
23
|
-
setup(
|
|
24
|
+
setup(g) {
|
|
24
25
|
const u = x(
|
|
25
|
-
() =>
|
|
26
|
+
() => g.document?.info?.description ?? ""
|
|
26
27
|
), a = y("preview"), p = w("codeInputRef"), r = async (s) => {
|
|
27
28
|
a.value = s, s === "edit" && (await B(), p.value?.focus());
|
|
28
29
|
};
|
|
@@ -1,4 +1,144 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as M, ref as A, computed as x, createElementBlock as u, openBlock as c, Fragment as S, createElementVNode as s, createVNode as l, createTextVNode as g, renderList as I, createBlock as y, unref as r, toDisplayString as T, withCtx as f, createCommentVNode as V } from "vue";
|
|
2
|
+
import { useModal as P, ScalarMarkdown as z, ScalarButton as k, ScalarModal as L } from "@scalar/components";
|
|
3
|
+
import { debounce as O } from "@scalar/helpers/general/debounce";
|
|
4
|
+
import { ScalarIconTrash as R, ScalarIconPlus as j } from "@scalar/icons";
|
|
5
|
+
import E from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
6
|
+
import F from "./Form.vue.js";
|
|
7
|
+
import W from "../../../../components/Server/ServerVariablesForm.vue.js";
|
|
8
|
+
const Y = { class: "flex flex-col gap-4" }, q = { class: "flex flex-col gap-4" }, G = { class: "bg-b-2 flex items-center justify-between rounded-t-lg px-3 py-1 text-sm" }, H = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "self-center"
|
|
11
|
+
}, J = { class: "divide-0 flex w-full flex-col divide-y rounded-b-lg text-sm" }, K = { class: "text-c-3 flex h-full items-center justify-center rounded-lg border p-4" }, re = /* @__PURE__ */ M({
|
|
12
|
+
__name: "Servers",
|
|
13
|
+
props: {
|
|
14
|
+
documentSlug: {},
|
|
15
|
+
document: {},
|
|
16
|
+
eventBus: {},
|
|
17
|
+
layout: {},
|
|
18
|
+
path: {},
|
|
19
|
+
method: {},
|
|
20
|
+
exampleName: {},
|
|
21
|
+
environment: {},
|
|
22
|
+
workspaceStore: {},
|
|
23
|
+
activeWorkspace: {},
|
|
24
|
+
plugins: {},
|
|
25
|
+
collectionType: {}
|
|
26
|
+
},
|
|
27
|
+
setup(o) {
|
|
28
|
+
const v = P(), n = A(-1), _ = x(
|
|
29
|
+
() => o.document?.servers?.[n.value]
|
|
30
|
+
), $ = x(() => o.document?.servers ?? []), B = [
|
|
31
|
+
{
|
|
32
|
+
label: "URL",
|
|
33
|
+
key: "url",
|
|
34
|
+
placeholder: "https://void.scalar.com"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: "Description",
|
|
38
|
+
key: "description",
|
|
39
|
+
placeholder: "Production"
|
|
40
|
+
}
|
|
41
|
+
], w = (t) => {
|
|
42
|
+
n.value = t, v.show();
|
|
43
|
+
}, p = () => {
|
|
44
|
+
v.hide(), n.value = -1;
|
|
45
|
+
}, N = () => {
|
|
46
|
+
n.value < 0 || (o.eventBus.emit("server:delete:server", { index: n.value }), p());
|
|
47
|
+
}, { execute: b } = O({ delay: 328, maxWait: 1e3 }), U = (t, e, a) => b(
|
|
48
|
+
`${t}-${e}`,
|
|
49
|
+
() => o.eventBus.emit("server:update:server", {
|
|
50
|
+
index: t,
|
|
51
|
+
server: { [e]: a }
|
|
52
|
+
})
|
|
53
|
+
), C = (t, e, a) => b(
|
|
54
|
+
`${t}-${e}`,
|
|
55
|
+
() => o.eventBus.emit("server:update:variables", {
|
|
56
|
+
index: t,
|
|
57
|
+
key: e,
|
|
58
|
+
value: a
|
|
59
|
+
})
|
|
60
|
+
), D = () => o.eventBus.emit("server:add:server"), h = (t, e = 0) => t?.description || `Server ${e + 1}`;
|
|
61
|
+
return (t, e) => (c(), u(S, null, [
|
|
62
|
+
s("div", Y, [
|
|
63
|
+
e[1] || (e[1] = s("div", { class: "flex flex-col gap-2" }, [
|
|
64
|
+
s("h3", { class: "font-bold" }, "Servers"),
|
|
65
|
+
s("p", { class: "text-sm" }, [
|
|
66
|
+
g(" Add different base URLs for your API. You can use "),
|
|
67
|
+
s("code", { class: "font-code text-c-2" }, "{variables}"),
|
|
68
|
+
g(" for dynamic parts. ")
|
|
69
|
+
])
|
|
70
|
+
], -1)),
|
|
71
|
+
s("div", q, [
|
|
72
|
+
(c(!0), u(S, null, I($.value, (a, d) => (c(), u("div", {
|
|
73
|
+
key: d,
|
|
74
|
+
class: "rounded-lg border"
|
|
75
|
+
}, [
|
|
76
|
+
s("div", G, [
|
|
77
|
+
a.description ? (c(), y(r(z), {
|
|
78
|
+
key: 0,
|
|
79
|
+
class: "self-center",
|
|
80
|
+
value: a.description
|
|
81
|
+
}, null, 8, ["value"])) : (c(), u("span", H, T(h(a, d)), 1)),
|
|
82
|
+
l(r(k), {
|
|
83
|
+
class: "hover:bg-b-3 hover:text-c-1 h-fit p-1.25",
|
|
84
|
+
"data-testid": "delete-server-button",
|
|
85
|
+
variant: "ghost",
|
|
86
|
+
onClick: (i) => w(d)
|
|
87
|
+
}, {
|
|
88
|
+
default: f(() => [
|
|
89
|
+
l(r(R), { class: "size-3.5" })
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
}, 8, ["onClick"])
|
|
93
|
+
]),
|
|
94
|
+
s("div", J, [
|
|
95
|
+
l(F, {
|
|
96
|
+
data: a,
|
|
97
|
+
environment: t.environment,
|
|
98
|
+
onUpdate: (i, m) => U(d, i, m),
|
|
99
|
+
options: B
|
|
100
|
+
}, null, 8, ["data", "environment", "onUpdate"]),
|
|
101
|
+
a.variables ? (c(), y(r(W), {
|
|
102
|
+
key: 0,
|
|
103
|
+
variables: a.variables,
|
|
104
|
+
"onUpdate:variable": (i, m) => C(d, i, m)
|
|
105
|
+
}, null, 8, ["variables", "onUpdate:variable"])) : V("", !0)
|
|
106
|
+
])
|
|
107
|
+
]))), 128))
|
|
108
|
+
]),
|
|
109
|
+
s("div", K, [
|
|
110
|
+
l(r(k), {
|
|
111
|
+
class: "hover:bg-b-2 hover:text-c-1 flex items-center gap-2",
|
|
112
|
+
size: "sm",
|
|
113
|
+
variant: "ghost",
|
|
114
|
+
onClick: D
|
|
115
|
+
}, {
|
|
116
|
+
default: f(() => [
|
|
117
|
+
l(r(j)),
|
|
118
|
+
e[0] || (e[0] = s("span", null, "Add Server", -1))
|
|
119
|
+
]),
|
|
120
|
+
_: 1
|
|
121
|
+
})
|
|
122
|
+
])
|
|
123
|
+
]),
|
|
124
|
+
l(r(L), {
|
|
125
|
+
size: "xxs",
|
|
126
|
+
state: r(v),
|
|
127
|
+
title: `Delete ${h(_.value, n.value)}`
|
|
128
|
+
}, {
|
|
129
|
+
default: f(() => [
|
|
130
|
+
l(E, {
|
|
131
|
+
variableName: "Server",
|
|
132
|
+
warningMessage: "Are you sure you want to delete this server? This action cannot be undone.",
|
|
133
|
+
onClose: p,
|
|
134
|
+
onDelete: N
|
|
135
|
+
})
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
}, 8, ["state", "title"])
|
|
139
|
+
], 64));
|
|
140
|
+
}
|
|
141
|
+
});
|
|
2
142
|
export {
|
|
3
|
-
|
|
143
|
+
re as default
|
|
4
144
|
};
|
|
@@ -1,143 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useModal as P, ScalarMarkdown as z, ScalarButton as k, ScalarModal as L } from "@scalar/components";
|
|
3
|
-
import { debounce as O } from "@scalar/helpers/general/debounce";
|
|
4
|
-
import { ScalarIconTrash as R, ScalarIconPlus as j } from "@scalar/icons";
|
|
5
|
-
import E from "../../../../components/Sidebar/Actions/DeleteSidebarListElement.vue.js";
|
|
6
|
-
import F from "./Form.vue.js";
|
|
7
|
-
import W from "../../../../components/Server/ServerVariablesForm.vue.js";
|
|
8
|
-
const Y = { class: "flex flex-col gap-4" }, q = { class: "flex flex-col gap-4" }, G = { class: "bg-b-2 flex items-center justify-between rounded-t-lg px-3 py-1 text-sm" }, H = {
|
|
9
|
-
key: 1,
|
|
10
|
-
class: "self-center"
|
|
11
|
-
}, J = { class: "divide-0 flex w-full flex-col divide-y rounded-b-lg text-sm" }, K = { class: "text-c-3 flex h-full items-center justify-center rounded-lg border p-4" }, se = /* @__PURE__ */ M({
|
|
12
|
-
__name: "Servers",
|
|
13
|
-
props: {
|
|
14
|
-
documentSlug: {},
|
|
15
|
-
document: {},
|
|
16
|
-
eventBus: {},
|
|
17
|
-
layout: {},
|
|
18
|
-
path: {},
|
|
19
|
-
method: {},
|
|
20
|
-
exampleName: {},
|
|
21
|
-
environment: {},
|
|
22
|
-
workspaceStore: {},
|
|
23
|
-
activeWorkspace: {},
|
|
24
|
-
collectionType: {}
|
|
25
|
-
},
|
|
26
|
-
setup(l) {
|
|
27
|
-
const v = P(), n = A(-1), _ = x(
|
|
28
|
-
() => l.document?.servers?.[n.value]
|
|
29
|
-
), $ = x(() => l.document?.servers ?? []), B = [
|
|
30
|
-
{
|
|
31
|
-
label: "URL",
|
|
32
|
-
key: "url",
|
|
33
|
-
placeholder: "https://void.scalar.com"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: "Description",
|
|
37
|
-
key: "description",
|
|
38
|
-
placeholder: "Production"
|
|
39
|
-
}
|
|
40
|
-
], w = (t) => {
|
|
41
|
-
n.value = t, v.show();
|
|
42
|
-
}, p = () => {
|
|
43
|
-
v.hide(), n.value = -1;
|
|
44
|
-
}, N = () => {
|
|
45
|
-
n.value < 0 || (l.eventBus.emit("server:delete:server", { index: n.value }), p());
|
|
46
|
-
}, { execute: b } = O({ delay: 328, maxWait: 1e3 }), U = (t, e, a) => b(
|
|
47
|
-
`${t}-${e}`,
|
|
48
|
-
() => l.eventBus.emit("server:update:server", {
|
|
49
|
-
index: t,
|
|
50
|
-
server: { [e]: a }
|
|
51
|
-
})
|
|
52
|
-
), C = (t, e, a) => b(
|
|
53
|
-
`${t}-${e}`,
|
|
54
|
-
() => l.eventBus.emit("server:update:variables", {
|
|
55
|
-
index: t,
|
|
56
|
-
key: e,
|
|
57
|
-
value: a
|
|
58
|
-
})
|
|
59
|
-
), D = () => l.eventBus.emit("server:add:server"), h = (t, e = 0) => t?.description || `Server ${e + 1}`;
|
|
60
|
-
return (t, e) => (c(), u(S, null, [
|
|
61
|
-
r("div", Y, [
|
|
62
|
-
e[1] || (e[1] = r("div", { class: "flex flex-col gap-2" }, [
|
|
63
|
-
r("h3", { class: "font-bold" }, "Servers"),
|
|
64
|
-
r("p", { class: "text-sm" }, [
|
|
65
|
-
g(" Add different base URLs for your API. You can use "),
|
|
66
|
-
r("code", { class: "font-code text-c-2" }, "{variables}"),
|
|
67
|
-
g(" for dynamic parts. ")
|
|
68
|
-
])
|
|
69
|
-
], -1)),
|
|
70
|
-
r("div", q, [
|
|
71
|
-
(c(!0), u(S, null, I($.value, (a, d) => (c(), u("div", {
|
|
72
|
-
key: d,
|
|
73
|
-
class: "rounded-lg border"
|
|
74
|
-
}, [
|
|
75
|
-
r("div", G, [
|
|
76
|
-
a.description ? (c(), y(s(z), {
|
|
77
|
-
key: 0,
|
|
78
|
-
class: "self-center",
|
|
79
|
-
value: a.description
|
|
80
|
-
}, null, 8, ["value"])) : (c(), u("span", H, T(h(a, d)), 1)),
|
|
81
|
-
o(s(k), {
|
|
82
|
-
class: "hover:bg-b-3 hover:text-c-1 h-fit p-1.25",
|
|
83
|
-
"data-testid": "delete-server-button",
|
|
84
|
-
variant: "ghost",
|
|
85
|
-
onClick: (i) => w(d)
|
|
86
|
-
}, {
|
|
87
|
-
default: f(() => [
|
|
88
|
-
o(s(R), { class: "size-3.5" })
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
}, 8, ["onClick"])
|
|
92
|
-
]),
|
|
93
|
-
r("div", J, [
|
|
94
|
-
o(F, {
|
|
95
|
-
data: a,
|
|
96
|
-
environment: t.environment,
|
|
97
|
-
onUpdate: (i, m) => U(d, i, m),
|
|
98
|
-
options: B
|
|
99
|
-
}, null, 8, ["data", "environment", "onUpdate"]),
|
|
100
|
-
a.variables ? (c(), y(s(W), {
|
|
101
|
-
key: 0,
|
|
102
|
-
variables: a.variables,
|
|
103
|
-
"onUpdate:variable": (i, m) => C(d, i, m)
|
|
104
|
-
}, null, 8, ["variables", "onUpdate:variable"])) : V("", !0)
|
|
105
|
-
])
|
|
106
|
-
]))), 128))
|
|
107
|
-
]),
|
|
108
|
-
r("div", K, [
|
|
109
|
-
o(s(k), {
|
|
110
|
-
class: "hover:bg-b-2 hover:text-c-1 flex items-center gap-2",
|
|
111
|
-
size: "sm",
|
|
112
|
-
variant: "ghost",
|
|
113
|
-
onClick: D
|
|
114
|
-
}, {
|
|
115
|
-
default: f(() => [
|
|
116
|
-
o(s(j)),
|
|
117
|
-
e[0] || (e[0] = r("span", null, "Add Server", -1))
|
|
118
|
-
]),
|
|
119
|
-
_: 1
|
|
120
|
-
})
|
|
121
|
-
])
|
|
122
|
-
]),
|
|
123
|
-
o(s(L), {
|
|
124
|
-
size: "xxs",
|
|
125
|
-
state: s(v),
|
|
126
|
-
title: `Delete ${h(_.value, n.value)}`
|
|
127
|
-
}, {
|
|
128
|
-
default: f(() => [
|
|
129
|
-
o(E, {
|
|
130
|
-
variableName: "Server",
|
|
131
|
-
warningMessage: "Are you sure you want to delete this server? This action cannot be undone.",
|
|
132
|
-
onClose: p,
|
|
133
|
-
onDelete: N
|
|
134
|
-
})
|
|
135
|
-
]),
|
|
136
|
-
_: 1
|
|
137
|
-
}, 8, ["state", "title"])
|
|
138
|
-
], 64));
|
|
139
|
-
}
|
|
140
|
-
});
|
|
1
|
+
import f from "./Servers.vue.js";
|
|
141
2
|
export {
|
|
142
|
-
|
|
3
|
+
f as default
|
|
143
4
|
};
|