@scalar/api-client 2.18.0 → 2.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +85 -0
- package/dist/components/AddressBar/AddressBar.vue2.js +52 -52
- package/dist/components/AddressBar/AddressBarHistory.vue2.js +15 -15
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts +0 -33
- package/dist/components/AddressBar/httpStatusCodeColors.d.ts.map +1 -1
- package/dist/components/AddressBar/httpStatusCodeColors.js +0 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +112 -112
- package/dist/components/CommandPalette/CommandActionForm.vue.js +18 -18
- package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +25 -25
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +0 -1
- package/dist/components/CommandPalette/WatchModeToggle.vue.js +14 -14
- package/dist/components/DataTable/DataTable.vue.js +17 -17
- package/dist/components/DataTable/DataTableCell.vue.js +9 -9
- package/dist/components/DataTable/DataTableCheckbox.vue.js +17 -17
- package/dist/components/DataTable/DataTableInput.vue2.js +48 -48
- package/dist/components/DataTable/DataTableInputSelect.vue.js +35 -35
- package/dist/components/DataTable/DataTableText.vue.js +10 -10
- package/dist/components/Form/Form.vue.js +32 -32
- package/dist/components/Form/LabelInput.vue2.js +15 -15
- package/dist/components/HelpfulLink.vue.js +7 -7
- package/dist/components/HttpMethod/HttpMethod.vue2.js +22 -22
- package/dist/components/IconSelector.vue.js +16 -16
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +50 -50
- package/dist/components/ImportCollection/ImportNowButton.vue.js +23 -23
- package/dist/components/ImportCollection/PrefetchError.vue.js +8 -8
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts +0 -7
- package/dist/components/ImportCollection/hooks/useUrlPrefetcher.d.ts.map +1 -1
- package/dist/components/ScalarAsciiArt.vue2.js +16 -16
- package/dist/components/SectionFilter.vue2.js +21 -21
- package/dist/components/SectionFilterButton.vue.js +7 -7
- package/dist/components/Server/ServerDropdown.vue.js +32 -32
- package/dist/components/Server/ServerDropdownItem.vue2.js +39 -39
- package/dist/components/Server/ServerSelector.vue.js +27 -27
- package/dist/components/Server/ServerVariablesForm.vue.js +26 -26
- package/dist/components/Server/ServerVariablesSelect.vue.js +21 -21
- package/dist/components/Server/ServerVariablesTextbox.vue.js +10 -10
- package/dist/components/Server/types.d.ts +2 -1
- package/dist/components/Server/types.d.ts.map +1 -1
- package/dist/components/SideNav/SideNavLink.vue.js +18 -18
- package/dist/components/SideNav/SideNavRouterLink.vue.js +13 -13
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +11 -11
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +16 -16
- package/dist/components/Sidebar/Sidebar.vue2.js +28 -28
- package/dist/components/Sidebar/SidebarButton.vue.js +12 -12
- package/dist/components/Sidebar/SidebarListElement.vue2.js +34 -34
- package/dist/components/Sidebar/SidebarListElementActions.vue.js +33 -33
- package/dist/components/TopNav/TopNavItem.vue2.js +41 -41
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +43 -43
- package/dist/data/httpHeaders.d.ts +2 -1
- package/dist/data/httpHeaders.d.ts.map +1 -1
- package/dist/hooks/useClientConfig.js +1 -1
- package/dist/hooks/useLayout.js +1 -1
- package/dist/hooks/useSidebar.js +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
- package/dist/plugins/hooks/usePluginManager.d.ts.map +1 -1
- package/dist/plugins/hooks/usePluginManager.js +5 -5
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +5 -5
- package/dist/plugins/plugin-manager.d.ts +0 -2
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/routes.d.ts +0 -10
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +0 -1
- package/dist/store/active-entities.js +1 -1
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +44 -44
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +20 -20
- package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/build-request-body.js +14 -14
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -2
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +12 -12
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +65 -65
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +6 -6
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts +4 -3
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +9 -7
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +40 -32
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +1 -3
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +2 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue2.js +144 -149
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts +25 -45
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +2 -2
- package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +90 -139
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts +22 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +77 -0
- package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +4 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +4 -4
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js +34 -34
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +6 -6
- package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js +3 -3
- package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +30 -32
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +2 -2
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +64 -64
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +29 -29
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +2 -2
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +12 -13
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +8 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -0
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +9 -0
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts +3 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +9 -8
- package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +67 -67
- package/dist/v2/blocks/response-block/components/Headers.vue.js +35 -35
- package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +24 -24
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +10 -10
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +24 -24
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +10 -10
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +11 -11
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +14 -14
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +11 -11
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +33 -33
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts +3 -6
- package/dist/v2/blocks/response-block/helpers/media-types.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/helpers/media-types.js +0 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +72 -72
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +9 -9
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts +0 -33
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +83 -82
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +10 -10
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +121 -121
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +13 -13
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +33 -33
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +26 -26
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +26 -26
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +130 -122
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +0 -21
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +1 -3
- package/dist/v2/components/code-input/CodeInput.vue2.js +93 -93
- package/dist/v2/components/data-table/DataTable.vue.js +17 -17
- package/dist/v2/components/data-table/DataTableCell.vue.js +9 -9
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +17 -17
- package/dist/v2/components/data-table/DataTableInput.vue2.js +48 -48
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +35 -35
- package/dist/v2/components/data-table/DataTableText.vue.js +10 -10
- package/dist/v2/components/forms/ConfirmationForm.vue.js +13 -13
- package/dist/v2/components/layout/CollapsibleSection.vue.js +42 -42
- package/dist/v2/components/modals/DeleteModal.vue.js +13 -13
- package/dist/v2/components/resize/Resize.vue2.js +11 -11
- package/dist/v2/components/server/ServerDropdown.vue.js +30 -30
- package/dist/v2/components/server/ServerDropdownItem.vue2.js +27 -27
- package/dist/v2/components/sidebar/Sidebar.vue.js +32 -32
- package/dist/v2/components/sidebar/SidebarMenu.vue.js +20 -20
- package/dist/v2/features/app/App.vue.js +25 -25
- package/dist/v2/features/app/app-events.d.ts.map +1 -1
- package/dist/v2/features/app/app-events.js +55 -61
- package/dist/v2/features/app/components/AppSidebar.vue2.js +97 -97
- package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +20 -20
- package/dist/v2/features/app/components/DesktopTab.vue2.js +59 -59
- package/dist/v2/features/app/components/DesktopTabs.vue.js +22 -22
- package/dist/v2/features/app/components/SidebarItemMenu.vue.js +6 -6
- package/dist/v2/features/app/components/WebTopNav.vue.js +9 -9
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts +2 -5
- package/dist/v2/features/app/helpers/create-api-client-app.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/create-api-client-app.js +1 -2
- package/dist/v2/features/app/helpers/routes.d.ts +5 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue.js +31 -31
- package/dist/v2/features/collection/WorkspaceCollection.vue.js +17 -17
- package/dist/v2/features/collection/components/Authentication.vue2.js +18 -18
- package/dist/v2/features/collection/components/Cookies.vue.js +10 -10
- package/dist/v2/features/collection/components/Environment.vue.js +10 -10
- package/dist/v2/features/collection/components/Form.vue.js +21 -21
- package/dist/v2/features/collection/components/Overview.vue2.js +25 -25
- package/dist/v2/features/collection/components/Servers.vue.js +37 -37
- package/dist/v2/features/collection/components/Settings.vue.js +22 -22
- package/dist/v2/features/collection/components/Tabs.vue.js +18 -18
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +20 -20
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +17 -17
- package/dist/v2/features/command-palette/components/TheCommandPalette.vue2.js +68 -68
- package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +11 -11
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts +2 -1
- package/dist/v2/features/command-palette/helpers/get-openapi-document-details.d.ts.map +1 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts +2 -1
- package/dist/v2/features/command-palette/helpers/get-postman-document-details.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +3 -3
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
- package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -1
- package/dist/v2/features/command-palette/types.d.ts +11 -10
- package/dist/v2/features/command-palette/types.d.ts.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.js +36 -36
- package/dist/v2/features/environments/components/Environment.vue.js +16 -16
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +37 -37
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +19 -19
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +14 -14
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +24 -24
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +58 -58
- package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +23 -23
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue2.js +57 -56
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +5 -4
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-workspace-client-modal-events.js +17 -21
- package/dist/v2/features/operation/Operation.vue.d.ts +5 -1
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +41 -39
- package/dist/v2/features/search/components/SearchButton.vue.js +40 -40
- package/dist/v2/features/search/components/SearchModal.vue2.js +43 -43
- package/dist/v2/features/search/components/SearchResult.vue.js +34 -34
- package/dist/v2/features/search/types.d.ts +5 -4
- package/dist/v2/features/search/types.d.ts.map +1 -1
- package/dist/v2/features/settings/CollectionSettings.vue.js +51 -51
- package/dist/v2/features/settings/DocumentSettings.vue.js +25 -25
- package/dist/v2/features/settings/components/Appearance.vue.js +27 -27
- package/dist/v2/helpers/handle-hotkeys.d.ts +1 -12
- package/dist/v2/helpers/handle-hotkeys.d.ts.map +1 -1
- package/dist/v2/helpers/handle-hotkeys.js +0 -2
- package/dist/v2/helpers/plugins.d.ts +2 -2
- package/dist/v2/helpers/plugins.d.ts.map +1 -1
- package/dist/views/Collection/CollectionNavigation.vue.js +13 -13
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +114 -114
- package/dist/views/Collection/components/MarkdownInput.vue2.js +31 -31
- package/dist/views/Cookies/CookieModal.vue2.js +26 -26
- package/dist/views/Environment/EnvironmentColorModal.vue.js +10 -10
- package/dist/views/Environment/EnvironmentColors.vue.js +56 -56
- package/dist/views/Environment/EnvironmentModal.vue.js +26 -26
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +24 -24
- package/dist/views/Request/Request.vue2.js +55 -55
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +17 -17
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +102 -102
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +27 -27
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +91 -91
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +36 -36
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +101 -101
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +154 -154
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +35 -35
- package/dist/views/Request/RequestSection/RequestParams.vue.js +81 -81
- package/dist/views/Request/RequestSection/RequestPathParams.vue.js +47 -47
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +90 -90
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +111 -111
- package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +29 -29
- package/dist/views/Request/RequestSection/index.d.ts +1 -1
- package/dist/views/Request/RequestSection/index.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/index.js +4 -4
- package/dist/views/Request/RequestSidebarItem.vue2.js +149 -149
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +79 -79
- package/dist/views/Request/RequestSubpageHeader.vue2.js +30 -30
- package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +29 -29
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +24 -24
- package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +16 -16
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +21 -21
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +30 -30
- package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +37 -37
- package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +61 -61
- package/package.json +24 -24
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts +0 -6
- package/dist/components/ImportCollection/OpenAppButton.vue.d.ts.map +0 -1
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts +0 -8
- package/dist/components/ImportCollection/OperationBadge.vue.d.ts.map +0 -1
- package/dist/components/ScreenReader.vue.d.ts +0 -20
- package/dist/components/ScreenReader.vue.d.ts.map +0 -1
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts +0 -9
- package/dist/components/SideNav/WorkspaceProfileIcon.vue.d.ts.map +0 -1
- package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts +0 -3
- package/dist/views/Components/RequestBodies/RequestBodies.vue.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/types/post-response.d.ts +0 -7
- package/dist/views/Request/RequestSection/types/post-response.d.ts.map +0 -1
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarListbox as S, ScalarButton as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import L from "../../../components/
|
|
9
|
-
import M from "../../../components/data-table/
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
const J = {
|
|
1
|
+
import { defineComponent as F, computed as d, watch as q, createBlock as p, openBlock as u, unref as t, withCtx as i, createVNode as r, createElementVNode as c, toDisplayString as v, createElementBlock as y, Fragment as O, createTextVNode as T } from "vue";
|
|
2
|
+
import { ScalarListbox as S, ScalarButton as x, ScalarIcon as k } from "@scalar/components";
|
|
3
|
+
import { unpackProxyObject as B } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
4
|
+
import D from "./RequestBodyForm.vue.js";
|
|
5
|
+
import { getFileName as V } from "../helpers/files.js";
|
|
6
|
+
import { getExampleFromBody as U } 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 $ from "../../../components/data-table/DataTableRow.vue.js";
|
|
11
|
+
import z from "../../../components/code-input/CodeInput.vue.js";
|
|
12
|
+
import { useFileDialog as K } from "../../../../hooks/useFileDialog.js";
|
|
13
|
+
const R = {
|
|
15
14
|
key: 0,
|
|
16
15
|
class: "text-c-3 flex min-h-10 w-full items-center justify-center border-t p-2 text-sm"
|
|
17
|
-
},
|
|
16
|
+
}, I = {
|
|
18
17
|
key: 1,
|
|
19
18
|
class: "flex items-center justify-center overflow-hidden border-t p-1.5"
|
|
20
|
-
},
|
|
19
|
+
}, J = { class: "text-c-2 w-full max-w-full overflow-hidden rounded border px-1.5 py-1 text-xs whitespace-nowrap" }, ne = /* @__PURE__ */ F({
|
|
21
20
|
__name: "RequestBody",
|
|
22
21
|
props: {
|
|
23
22
|
requestBody: {},
|
|
@@ -25,13 +24,13 @@ const J = {
|
|
|
25
24
|
title: {},
|
|
26
25
|
environment: {}
|
|
27
26
|
},
|
|
28
|
-
emits: ["update:contentType", "update:value", "
|
|
29
|
-
setup(
|
|
30
|
-
const
|
|
27
|
+
emits: ["update:contentType", "update:value", "update:formValue"],
|
|
28
|
+
setup(l, { emit: C }) {
|
|
29
|
+
const s = C, N = {
|
|
31
30
|
"application/json": "json",
|
|
32
31
|
"application/xml": "xml",
|
|
33
32
|
"application/yaml": "yaml"
|
|
34
|
-
},
|
|
33
|
+
}, b = {
|
|
35
34
|
"multipart/form-data": "Multipart Form",
|
|
36
35
|
"application/x-www-form-urlencoded": "Form URL Encoded",
|
|
37
36
|
"application/octet-stream": "Binary File",
|
|
@@ -41,76 +40,73 @@ const J = {
|
|
|
41
40
|
"application/edn": "EDN",
|
|
42
41
|
other: "Other",
|
|
43
42
|
none: "None"
|
|
44
|
-
},
|
|
45
|
-
() =>
|
|
43
|
+
}, n = d(
|
|
44
|
+
() => l.requestBody?.["x-scalar-selected-content-type"]?.[l.exampleKey] ?? Object.keys(l.requestBody?.content ?? {})[0] ?? "none"
|
|
46
45
|
);
|
|
47
|
-
|
|
48
|
-
() =>
|
|
49
|
-
(
|
|
50
|
-
|
|
46
|
+
q(
|
|
47
|
+
() => l.requestBody?.["x-scalar-selected-content-type"]?.[l.exampleKey],
|
|
48
|
+
(o) => {
|
|
49
|
+
o || s("update:contentType", { value: n.value });
|
|
51
50
|
},
|
|
52
51
|
{ immediate: !0 }
|
|
53
52
|
);
|
|
54
|
-
const
|
|
55
|
-
id:
|
|
53
|
+
const f = Object.entries(b).map(([o, e]) => ({
|
|
54
|
+
id: o,
|
|
56
55
|
label: e
|
|
57
|
-
})),
|
|
58
|
-
get: () =>
|
|
59
|
-
(e) => e.id ===
|
|
60
|
-
) ??
|
|
61
|
-
set: (
|
|
62
|
-
|
|
56
|
+
})), g = d({
|
|
57
|
+
get: () => f.find(
|
|
58
|
+
(e) => e.id === n.value
|
|
59
|
+
) ?? f.at(-1),
|
|
60
|
+
set: (o) => {
|
|
61
|
+
s("update:contentType", { value: o.id });
|
|
63
62
|
}
|
|
64
63
|
});
|
|
65
|
-
function
|
|
66
|
-
const { open: e } =
|
|
67
|
-
onChange: (
|
|
68
|
-
const
|
|
69
|
-
|
|
64
|
+
function h(o) {
|
|
65
|
+
const { open: e } = K({
|
|
66
|
+
onChange: (a) => {
|
|
67
|
+
const w = a?.[0];
|
|
68
|
+
w && o(w);
|
|
70
69
|
},
|
|
71
70
|
multiple: !1,
|
|
72
71
|
accept: "*/*"
|
|
73
72
|
});
|
|
74
73
|
e();
|
|
75
74
|
}
|
|
76
|
-
const
|
|
77
|
-
() =>
|
|
78
|
-
),
|
|
79
|
-
if (!
|
|
75
|
+
const m = d(
|
|
76
|
+
() => l.requestBody && U(l.requestBody, n.value, l.exampleKey)
|
|
77
|
+
), j = d(() => {
|
|
78
|
+
if (!m.value)
|
|
80
79
|
return "";
|
|
81
|
-
const
|
|
82
|
-
return typeof
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
value: e
|
|
86
|
-
})) : [] : []);
|
|
87
|
-
return (n, e) => (m(), v(l(L), null, {
|
|
80
|
+
const o = m.value.value;
|
|
81
|
+
return typeof o == "string" ? o : JSON.stringify(o, null, 2);
|
|
82
|
+
});
|
|
83
|
+
return (o, e) => (u(), p(t(E), null, {
|
|
88
84
|
title: i(() => [
|
|
89
|
-
|
|
85
|
+
T(v(l.title), 1)
|
|
90
86
|
]),
|
|
91
87
|
default: i(() => [
|
|
92
|
-
|
|
88
|
+
r(t(L), {
|
|
93
89
|
columns: [""],
|
|
94
90
|
presentational: ""
|
|
95
91
|
}, {
|
|
96
92
|
default: i(() => [
|
|
97
|
-
|
|
93
|
+
r(t(M), { class: "relative col-span-full flex h-8 cursor-pointer items-center justify-between border-r-0 !p-0" }, {
|
|
98
94
|
default: i(() => [
|
|
99
|
-
|
|
100
|
-
modelValue:
|
|
101
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
102
|
-
options:
|
|
95
|
+
r(t(S), {
|
|
96
|
+
modelValue: g.value,
|
|
97
|
+
"onUpdate:modelValue": e[0] || (e[0] = (a) => g.value = a),
|
|
98
|
+
options: t(f),
|
|
103
99
|
teleport: ""
|
|
104
100
|
}, {
|
|
105
101
|
default: i(() => [
|
|
106
|
-
|
|
102
|
+
r(t(x), {
|
|
107
103
|
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-3 font-normal",
|
|
108
104
|
fullWidth: "",
|
|
109
105
|
variant: "ghost"
|
|
110
106
|
}, {
|
|
111
107
|
default: i(() => [
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
c("span", null, v(b[n.value] ?? n.value), 1),
|
|
109
|
+
r(t(k), {
|
|
114
110
|
icon: "ChevronDown",
|
|
115
111
|
size: "md"
|
|
116
112
|
})
|
|
@@ -123,42 +119,42 @@ const J = {
|
|
|
123
119
|
]),
|
|
124
120
|
_: 1
|
|
125
121
|
}),
|
|
126
|
-
|
|
122
|
+
r(t($), null, {
|
|
127
123
|
default: i(() => [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
])])) :
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
124
|
+
n.value === "none" ? (u(), y("div", R, [...e[5] || (e[5] = [
|
|
125
|
+
c("span", null, "No Body", -1)
|
|
126
|
+
])])) : n.value === "application/octet-stream" ? (u(), y("div", I, [
|
|
127
|
+
t(V)(t(B)(m.value?.value)) !== void 0 ? (u(), y(O, { key: 0 }, [
|
|
128
|
+
c("span", J, v(t(V)(t(B)(m.value?.value))), 1),
|
|
129
|
+
r(t(x), {
|
|
134
130
|
class: "bg-b-2 hover:bg-b-3 text-c-2 ml-1 border-0 shadow-none",
|
|
135
131
|
size: "sm",
|
|
136
132
|
variant: "outlined",
|
|
137
|
-
onClick: e[1] || (e[1] = (
|
|
138
|
-
|
|
139
|
-
contentType:
|
|
133
|
+
onClick: e[1] || (e[1] = (a) => s("update:value", {
|
|
134
|
+
payload: void 0,
|
|
135
|
+
contentType: n.value
|
|
140
136
|
}))
|
|
141
137
|
}, {
|
|
142
|
-
default: i(() => [...e[
|
|
143
|
-
|
|
138
|
+
default: i(() => [...e[6] || (e[6] = [
|
|
139
|
+
T(" Delete ", -1)
|
|
144
140
|
])]),
|
|
145
141
|
_: 1
|
|
146
142
|
})
|
|
147
|
-
], 64)) : (
|
|
143
|
+
], 64)) : (u(), p(t(x), {
|
|
148
144
|
key: 1,
|
|
149
145
|
class: "bg-b-2 hover:bg-b-3 text-c-2 border-0 shadow-none",
|
|
150
146
|
size: "sm",
|
|
151
147
|
variant: "outlined",
|
|
152
|
-
onClick: e[2] || (e[2] = () =>
|
|
153
|
-
(
|
|
154
|
-
|
|
155
|
-
contentType:
|
|
148
|
+
onClick: e[2] || (e[2] = () => h(
|
|
149
|
+
(a) => s("update:value", {
|
|
150
|
+
payload: a,
|
|
151
|
+
contentType: n.value
|
|
156
152
|
})
|
|
157
153
|
))
|
|
158
154
|
}, {
|
|
159
155
|
default: i(() => [
|
|
160
|
-
e[
|
|
161
|
-
|
|
156
|
+
e[7] || (e[7] = c("span", null, "Select File", -1)),
|
|
157
|
+
r(t(k), {
|
|
162
158
|
class: "ml-1",
|
|
163
159
|
icon: "Upload",
|
|
164
160
|
size: "xs",
|
|
@@ -167,72 +163,27 @@ const J = {
|
|
|
167
163
|
]),
|
|
168
164
|
_: 1
|
|
169
165
|
}))
|
|
170
|
-
])) :
|
|
166
|
+
])) : n.value === "multipart/form-data" || n.value === "application/x-www-form-urlencoded" ? (u(), p(D, {
|
|
171
167
|
key: 2,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
contentType:
|
|
178
|
-
})),
|
|
179
|
-
onDeleteRow: e[4] || (e[4] = (t) => a("delete:fromRow", {
|
|
180
|
-
contentType: o.value,
|
|
181
|
-
index: t
|
|
182
|
-
})),
|
|
183
|
-
onRemoveFile: e[5] || (e[5] = (t) => a("update:formRow", {
|
|
184
|
-
contentType: o.value,
|
|
185
|
-
index: t,
|
|
186
|
-
data: {
|
|
187
|
-
value: void 0
|
|
188
|
-
}
|
|
189
|
-
})),
|
|
190
|
-
onUpdateRow: e[6] || (e[6] = (t, u) => a("update:formRow", {
|
|
191
|
-
index: t,
|
|
192
|
-
data: u,
|
|
193
|
-
contentType: o.value
|
|
194
|
-
})),
|
|
195
|
-
onUploadFile: e[7] || (e[7] = (t) => g((u) => {
|
|
196
|
-
if (t !== void 0 && t < c.value.length)
|
|
197
|
-
return a("update:formRow", {
|
|
198
|
-
index: t,
|
|
199
|
-
data: { value: u },
|
|
200
|
-
contentType: o.value
|
|
201
|
-
});
|
|
202
|
-
a("add:formRow", {
|
|
203
|
-
data: { key: u?.name ?? "file", value: u },
|
|
204
|
-
contentType: o.value
|
|
205
|
-
});
|
|
168
|
+
environment: l.environment,
|
|
169
|
+
example: m.value,
|
|
170
|
+
selectedContentType: n.value,
|
|
171
|
+
"onUpdate:formValue": e[3] || (e[3] = (a) => s("update:formValue", {
|
|
172
|
+
payload: a,
|
|
173
|
+
contentType: n.value
|
|
206
174
|
}))
|
|
207
|
-
}, null, 8, ["
|
|
175
|
+
}, null, 8, ["environment", "example", "selectedContentType"])) : (u(), p(t(z), {
|
|
208
176
|
key: 3,
|
|
209
|
-
data: c.value,
|
|
210
|
-
environment: n.environment,
|
|
211
|
-
onAddRow: e[8] || (e[8] = (t) => a("add:formRow", {
|
|
212
|
-
data: t,
|
|
213
|
-
contentType: o.value
|
|
214
|
-
})),
|
|
215
|
-
onDeleteRow: e[9] || (e[9] = (t) => a("delete:fromRow", {
|
|
216
|
-
contentType: o.value,
|
|
217
|
-
index: t
|
|
218
|
-
})),
|
|
219
|
-
onUpdateRow: e[10] || (e[10] = (t, u) => a("update:formRow", {
|
|
220
|
-
index: t,
|
|
221
|
-
data: u,
|
|
222
|
-
contentType: o.value
|
|
223
|
-
}))
|
|
224
|
-
}, null, 8, ["data", "environment"])) : (m(), v(l($), {
|
|
225
|
-
key: 4,
|
|
226
177
|
class: "border-t px-3",
|
|
227
178
|
content: "",
|
|
228
|
-
environment:
|
|
229
|
-
language:
|
|
179
|
+
environment: l.environment,
|
|
180
|
+
language: N[n.value] ?? "plaintext",
|
|
230
181
|
lineNumbers: "",
|
|
231
182
|
lint: "",
|
|
232
|
-
modelValue:
|
|
233
|
-
"onUpdate:modelValue": e[
|
|
234
|
-
|
|
235
|
-
contentType:
|
|
183
|
+
modelValue: j.value,
|
|
184
|
+
"onUpdate:modelValue": e[4] || (e[4] = (a) => s("update:value", {
|
|
185
|
+
payload: a,
|
|
186
|
+
contentType: n.value
|
|
236
187
|
}))
|
|
237
188
|
}, null, 8, ["environment", "language", "modelValue"]))
|
|
238
189
|
]),
|
|
@@ -247,5 +198,5 @@ const J = {
|
|
|
247
198
|
}
|
|
248
199
|
});
|
|
249
200
|
export {
|
|
250
|
-
|
|
201
|
+
ne as default
|
|
251
202
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
2
|
+
import type { ExampleObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
example: ExampleObject | undefined | null;
|
|
5
|
+
selectedContentType: string;
|
|
6
|
+
environment: XScalarEnvironment;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
|
+
"update:formValue": (payload: {
|
|
10
|
+
name: string;
|
|
11
|
+
value: string | File;
|
|
12
|
+
isDisabled: boolean;
|
|
13
|
+
}[]) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
"onUpdate:formValue"?: ((payload: {
|
|
16
|
+
name: string;
|
|
17
|
+
value: string | File;
|
|
18
|
+
isDisabled: boolean;
|
|
19
|
+
}[]) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
22
|
+
//# sourceMappingURL=RequestBodyForm.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequestBodyForm.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestBodyForm.vue"],"names":[],"mappings":"AA2HA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAOjG,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI,CAAA;IACzC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;;;;;;;;;;;;AAsLF,wBAOG"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineComponent as c, ref as w, watch as y, createBlock as i, openBlock as v } from "vue";
|
|
2
|
+
import s from "./RequestTable.vue.js";
|
|
3
|
+
import { getFormBodyRows as F } from "../helpers/get-form-body-rows.js";
|
|
4
|
+
import { useFileDialog as B } from "../../../../hooks/useFileDialog.js";
|
|
5
|
+
const k = /* @__PURE__ */ c({
|
|
6
|
+
__name: "RequestBodyForm",
|
|
7
|
+
props: {
|
|
8
|
+
example: {},
|
|
9
|
+
selectedContentType: {},
|
|
10
|
+
environment: {}
|
|
11
|
+
},
|
|
12
|
+
emits: ["update:formValue"],
|
|
13
|
+
setup(l, { emit: p }) {
|
|
14
|
+
const u = p, e = w([]);
|
|
15
|
+
y(
|
|
16
|
+
() => l.example,
|
|
17
|
+
(o) => {
|
|
18
|
+
e.value = F(o, l.selectedContentType);
|
|
19
|
+
},
|
|
20
|
+
{ immediate: !0 }
|
|
21
|
+
);
|
|
22
|
+
const d = (o) => {
|
|
23
|
+
e.value = [
|
|
24
|
+
...e.value,
|
|
25
|
+
{ name: "", value: "", isDisabled: !1, ...o }
|
|
26
|
+
], u("update:formValue", e.value);
|
|
27
|
+
}, m = (o, n) => {
|
|
28
|
+
e.value = e.value.map(
|
|
29
|
+
(t, a) => a === o ? { ...t, ...n } : t
|
|
30
|
+
), u("update:formValue", e.value);
|
|
31
|
+
}, r = (o) => {
|
|
32
|
+
e.value = e.value.filter(
|
|
33
|
+
(n, t) => t !== o
|
|
34
|
+
), u("update:formValue", e.value);
|
|
35
|
+
}, f = (o) => {
|
|
36
|
+
const { open: n } = B({
|
|
37
|
+
onChange: (t) => {
|
|
38
|
+
const a = t?.[0];
|
|
39
|
+
if (a)
|
|
40
|
+
if (o >= e.value.length)
|
|
41
|
+
d({ name: a.name, value: a });
|
|
42
|
+
else {
|
|
43
|
+
const R = e.value[o];
|
|
44
|
+
m(o, {
|
|
45
|
+
name: R?.name || a.name,
|
|
46
|
+
value: a
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
multiple: !1,
|
|
51
|
+
accept: "*/*"
|
|
52
|
+
});
|
|
53
|
+
n();
|
|
54
|
+
};
|
|
55
|
+
return (o, n) => l.selectedContentType === "multipart/form-data" ? (v(), i(s, {
|
|
56
|
+
key: 0,
|
|
57
|
+
data: e.value,
|
|
58
|
+
environment: l.environment,
|
|
59
|
+
showUploadButton: "",
|
|
60
|
+
onAddRow: d,
|
|
61
|
+
onDeleteRow: n[0] || (n[0] = (t) => r(t)),
|
|
62
|
+
onRemoveFile: n[1] || (n[1] = (t) => m(t, { value: void 0 })),
|
|
63
|
+
onUpdateRow: n[2] || (n[2] = (t, a) => m(t, a)),
|
|
64
|
+
onUploadFile: f
|
|
65
|
+
}, null, 8, ["data", "environment"])) : (v(), i(s, {
|
|
66
|
+
key: 1,
|
|
67
|
+
data: e.value,
|
|
68
|
+
environment: l.environment,
|
|
69
|
+
onAddRow: d,
|
|
70
|
+
onDeleteRow: r,
|
|
71
|
+
onUpdateRow: m
|
|
72
|
+
}, null, 8, ["data", "environment"]));
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export {
|
|
76
|
+
k as default
|
|
77
|
+
};
|
|
@@ -15,13 +15,13 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
15
15
|
index: number;
|
|
16
16
|
}) => any;
|
|
17
17
|
add: (payload: Partial<{
|
|
18
|
-
|
|
18
|
+
name: string;
|
|
19
19
|
value: string;
|
|
20
20
|
}>) => any;
|
|
21
21
|
update: (payload: {
|
|
22
22
|
index: number;
|
|
23
23
|
payload: Partial<{
|
|
24
|
-
|
|
24
|
+
name: string;
|
|
25
25
|
value: string;
|
|
26
26
|
isDisabled: boolean;
|
|
27
27
|
}>;
|
|
@@ -32,13 +32,13 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
32
32
|
index: number;
|
|
33
33
|
}) => any) | undefined;
|
|
34
34
|
onAdd?: ((payload: Partial<{
|
|
35
|
-
|
|
35
|
+
name: string;
|
|
36
36
|
value: string;
|
|
37
37
|
}>) => any) | undefined;
|
|
38
38
|
onUpdate?: ((payload: {
|
|
39
39
|
index: number;
|
|
40
40
|
payload: Partial<{
|
|
41
|
-
|
|
41
|
+
name: string;
|
|
42
42
|
value: string;
|
|
43
43
|
isDisabled: boolean;
|
|
44
44
|
}>;
|
|
@@ -1 +1 @@
|
|
|
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;;;
|
|
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;;;cARF,MAAM;eAAS,MAAM;;;eAI9C,MAAM;iBACJ,OAAO,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE,CAAC;;;;;eAG1C,MAAM;;;cARF,MAAM;eAAS,MAAM;;;eAI9C,MAAM;iBACJ,OAAO,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE,CAAC;;;;AAsL5E,wBAOG"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as b, computed as
|
|
2
|
-
import { ScalarTooltip as
|
|
3
|
-
import { getExample as
|
|
4
|
-
import { getParameterSchema as
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as b, computed as r, createBlock as s, openBlock as d, unref as i, withCtx as o, createVNode as m, createElementVNode as u, createCommentVNode as x, withModifiers as g, createTextVNode as c, toDisplayString as p } from "vue";
|
|
2
|
+
import { ScalarTooltip as h, ScalarButton as y } from "@scalar/components";
|
|
3
|
+
import { getExample as P } from "../../operation-block/helpers/get-example.js";
|
|
4
|
+
import { getParameterSchema as A } from "../helpers/get-parameter-schema.js";
|
|
5
|
+
import C from "./RequestTable.vue.js";
|
|
6
6
|
import q from "../../../components/layout/CollapsibleSection.vue.js";
|
|
7
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",
|
|
@@ -17,67 +17,67 @@ 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 n =
|
|
22
|
-
() =>
|
|
23
|
-
const t =
|
|
20
|
+
setup(e, { emit: f }) {
|
|
21
|
+
const n = f, v = r(
|
|
22
|
+
() => e.parameters.map((a) => {
|
|
23
|
+
const t = P(a, e.exampleKey, void 0);
|
|
24
24
|
return {
|
|
25
|
-
name:
|
|
25
|
+
name: a.name,
|
|
26
26
|
value: t?.value ?? "",
|
|
27
|
-
description:
|
|
28
|
-
globalRoute:
|
|
29
|
-
schema:
|
|
30
|
-
isRequired:
|
|
27
|
+
description: a.description,
|
|
28
|
+
globalRoute: e.globalRoute,
|
|
29
|
+
schema: A(a),
|
|
30
|
+
isRequired: a.required,
|
|
31
31
|
isDisabled: t?.["x-disabled"] ?? !1
|
|
32
32
|
};
|
|
33
33
|
})
|
|
34
|
-
), w =
|
|
35
|
-
return (
|
|
34
|
+
), w = r(() => e.parameters.length > 1);
|
|
35
|
+
return (a, t) => (d(), s(i(q), {
|
|
36
36
|
class: "group/params",
|
|
37
37
|
itemCount: e.parameters.length
|
|
38
38
|
}, {
|
|
39
|
-
title:
|
|
40
|
-
|
|
39
|
+
title: o(() => [
|
|
40
|
+
c(p(e.title), 1)
|
|
41
41
|
]),
|
|
42
|
-
actions:
|
|
43
|
-
|
|
44
|
-
w.value ? (d(), i(
|
|
42
|
+
actions: o(() => [
|
|
43
|
+
u("div", K, [
|
|
44
|
+
w.value ? (d(), s(i(h), {
|
|
45
45
|
key: 0,
|
|
46
46
|
content: "Clear optional parameters",
|
|
47
47
|
placement: "left"
|
|
48
48
|
}, {
|
|
49
|
-
default:
|
|
50
|
-
m(
|
|
49
|
+
default: o(() => [
|
|
50
|
+
m(i(y), {
|
|
51
51
|
class: "pr-0.75 pl-1 transition-none",
|
|
52
52
|
size: "sm",
|
|
53
53
|
variant: "ghost",
|
|
54
|
-
onClick: t[0] || (t[0] =
|
|
54
|
+
onClick: t[0] || (t[0] = g((l) => n("deleteAll"), ["stop"]))
|
|
55
55
|
}, {
|
|
56
|
-
default:
|
|
57
|
-
t[4] || (t[4] =
|
|
58
|
-
|
|
56
|
+
default: o(() => [
|
|
57
|
+
t[4] || (t[4] = c(" Clear ", -1)),
|
|
58
|
+
u("span", k, "All " + p(e.title), 1)
|
|
59
59
|
]),
|
|
60
60
|
_: 1
|
|
61
61
|
})
|
|
62
62
|
]),
|
|
63
63
|
_: 1
|
|
64
|
-
})) :
|
|
64
|
+
})) : x("", !0)
|
|
65
65
|
])
|
|
66
66
|
]),
|
|
67
|
-
default:
|
|
68
|
-
m(
|
|
67
|
+
default: o(() => [
|
|
68
|
+
m(C, {
|
|
69
69
|
class: "flex-1",
|
|
70
70
|
columns: ["32px", "", ""],
|
|
71
|
-
data:
|
|
71
|
+
data: v.value,
|
|
72
72
|
environment: e.environment,
|
|
73
73
|
exampleKey: e.exampleKey,
|
|
74
74
|
globalRoute: e.globalRoute,
|
|
75
75
|
invalidParams: e.invalidParams,
|
|
76
76
|
label: e.label,
|
|
77
77
|
showAddRowPlaceholder: e.showAddRowPlaceholder,
|
|
78
|
-
onAddRow: t[1] || (t[1] = (
|
|
79
|
-
onDeleteRow: t[2] || (t[2] = (
|
|
80
|
-
onUpdateRow: t[3] || (t[3] = (
|
|
78
|
+
onAddRow: t[1] || (t[1] = (l) => n("add", l)),
|
|
79
|
+
onDeleteRow: t[2] || (t[2] = (l) => n("delete", { index: l })),
|
|
80
|
+
onUpdateRow: t[3] || (t[3] = (l, R) => n("update", { index: l, payload: R }))
|
|
81
81
|
}, null, 8, ["data", "environment", "exampleKey", "globalRoute", "invalidParams", "label", "showAddRowPlaceholder"])
|
|
82
82
|
]),
|
|
83
83
|
_: 1
|
|
@@ -13,29 +13,29 @@ type __VLS_Props = {
|
|
|
13
13
|
};
|
|
14
14
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
15
|
updateRow: (index: number, payload: Partial<{
|
|
16
|
-
|
|
16
|
+
name: string;
|
|
17
17
|
value: string;
|
|
18
18
|
isDisabled: boolean;
|
|
19
19
|
}>) => any;
|
|
20
20
|
addRow: (payload: Partial<{
|
|
21
|
-
|
|
21
|
+
name: string;
|
|
22
22
|
value: string;
|
|
23
23
|
}>) => any;
|
|
24
24
|
deleteRow: (index: number) => any;
|
|
25
|
-
uploadFile: (index
|
|
25
|
+
uploadFile: (index: number) => any;
|
|
26
26
|
removeFile: (index: number) => any;
|
|
27
27
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
28
|
onUpdateRow?: ((index: number, payload: Partial<{
|
|
29
|
-
|
|
29
|
+
name: string;
|
|
30
30
|
value: string;
|
|
31
31
|
isDisabled: boolean;
|
|
32
32
|
}>) => any) | undefined;
|
|
33
33
|
onAddRow?: ((payload: Partial<{
|
|
34
|
-
|
|
34
|
+
name: string;
|
|
35
35
|
value: string;
|
|
36
36
|
}>) => any) | undefined;
|
|
37
37
|
onDeleteRow?: ((index: number) => any) | undefined;
|
|
38
|
-
onUploadFile?: ((index
|
|
38
|
+
onUploadFile?: ((index: number) => any) | undefined;
|
|
39
39
|
onRemoveFile?: ((index: number) => any) | undefined;
|
|
40
40
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
41
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/components/RequestTable.vue"],"names":[],"mappings":"AAiKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAGnH,OAAwB,EACtB,KAAK,QAAQ,EACd,MAAM,0DAA0D,CAAA;AAOjE,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,WAAW,EAAE,kBAAkB,CAAA;CAChC,CAAC;;;cAmB2B,MAAM;eAAS,MAAM;oBAAc,OAAO;;;cAJ9B,MAAM;eAAS,MAAM;;;;;;;cAIjC,MAAM;eAAS,MAAM;oBAAc,OAAO;;;cAJ9B,MAAM;eAAS,MAAM;;;;;;AA4N9D,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./RequestTable.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const m = /* @__PURE__ */
|
|
3
|
+
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ o(e, [["__scopeId", "data-v-e07e86c7"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|