@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,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as
|
|
1
|
+
import { defineComponent as q, computed as s, watch as D, createBlock as v, openBlock as d, unref as l, withCtx as u, createVNode as p, createElementVNode as f, toDisplayString as c, createElementBlock as w, Fragment as O, createTextVNode as g } from "vue";
|
|
2
|
+
import { ScalarListbox as S, ScalarButton as x, ScalarIcon as k } from "@scalar/components";
|
|
3
3
|
import { unpackProxyObject as B } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
4
4
|
import F from "./RequestTable.vue.js";
|
|
5
5
|
import { getFileName as N } from "../helpers/files.js";
|
|
6
|
-
import { getExampleFromBody as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
6
|
+
import { getExampleFromBody as A } from "../helpers/get-request-body-example.js";
|
|
7
|
+
import E from "../../../components/layout/CollapsibleSection.vue.js";
|
|
8
|
+
import L from "../../../components/data-table/DataTable.vue.js";
|
|
9
|
+
import M from "../../../components/data-table/DataTableHeader.vue.js";
|
|
10
|
+
import z from "../../../components/data-table/DataTableRow.vue.js";
|
|
11
|
+
import K from "../../../components/code-input/CodeInput.vue.js";
|
|
12
12
|
import { useFileDialog as $ } from "../../../../hooks/useFileDialog.js";
|
|
13
|
-
const
|
|
13
|
+
const I = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "text-c-3 flex min-h-10 w-full items-center justify-center border-t p-2 text-sm"
|
|
16
|
-
},
|
|
16
|
+
}, J = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "flex items-center justify-center overflow-hidden border-t p-1.5"
|
|
19
|
-
},
|
|
19
|
+
}, P = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, ne = /* @__PURE__ */ q({
|
|
20
20
|
__name: "RequestBody",
|
|
21
21
|
props: {
|
|
22
22
|
requestBody: {},
|
|
@@ -25,7 +25,7 @@ const K = {
|
|
|
25
25
|
environment: {}
|
|
26
26
|
},
|
|
27
27
|
emits: ["update:contentType", "update:value", "add:formRow", "update:formRow", "delete:fromRow"],
|
|
28
|
-
setup(
|
|
28
|
+
setup(i, { emit: U }) {
|
|
29
29
|
const a = U, V = {
|
|
30
30
|
"application/json": "json",
|
|
31
31
|
"application/xml": "xml",
|
|
@@ -40,64 +40,73 @@ const K = {
|
|
|
40
40
|
"application/edn": "EDN",
|
|
41
41
|
other: "Other",
|
|
42
42
|
none: "None"
|
|
43
|
-
}, o =
|
|
44
|
-
|
|
43
|
+
}, o = s(
|
|
44
|
+
() => i.requestBody?.["x-scalar-selected-content-type"]?.[i.exampleKey] ?? Object.keys(i.requestBody?.content ?? {})[0] ?? "other"
|
|
45
|
+
);
|
|
46
|
+
D(
|
|
47
|
+
() => i.requestBody?.["x-scalar-selected-content-type"]?.[i.exampleKey],
|
|
48
|
+
(n) => {
|
|
49
|
+
n || a("update:contentType", { value: o.value });
|
|
50
|
+
},
|
|
51
|
+
{ immediate: !0 }
|
|
52
|
+
);
|
|
53
|
+
const y = Object.entries(j).map(([n, e]) => ({
|
|
54
|
+
id: n,
|
|
45
55
|
label: e
|
|
46
|
-
})), b =
|
|
56
|
+
})), b = s({
|
|
47
57
|
get: () => y.find(
|
|
48
58
|
(e) => e.id === o.value
|
|
49
59
|
) ?? y.at(-1),
|
|
50
|
-
set: (
|
|
51
|
-
a("update:contentType", { value:
|
|
60
|
+
set: (n) => {
|
|
61
|
+
a("update:contentType", { value: n.id });
|
|
52
62
|
}
|
|
53
63
|
});
|
|
54
|
-
function R(
|
|
64
|
+
function R(n) {
|
|
55
65
|
const { open: e } = $({
|
|
56
66
|
onChange: (t) => {
|
|
57
67
|
const r = t?.[0];
|
|
58
|
-
r &&
|
|
68
|
+
r && n(r);
|
|
59
69
|
},
|
|
60
70
|
multiple: !1,
|
|
61
71
|
accept: "*/*"
|
|
62
72
|
});
|
|
63
73
|
e();
|
|
64
74
|
}
|
|
65
|
-
const
|
|
66
|
-
() =>
|
|
67
|
-
), C =
|
|
68
|
-
if (!
|
|
75
|
+
const m = s(
|
|
76
|
+
() => i.requestBody && A(i.requestBody, o.value, i.exampleKey)
|
|
77
|
+
), C = s(() => {
|
|
78
|
+
if (!m.value)
|
|
69
79
|
return "";
|
|
70
|
-
const
|
|
71
|
-
return typeof
|
|
72
|
-
}), T =
|
|
73
|
-
return (
|
|
80
|
+
const n = m.value.value;
|
|
81
|
+
return typeof n == "string" ? n : JSON.stringify(n, null, 2);
|
|
82
|
+
}), T = s(() => m.value ? Array.isArray(m.value.value) ? m.value.value : [] : []);
|
|
83
|
+
return (n, e) => (d(), v(l(E), null, {
|
|
74
84
|
title: u(() => [
|
|
75
|
-
g(c(
|
|
85
|
+
g(c(n.title), 1)
|
|
76
86
|
]),
|
|
77
87
|
default: u(() => [
|
|
78
|
-
|
|
79
|
-
class: "border-b",
|
|
88
|
+
p(l(L), {
|
|
80
89
|
columns: [""],
|
|
81
90
|
presentational: ""
|
|
82
91
|
}, {
|
|
83
92
|
default: u(() => [
|
|
84
|
-
|
|
93
|
+
p(l(M), { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between border-r-0 !p-0" }, {
|
|
85
94
|
default: u(() => [
|
|
86
|
-
|
|
95
|
+
p(l(S), {
|
|
87
96
|
modelValue: b.value,
|
|
88
97
|
"onUpdate:modelValue": e[0] || (e[0] = (t) => b.value = t),
|
|
89
|
-
options:
|
|
98
|
+
options: l(y),
|
|
90
99
|
teleport: ""
|
|
91
100
|
}, {
|
|
92
101
|
default: u(() => [
|
|
93
|
-
|
|
102
|
+
p(l(x), {
|
|
94
103
|
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-3 font-normal",
|
|
95
104
|
fullWidth: "",
|
|
96
105
|
variant: "ghost"
|
|
97
106
|
}, {
|
|
98
107
|
default: u(() => [
|
|
99
108
|
f("span", null, c(o.value), 1),
|
|
100
|
-
|
|
109
|
+
p(l(k), {
|
|
101
110
|
icon: "ChevronDown",
|
|
102
111
|
size: "md"
|
|
103
112
|
})
|
|
@@ -110,14 +119,14 @@ const K = {
|
|
|
110
119
|
]),
|
|
111
120
|
_: 1
|
|
112
121
|
}),
|
|
113
|
-
|
|
122
|
+
p(l(z), null, {
|
|
114
123
|
default: u(() => [
|
|
115
|
-
o.value === "none" ? (
|
|
124
|
+
o.value === "none" ? (d(), w("div", I, [...e[12] || (e[12] = [
|
|
116
125
|
f("span", null, "No Body", -1)
|
|
117
|
-
])])) : o.value === "application/octet-stream" ? (
|
|
118
|
-
|
|
119
|
-
f("span",
|
|
120
|
-
|
|
126
|
+
])])) : o.value === "application/octet-stream" ? (d(), w("div", J, [
|
|
127
|
+
l(N)(l(B)(m.value?.value)) !== void 0 ? (d(), w(O, { key: 0 }, [
|
|
128
|
+
f("span", P, c(l(N)(l(B)(m.value?.value))), 1),
|
|
129
|
+
p(l(x), {
|
|
121
130
|
class: "bg-b-2 hover:bg-b-3 text-c-2 ml-1 border-0 shadow-none",
|
|
122
131
|
size: "sm",
|
|
123
132
|
variant: "outlined",
|
|
@@ -131,7 +140,7 @@ const K = {
|
|
|
131
140
|
])]),
|
|
132
141
|
_: 1
|
|
133
142
|
})
|
|
134
|
-
], 64)) : (
|
|
143
|
+
], 64)) : (d(), v(l(x), {
|
|
135
144
|
key: 1,
|
|
136
145
|
class: "bg-b-2 hover:bg-b-3 text-c-2 border-0 shadow-none",
|
|
137
146
|
size: "sm",
|
|
@@ -145,7 +154,7 @@ const K = {
|
|
|
145
154
|
}, {
|
|
146
155
|
default: u(() => [
|
|
147
156
|
e[14] || (e[14] = f("span", null, "Upload File", -1)),
|
|
148
|
-
|
|
157
|
+
p(l(k), {
|
|
149
158
|
class: "ml-1",
|
|
150
159
|
icon: "Upload",
|
|
151
160
|
size: "xs",
|
|
@@ -154,10 +163,10 @@ const K = {
|
|
|
154
163
|
]),
|
|
155
164
|
_: 1
|
|
156
165
|
}))
|
|
157
|
-
])) : o.value === "multipart/form-data" ? (
|
|
166
|
+
])) : o.value === "multipart/form-data" ? (d(), v(F, {
|
|
158
167
|
key: 2,
|
|
159
168
|
data: T.value,
|
|
160
|
-
environment:
|
|
169
|
+
environment: n.environment,
|
|
161
170
|
showUploadButton: "",
|
|
162
171
|
onAddRow: e[3] || (e[3] = (t) => a("add:formRow", {
|
|
163
172
|
data: t,
|
|
@@ -191,10 +200,10 @@ const K = {
|
|
|
191
200
|
contentType: o.value
|
|
192
201
|
});
|
|
193
202
|
}))
|
|
194
|
-
}, null, 8, ["data", "environment"])) : o.value === "application/x-www-form-urlencoded" ? (
|
|
203
|
+
}, null, 8, ["data", "environment"])) : o.value === "application/x-www-form-urlencoded" ? (d(), v(F, {
|
|
195
204
|
key: 3,
|
|
196
205
|
data: T.value,
|
|
197
|
-
environment:
|
|
206
|
+
environment: n.environment,
|
|
198
207
|
onAddRow: e[8] || (e[8] = (t) => a("add:formRow", {
|
|
199
208
|
data: t,
|
|
200
209
|
contentType: o.value
|
|
@@ -208,11 +217,11 @@ const K = {
|
|
|
208
217
|
data: r,
|
|
209
218
|
contentType: o.value
|
|
210
219
|
}))
|
|
211
|
-
}, null, 8, ["data", "environment"])) : (
|
|
220
|
+
}, null, 8, ["data", "environment"])) : (d(), v(l(K), {
|
|
212
221
|
key: 4,
|
|
213
222
|
class: "border-t px-3",
|
|
214
223
|
content: "",
|
|
215
|
-
environment:
|
|
224
|
+
environment: n.environment,
|
|
216
225
|
language: V[o.value] ?? "plaintext",
|
|
217
226
|
lineNumbers: "",
|
|
218
227
|
lint: "",
|
|
@@ -234,5 +243,5 @@ const K = {
|
|
|
234
243
|
}
|
|
235
244
|
});
|
|
236
245
|
export {
|
|
237
|
-
|
|
246
|
+
ne as default
|
|
238
247
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
+
import type { OperationCodeSampleProps } from '../../../../v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js';
|
|
3
|
+
type __VLS_Props = OperationCodeSampleProps & {
|
|
4
|
+
eventBus: WorkspaceEventBus;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=RequestCodeSnippet.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestCodeSnippet.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestCodeSnippet.vue"],"names":[],"mappings":"AAyJA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAQvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sEAAsE,CAAA;AAQpH,KAAK,WAAW,GAAG,wBAAwB,GAAG;IAAE,QAAQ,EAAE,iBAAiB,CAAA;CAAE,CAAC;;AAsQ9E,wBAMG"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { defineComponent as h, computed as s, ref as S, watch as x, createBlock as g, openBlock as y, unref as t, withCtx as l, createVNode as n, createElementVNode as m, createTextVNode as u, toDisplayString as b, normalizeClass as w } from "vue";
|
|
2
|
+
import { ScalarErrorBoundary as B, ScalarCodeBlock as k, ScalarCombobox as V, ScalarButton as T } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as E } from "@scalar/icons";
|
|
4
|
+
import { generateCodeSnippet as N } from "../../operation-code-sample/helpers/generate-code-snippet.js";
|
|
5
|
+
import { getClients as D } from "../../operation-code-sample/helpers/get-clients.js";
|
|
6
|
+
import { getCustomCodeSamples as O } from "../../operation-code-sample/helpers/get-custom-code-samples.js";
|
|
7
|
+
import { getSecrets as z } from "../../operation-code-sample/helpers/get-secrets.js";
|
|
8
|
+
import { findClient as f } from "../../operation-code-sample/helpers/find-client.js";
|
|
9
|
+
import I from "../../../components/layout/CollapsibleSection.vue.js";
|
|
10
|
+
import R from "../../../components/data-table/DataTable.vue.js";
|
|
11
|
+
import W from "../../../components/data-table/DataTableRow.vue.js";
|
|
12
|
+
const $ = { class: "flex flex-1" }, q = { class: "overflow-hidden" }, Q = /* @__PURE__ */ h({
|
|
13
|
+
__name: "RequestCodeSnippet",
|
|
14
|
+
props: {
|
|
15
|
+
clientOptions: {},
|
|
16
|
+
selectedClient: {},
|
|
17
|
+
selectedServer: {},
|
|
18
|
+
selectedContentType: {},
|
|
19
|
+
selectedExample: {},
|
|
20
|
+
securitySchemes: {},
|
|
21
|
+
method: {},
|
|
22
|
+
path: {},
|
|
23
|
+
operation: {},
|
|
24
|
+
fallback: { type: Boolean },
|
|
25
|
+
generateLabel: { type: Function },
|
|
26
|
+
isWebhook: { type: Boolean },
|
|
27
|
+
eventBus: {}
|
|
28
|
+
},
|
|
29
|
+
setup(e) {
|
|
30
|
+
const d = s(() => O(e.operation)), c = s(
|
|
31
|
+
() => D(d.value, e.clientOptions)
|
|
32
|
+
), i = S(
|
|
33
|
+
f(c.value, e.selectedClient)
|
|
34
|
+
);
|
|
35
|
+
x(
|
|
36
|
+
() => e.selectedClient,
|
|
37
|
+
(a) => {
|
|
38
|
+
const o = f(c.value, a);
|
|
39
|
+
o && (i.value = o);
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
const p = s(() => z(e.securitySchemes ?? [])), C = (a) => {
|
|
43
|
+
i.value = a, a && !a.id.startsWith("custom") && e.eventBus.emit("workspace:update:selected-client", a.id);
|
|
44
|
+
}, v = s(
|
|
45
|
+
() => N({
|
|
46
|
+
clientId: i.value?.id,
|
|
47
|
+
customCodeSamples: d.value,
|
|
48
|
+
operation: e.operation,
|
|
49
|
+
method: e.method,
|
|
50
|
+
path: e.path,
|
|
51
|
+
contentType: e.selectedContentType,
|
|
52
|
+
server: e.selectedServer,
|
|
53
|
+
securitySchemes: e.securitySchemes,
|
|
54
|
+
example: e.selectedExample
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
return (a, o) => (y(), g(t(I), {
|
|
58
|
+
class: "group/preview w-full border-t",
|
|
59
|
+
defaultOpen: !1
|
|
60
|
+
}, {
|
|
61
|
+
title: l(() => [...o[1] || (o[1] = [
|
|
62
|
+
u("Code Snippet", -1)
|
|
63
|
+
])]),
|
|
64
|
+
actions: l(() => [
|
|
65
|
+
m("div", $, [
|
|
66
|
+
n(t(V), {
|
|
67
|
+
modelValue: i.value,
|
|
68
|
+
options: c.value,
|
|
69
|
+
placement: "bottom-end",
|
|
70
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => C(r))
|
|
71
|
+
}, {
|
|
72
|
+
default: l(({ open: r }) => [
|
|
73
|
+
n(t(T), {
|
|
74
|
+
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5 py-0 text-base font-normal",
|
|
75
|
+
"data-testid": "client-picker",
|
|
76
|
+
variant: "ghost"
|
|
77
|
+
}, {
|
|
78
|
+
default: l(() => [
|
|
79
|
+
u(b(i.value?.title) + " ", 1),
|
|
80
|
+
n(t(E), {
|
|
81
|
+
class: w(["mt-0.25 size-3 transition-transform duration-100", r && "rotate-180"]),
|
|
82
|
+
weight: "bold"
|
|
83
|
+
}, null, 8, ["class"])
|
|
84
|
+
]),
|
|
85
|
+
_: 2
|
|
86
|
+
}, 1024)
|
|
87
|
+
]),
|
|
88
|
+
_: 1
|
|
89
|
+
}, 8, ["modelValue", "options"])
|
|
90
|
+
])
|
|
91
|
+
]),
|
|
92
|
+
default: l(() => [
|
|
93
|
+
n(t(B), null, {
|
|
94
|
+
default: l(() => [
|
|
95
|
+
n(t(R), {
|
|
96
|
+
columns: [""],
|
|
97
|
+
presentational: ""
|
|
98
|
+
}, {
|
|
99
|
+
default: l(() => [
|
|
100
|
+
n(t(W), null, {
|
|
101
|
+
default: l(() => [
|
|
102
|
+
m("div", q, [
|
|
103
|
+
n(t(k), {
|
|
104
|
+
class: "text-base -outline-offset-2",
|
|
105
|
+
content: v.value,
|
|
106
|
+
hideCredentials: p.value,
|
|
107
|
+
lang: i.value?.lang ?? "plaintext",
|
|
108
|
+
lineNumbers: ""
|
|
109
|
+
}, null, 8, ["content", "hideCredentials", "lang"])
|
|
110
|
+
])
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
})
|
|
114
|
+
]),
|
|
115
|
+
_: 1
|
|
116
|
+
})
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
})
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
}));
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
export {
|
|
126
|
+
Q as default
|
|
127
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestParams.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestParams.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestParams.vue"],"names":[],"mappings":"AAuGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAUnG,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,eAAe,EAAE,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;eAmBgC,MAAM;;;aARH,MAAM;eAAS,MAAM;;;eAI7C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE,CAAC;;;;;eAGzC,MAAM;;;aARH,MAAM;eAAS,MAAM;;;eAI7C,MAAM;iBACJ,OAAO,CAAC;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE,CAAC;;;;AAsL3E,wBAOG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, computed as s, createBlock as i, openBlock as d, unref as r, withCtx as a, createVNode as m, createElementVNode as p, createCommentVNode as g, withModifiers as h, createTextVNode as u, toDisplayString as f } from "vue";
|
|
2
2
|
import { ScalarTooltip as y, ScalarButton as P } from "@scalar/components";
|
|
3
|
-
import {
|
|
3
|
+
import { getExample as A } from "../../operation-block/helpers/get-example.js";
|
|
4
4
|
import { getParameterSchema as C } from "../helpers/get-parameter-schema.js";
|
|
5
5
|
import x from "./RequestTable.vue.js";
|
|
6
6
|
import q from "../../../components/layout/CollapsibleSection.vue.js";
|
|
7
|
-
const K = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100" }, k = { class: "sr-only" }, E = /* @__PURE__ */
|
|
7
|
+
const K = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100" }, k = { class: "sr-only" }, E = /* @__PURE__ */ b({
|
|
8
8
|
__name: "RequestParams",
|
|
9
9
|
props: {
|
|
10
10
|
parameters: {},
|
|
@@ -17,42 +17,43 @@ const K = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
|
|
|
17
17
|
environment: {}
|
|
18
18
|
},
|
|
19
19
|
emits: ["add", "update", "delete", "deleteAll"],
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
22
|
-
() =>
|
|
23
|
-
const t = A(e,
|
|
20
|
+
setup(l, { emit: v }) {
|
|
21
|
+
const n = v, c = s(
|
|
22
|
+
() => l.parameters.map((e) => {
|
|
23
|
+
const t = A(e, l.exampleKey, void 0);
|
|
24
24
|
return {
|
|
25
25
|
name: e.name,
|
|
26
26
|
value: t?.value ?? "",
|
|
27
|
-
|
|
27
|
+
description: e.description,
|
|
28
|
+
globalRoute: l.globalRoute,
|
|
28
29
|
schema: C(e),
|
|
29
30
|
isRequired: e.required,
|
|
30
31
|
isDisabled: t?.["x-disabled"] ?? !1
|
|
31
32
|
};
|
|
32
33
|
})
|
|
33
|
-
),
|
|
34
|
-
return (e, t) => (
|
|
34
|
+
), w = s(() => l.parameters.length > 1);
|
|
35
|
+
return (e, t) => (d(), i(r(q), {
|
|
35
36
|
class: "group/params",
|
|
36
37
|
itemCount: e.parameters.length
|
|
37
38
|
}, {
|
|
38
|
-
title:
|
|
39
|
+
title: a(() => [
|
|
39
40
|
u(f(e.title), 1)
|
|
40
41
|
]),
|
|
41
|
-
actions:
|
|
42
|
+
actions: a(() => [
|
|
42
43
|
p("div", K, [
|
|
43
|
-
|
|
44
|
+
w.value ? (d(), i(r(y), {
|
|
44
45
|
key: 0,
|
|
45
46
|
content: "Clear optional parameters",
|
|
46
47
|
placement: "left"
|
|
47
48
|
}, {
|
|
48
|
-
default:
|
|
49
|
-
|
|
49
|
+
default: a(() => [
|
|
50
|
+
m(r(P), {
|
|
50
51
|
class: "pr-0.75 pl-1 transition-none",
|
|
51
52
|
size: "sm",
|
|
52
53
|
variant: "ghost",
|
|
53
|
-
onClick: t[0] || (t[0] = h((
|
|
54
|
+
onClick: t[0] || (t[0] = h((o) => n("deleteAll"), ["stop"]))
|
|
54
55
|
}, {
|
|
55
|
-
default:
|
|
56
|
+
default: a(() => [
|
|
56
57
|
t[4] || (t[4] = u(" Clear ", -1)),
|
|
57
58
|
p("span", k, "All " + f(e.title), 1)
|
|
58
59
|
]),
|
|
@@ -63,20 +64,20 @@ const K = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
|
|
|
63
64
|
})) : g("", !0)
|
|
64
65
|
])
|
|
65
66
|
]),
|
|
66
|
-
default:
|
|
67
|
-
|
|
67
|
+
default: a(() => [
|
|
68
|
+
m(x, {
|
|
68
69
|
class: "flex-1",
|
|
69
70
|
columns: ["32px", "", ""],
|
|
70
|
-
data:
|
|
71
|
+
data: c.value,
|
|
71
72
|
environment: e.environment,
|
|
72
73
|
exampleKey: e.exampleKey,
|
|
73
74
|
globalRoute: e.globalRoute,
|
|
74
75
|
invalidParams: e.invalidParams,
|
|
75
76
|
label: e.label,
|
|
76
77
|
showAddRowPlaceholder: e.showAddRowPlaceholder,
|
|
77
|
-
onAddRow: t[1] || (t[1] = (
|
|
78
|
-
onDeleteRow: t[2] || (t[2] = (
|
|
79
|
-
onUpdateRow: t[3] || (t[3] = (
|
|
78
|
+
onAddRow: t[1] || (t[1] = (o) => n("add", o)),
|
|
79
|
+
onDeleteRow: t[2] || (t[2] = (o) => n("delete", { index: o })),
|
|
80
|
+
onUpdateRow: t[3] || (t[3] = (o, R) => n("update", { index: o, payload: R }))
|
|
80
81
|
}, null, 8, ["data", "environment", "exampleKey", "globalRoute", "invalidParams", "label", "showAddRowPlaceholder"])
|
|
81
82
|
]),
|
|
82
83
|
_: 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestTableRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTableRow.vue"],"names":[],"mappings":"AA8NA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAA;AAehG,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAC;AAqBF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;;;aAhB2B,MAAM;eAAS,MAAM;oBAAc,OAAO;;;;;;;aAA1C,MAAM;eAAS,MAAM;oBAAc,OAAO;;;;;;AA2etE,wBAOG"}
|