@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,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as B, computed as f, createBlock as
|
|
1
|
+
import { defineComponent as B, computed as f, createBlock as b, openBlock as r, unref as o, withCtx as n, createVNode as i, createElementBlock as D, createTextVNode as m, toDisplayString as s, Fragment as k, renderList as F } from "vue";
|
|
2
2
|
import U from "./RequestTableRow.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import x from "../../../components/data-table/DataTable.vue.js";
|
|
4
|
+
import C from "../../../components/data-table/DataTableRow.vue.js";
|
|
5
5
|
import c from "../../../components/data-table/DataTableHeader.vue.js";
|
|
6
|
-
const
|
|
6
|
+
const A = /* @__PURE__ */ B({
|
|
7
7
|
__name: "RequestTable",
|
|
8
8
|
props: {
|
|
9
9
|
data: {},
|
|
@@ -16,54 +16,52 @@ const V = /* @__PURE__ */ B({
|
|
|
16
16
|
environment: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["addRow", "updateRow", "deleteRow", "uploadFile", "removeFile"],
|
|
19
|
-
setup(
|
|
20
|
-
const l =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const e = a.data.at(-1);
|
|
26
|
-
return !e || e.name !== "" || e.value !== "" ? [...a.data, { name: "", value: "", isDisabled: !0 }] : a.data;
|
|
19
|
+
setup(e, { emit: w }) {
|
|
20
|
+
const l = w, h = f(() => e.showUploadButton ? ["36px", "", "", "auto"] : ["36px", "", ""]), R = f(() => {
|
|
21
|
+
if (!e.showAddRowPlaceholder)
|
|
22
|
+
return e.data;
|
|
23
|
+
const a = e.data.at(-1);
|
|
24
|
+
return !a || a.name !== "" || a.value !== "" ? [...e.data, { name: "", value: "", isDisabled: !0 }] : e.data;
|
|
27
25
|
}), v = ({
|
|
28
|
-
index:
|
|
29
|
-
payload:
|
|
26
|
+
index: a,
|
|
27
|
+
payload: u
|
|
30
28
|
}) => {
|
|
31
|
-
if (
|
|
32
|
-
l("addRow",
|
|
29
|
+
if (a >= e.data.length) {
|
|
30
|
+
l("addRow", u);
|
|
33
31
|
return;
|
|
34
32
|
}
|
|
35
|
-
l("updateRow",
|
|
33
|
+
l("updateRow", a, u);
|
|
36
34
|
};
|
|
37
|
-
return (
|
|
35
|
+
return (a, u) => (r(), b(o(x), {
|
|
38
36
|
class: "group/table flex-1",
|
|
39
37
|
columns: h.value
|
|
40
38
|
}, {
|
|
41
39
|
default: n(() => [
|
|
42
|
-
|
|
40
|
+
i(o(C), { class: "sr-only !block" }, {
|
|
43
41
|
default: n(() => [
|
|
44
|
-
|
|
42
|
+
i(o(c), null, {
|
|
45
43
|
default: n(() => [
|
|
46
|
-
s(
|
|
44
|
+
m(s(e.label) + " Enabled", 1)
|
|
47
45
|
]),
|
|
48
46
|
_: 1
|
|
49
47
|
}),
|
|
50
|
-
|
|
48
|
+
i(o(c), null, {
|
|
51
49
|
default: n(() => [
|
|
52
|
-
s(
|
|
50
|
+
m(s(e.label) + " Key", 1)
|
|
53
51
|
]),
|
|
54
52
|
_: 1
|
|
55
53
|
}),
|
|
56
|
-
|
|
54
|
+
i(o(c), null, {
|
|
57
55
|
default: n(() => [
|
|
58
|
-
s(
|
|
56
|
+
m(s(e.label) + " Value", 1)
|
|
59
57
|
]),
|
|
60
58
|
_: 1
|
|
61
59
|
})
|
|
62
60
|
]),
|
|
63
61
|
_: 1
|
|
64
62
|
}),
|
|
65
|
-
(
|
|
66
|
-
key:
|
|
63
|
+
(r(!0), D(k, null, F(R.value, (y, t) => (r(), b(U, {
|
|
64
|
+
key: t,
|
|
67
65
|
data: y,
|
|
68
66
|
environment: e.environment,
|
|
69
67
|
hasCheckboxDisabled: e.hasCheckboxDisabled,
|
|
@@ -71,10 +69,10 @@ const V = /* @__PURE__ */ B({
|
|
|
71
69
|
isReadOnly: e.isReadOnly,
|
|
72
70
|
label: e.label,
|
|
73
71
|
showUploadButton: e.showUploadButton,
|
|
74
|
-
onDeleteRow: (
|
|
75
|
-
onRemoveFile: (
|
|
76
|
-
onUpdateRow: (
|
|
77
|
-
onUploadFile: () =>
|
|
72
|
+
onDeleteRow: (d) => l("deleteRow", t),
|
|
73
|
+
onRemoveFile: (d) => l("removeFile", t),
|
|
74
|
+
onUpdateRow: (d) => v({ index: t, payload: d }),
|
|
75
|
+
onUploadFile: (d) => l("uploadFile", t)
|
|
78
76
|
}, null, 8, ["data", "environment", "hasCheckboxDisabled", "invalidParams", "isReadOnly", "label", "showUploadButton", "onDeleteRow", "onRemoveFile", "onUpdateRow", "onUploadFile"]))), 128))
|
|
79
77
|
]),
|
|
80
78
|
_: 1
|
|
@@ -82,5 +80,5 @@ const V = /* @__PURE__ */ B({
|
|
|
82
80
|
}
|
|
83
81
|
});
|
|
84
82
|
export {
|
|
85
|
-
|
|
83
|
+
A as default
|
|
86
84
|
};
|
|
@@ -20,7 +20,7 @@ export type TableRow = {
|
|
|
20
20
|
};
|
|
21
21
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
22
22
|
updateRow: (payload: Partial<{
|
|
23
|
-
|
|
23
|
+
name: string;
|
|
24
24
|
value: string;
|
|
25
25
|
isDisabled: boolean;
|
|
26
26
|
}>) => any;
|
|
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
29
29
|
removeFile: () => any;
|
|
30
30
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
31
|
onUpdateRow?: ((payload: Partial<{
|
|
32
|
-
|
|
32
|
+
name: string;
|
|
33
33
|
value: string;
|
|
34
34
|
isDisabled: boolean;
|
|
35
35
|
}>) => any) | undefined;
|
|
@@ -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":"AAkOA,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;;;cAhB4B,MAAM;eAAS,MAAM;oBAAc,OAAO;;;;;;;cAA1C,MAAM;eAAS,MAAM;oBAAc,OAAO;;;;;;AAifvE,wBAOG"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, computed as u, createBlock as s, openBlock as m, unref as t, normalizeClass as z, withCtx as i, createVNode as o, createCommentVNode as f, createElementVNode as r, createElementBlock as x, Fragment as D, toDisplayString as $ } from "vue";
|
|
2
2
|
import { ScalarTooltip as q, ScalarIcon as h, ScalarButton as y } from "@scalar/components";
|
|
3
3
|
import { ScalarIconTrash as I } from "@scalar/icons";
|
|
4
|
-
import { unpackProxyObject as
|
|
4
|
+
import { unpackProxyObject as c } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
5
5
|
import { RouterLink as U } from "vue-router";
|
|
6
6
|
import { getFileName as k } from "../helpers/files.js";
|
|
7
7
|
import { validateParameter as j } from "../helpers/validate-parameter.js";
|
|
8
8
|
import E from "./RequestTableTooltip.vue.js";
|
|
9
9
|
import N from "../../../components/data-table/DataTableRow.vue.js";
|
|
10
10
|
import O from "../../../components/data-table/DataTableCheckbox.vue.js";
|
|
11
|
-
import
|
|
11
|
+
import b from "../../../components/data-table/DataTableCell.vue.js";
|
|
12
12
|
import w from "../../../components/code-input/CodeInput.vue.js";
|
|
13
13
|
const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center justify-center overflow-hidden p-1" }, G = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "p-0.5"
|
|
16
|
-
}, ee = /* @__PURE__ */
|
|
16
|
+
}, ee = /* @__PURE__ */ p({
|
|
17
17
|
__name: "RequestTableRow",
|
|
18
18
|
props: {
|
|
19
19
|
data: {},
|
|
@@ -25,45 +25,45 @@ const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
|
|
|
25
25
|
showUploadButton: { type: Boolean }
|
|
26
26
|
},
|
|
27
27
|
emits: ["updateRow", "deleteRow", "uploadFile", "removeFile"],
|
|
28
|
-
setup(
|
|
29
|
-
const d = g, R =
|
|
30
|
-
() =>
|
|
31
|
-
), C =
|
|
32
|
-
() =>
|
|
33
|
-
),
|
|
34
|
-
() =>
|
|
35
|
-
),
|
|
36
|
-
() => j(
|
|
37
|
-
),
|
|
28
|
+
setup(e, { emit: g }) {
|
|
29
|
+
const d = g, R = u(() => e.data.schema?.default), V = u(() => e.data.schema?.enum), B = u(
|
|
30
|
+
() => e.data.schema && "minimum" in e.data.schema ? e.data.schema.minimum : void 0
|
|
31
|
+
), C = u(
|
|
32
|
+
() => e.data.schema && "maximum" in e.data.schema ? e.data.schema.maximum : void 0
|
|
33
|
+
), F = u(
|
|
34
|
+
() => e.data.schema && "type" in e.data.schema ? e.data.schema.type : void 0
|
|
35
|
+
), v = u(
|
|
36
|
+
() => j(e.data.schema, e.data.value)
|
|
37
|
+
), S = (n) => n instanceof File, T = u({
|
|
38
38
|
get: () => {
|
|
39
|
-
const
|
|
40
|
-
return
|
|
39
|
+
const n = c(e.data.value);
|
|
40
|
+
return n instanceof File ? k(c(e.data.value)) ?? "" : n === null ? "" : n;
|
|
41
41
|
},
|
|
42
|
-
set: (
|
|
43
|
-
typeof
|
|
42
|
+
set: (n) => {
|
|
43
|
+
typeof n == "string" && d("updateRow", { value: n });
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
-
return (
|
|
46
|
+
return (n, a) => (m(), s(t(N), {
|
|
47
47
|
id: e.data.name,
|
|
48
48
|
class: z({
|
|
49
|
-
alert:
|
|
50
|
-
error:
|
|
49
|
+
alert: v.value.ok === !1,
|
|
50
|
+
error: v.value.ok === !1 && e.invalidParams?.has(e.data.name)
|
|
51
51
|
})
|
|
52
52
|
}, {
|
|
53
|
-
default:
|
|
54
|
-
e.data.globalRoute !== void 0 ? (
|
|
53
|
+
default: i(() => [
|
|
54
|
+
e.data.globalRoute !== void 0 ? (m(), s(t(U), {
|
|
55
55
|
key: 0,
|
|
56
56
|
class: "text-c-2 flex items-center justify-center border-t !border-r",
|
|
57
57
|
to: e.data.globalRoute ?? {}
|
|
58
58
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
a[7] || (a[7] =
|
|
61
|
-
|
|
59
|
+
default: i(() => [
|
|
60
|
+
a[7] || (a[7] = r("span", { class: "sr-only" }, "Global", -1)),
|
|
61
|
+
o(t(q), {
|
|
62
62
|
content: "Global cookies are shared across the whole workspace.",
|
|
63
63
|
placement: "top"
|
|
64
64
|
}, {
|
|
65
|
-
default:
|
|
66
|
-
|
|
65
|
+
default: i(() => [
|
|
66
|
+
o(t(h), {
|
|
67
67
|
class: "text-c-1",
|
|
68
68
|
icon: "Globe",
|
|
69
69
|
size: "xs",
|
|
@@ -74,16 +74,16 @@ const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
|
|
|
74
74
|
})
|
|
75
75
|
]),
|
|
76
76
|
_: 1
|
|
77
|
-
}, 8, ["to"])) : (
|
|
77
|
+
}, 8, ["to"])) : (m(), s(t(O), {
|
|
78
78
|
key: 1,
|
|
79
79
|
class: "!border-r",
|
|
80
80
|
disabled: e.hasCheckboxDisabled ?? !1,
|
|
81
81
|
modelValue: !e.data.isDisabled,
|
|
82
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
82
|
+
"onUpdate:modelValue": a[0] || (a[0] = (l) => d("updateRow", { isDisabled: !l }))
|
|
83
83
|
}, null, 8, ["disabled", "modelValue"])),
|
|
84
|
-
|
|
85
|
-
default:
|
|
86
|
-
|
|
84
|
+
o(t(b), null, {
|
|
85
|
+
default: i(() => [
|
|
86
|
+
o(t(w), {
|
|
87
87
|
"aria-label": `${e.label} Key`,
|
|
88
88
|
disableCloseBrackets: "",
|
|
89
89
|
disabled: e.isReadOnly,
|
|
@@ -94,15 +94,15 @@ const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
|
|
|
94
94
|
modelValue: e.data.name,
|
|
95
95
|
placeholder: "Key",
|
|
96
96
|
required: !!e.data.isRequired,
|
|
97
|
-
onSelectVariable: a[1] || (a[1] = (
|
|
98
|
-
"onUpdate:modelValue": a[2] || (a[2] = (
|
|
97
|
+
onSelectVariable: a[1] || (a[1] = (l) => d("updateRow", { name: l })),
|
|
98
|
+
"onUpdate:modelValue": a[2] || (a[2] = (l) => d("updateRow", { name: l }))
|
|
99
99
|
}, null, 8, ["aria-label", "disabled", "environment", "modelValue", "required"])
|
|
100
100
|
]),
|
|
101
101
|
_: 1
|
|
102
102
|
}),
|
|
103
|
-
|
|
104
|
-
default:
|
|
105
|
-
|
|
103
|
+
o(t(b), null, {
|
|
104
|
+
default: i(() => [
|
|
105
|
+
o(t(w), {
|
|
106
106
|
"aria-label": `${e.label} Value`,
|
|
107
107
|
class: "pr-6 group-hover:pr-10 group-has-[.cm-focused]:pr-10",
|
|
108
108
|
default: R.value,
|
|
@@ -112,64 +112,64 @@ const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
|
|
|
112
112
|
disableTabIndent: "",
|
|
113
113
|
enum: V.value ?? [],
|
|
114
114
|
environment: e.environment,
|
|
115
|
-
examples: e.data.schema?.examples?.map((
|
|
115
|
+
examples: e.data.schema?.examples?.map((l) => String(l)) ?? [],
|
|
116
116
|
lineWrapping: "",
|
|
117
117
|
max: C.value,
|
|
118
118
|
min: B.value,
|
|
119
|
-
modelValue:
|
|
119
|
+
modelValue: T.value,
|
|
120
120
|
placeholder: "Value",
|
|
121
|
-
type:
|
|
122
|
-
"onUpdate:modelValue": a[4] || (a[4] = (
|
|
121
|
+
type: F.value,
|
|
122
|
+
"onUpdate:modelValue": a[4] || (a[4] = (l) => d("updateRow", { value: l }))
|
|
123
123
|
}, {
|
|
124
|
-
icon:
|
|
125
|
-
(e.data.name || e.data.value) && !e.data.isRequired ? (
|
|
124
|
+
icon: i(() => [
|
|
125
|
+
(e.data.name || e.data.value) && !e.data.isRequired ? (m(), s(t(y), {
|
|
126
126
|
key: 0,
|
|
127
127
|
class: "text-c-2 hover:text-c-1 hover:bg-b-2 z-context -mr-0.5 hidden h-fit rounded p-1 group-hover:flex group-has-[.cm-focused]:flex",
|
|
128
128
|
size: "sm",
|
|
129
129
|
variant: "ghost",
|
|
130
|
-
onClick: a[3] || (a[3] = (
|
|
130
|
+
onClick: a[3] || (a[3] = (l) => d("deleteRow"))
|
|
131
131
|
}, {
|
|
132
|
-
default:
|
|
133
|
-
|
|
132
|
+
default: i(() => [
|
|
133
|
+
o(t(I), { class: "size-3.5" })
|
|
134
134
|
]),
|
|
135
135
|
_: 1
|
|
136
|
-
})) :
|
|
137
|
-
e.data.schema ? (
|
|
136
|
+
})) : f("", !0),
|
|
137
|
+
e.data.schema ? (m(), s(E, {
|
|
138
138
|
key: 1,
|
|
139
139
|
description: e.data.description,
|
|
140
140
|
schema: e.data.schema,
|
|
141
141
|
value: e.data.value
|
|
142
|
-
}, null, 8, ["description", "schema", "value"])) :
|
|
142
|
+
}, null, 8, ["description", "schema", "value"])) : f("", !0)
|
|
143
143
|
]),
|
|
144
144
|
_: 1
|
|
145
145
|
}, 8, ["aria-label", "default", "disabled", "enum", "environment", "examples", "max", "min", "modelValue", "type"])
|
|
146
146
|
]),
|
|
147
147
|
_: 1
|
|
148
148
|
}),
|
|
149
|
-
e.showUploadButton ? (
|
|
149
|
+
e.showUploadButton ? (m(), s(t(b), {
|
|
150
150
|
key: 2,
|
|
151
151
|
class: "group/upload flex items-center justify-center whitespace-nowrap"
|
|
152
152
|
}, {
|
|
153
|
-
default:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
default: i(() => [
|
|
154
|
+
S(t(c)(e.data.value)) ? (m(), x(D, { key: 0 }, [
|
|
155
|
+
r("div", P, [
|
|
156
|
+
r("span", null, $(t(k)(t(c)(e.data.value))), 1)
|
|
157
157
|
]),
|
|
158
|
-
|
|
158
|
+
r("button", {
|
|
159
159
|
class: "bg-b-2 centered-x centered-y absolute hidden w-[calc(100%_-_8px)] rounded p-0.5 text-center text-xs font-medium group-hover/upload:block",
|
|
160
160
|
type: "button",
|
|
161
|
-
onClick: a[5] || (a[5] = (
|
|
161
|
+
onClick: a[5] || (a[5] = (l) => d("removeFile"))
|
|
162
162
|
}, " Delete ")
|
|
163
|
-
], 64)) : (
|
|
164
|
-
|
|
163
|
+
], 64)) : (m(), x("div", G, [
|
|
164
|
+
o(t(y), {
|
|
165
165
|
class: "bg-b-2 hover:bg-b-3 text-c-2 h-fit border-0 py-px shadow-none",
|
|
166
166
|
size: "sm",
|
|
167
167
|
variant: "outlined",
|
|
168
|
-
onClick: a[6] || (a[6] = (
|
|
168
|
+
onClick: a[6] || (a[6] = (l) => d("uploadFile"))
|
|
169
169
|
}, {
|
|
170
|
-
default:
|
|
171
|
-
a[8] || (a[8] =
|
|
172
|
-
|
|
170
|
+
default: i(() => [
|
|
171
|
+
a[8] || (a[8] = r("span", null, "Select File", -1)),
|
|
172
|
+
o(t(h), {
|
|
173
173
|
class: "ml-1",
|
|
174
174
|
icon: "Upload",
|
|
175
175
|
size: "xs",
|
|
@@ -181,7 +181,7 @@ const P = { class: "text-c-2 filemask flex w-full max-w-[100%] items-center just
|
|
|
181
181
|
]))
|
|
182
182
|
]),
|
|
183
183
|
_: 1
|
|
184
|
-
})) :
|
|
184
|
+
})) : f("", !0)
|
|
185
185
|
]),
|
|
186
186
|
_: 1
|
|
187
187
|
}, 8, ["id", "class"]));
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarPopover as
|
|
3
|
-
import { ScalarIconWarning as v, ScalarIconInfo as
|
|
4
|
-
import { validateParameter as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as d, computed as l, createBlock as m, openBlock as t, unref as s, withCtx as r, createElementVNode as u, createElementBlock as a, createCommentVNode as n, toDisplayString as c } from "vue";
|
|
2
|
+
import { ScalarPopover as h, ScalarMarkdown as f } from "@scalar/components";
|
|
3
|
+
import { ScalarIconWarning as v, ScalarIconInfo as x } from "@scalar/icons";
|
|
4
|
+
import { validateParameter as k } from "../helpers/validate-parameter.js";
|
|
5
|
+
const y = ["aria-label", "role"], g = { class: "w-content text-xxs text-c-1 grid min-w-48 gap-1.5 rounded px-1.5 pt-2 pb-1.5 leading-none" }, b = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "text-error-1"
|
|
8
|
-
},
|
|
8
|
+
}, I = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "schema text-c-2 flex items-center"
|
|
11
|
-
},
|
|
11
|
+
}, w = { key: 0 }, S = { key: 1 }, B = { key: 2 }, C = { key: 3 }, M = { key: 4 }, q = /* @__PURE__ */ d({
|
|
12
12
|
__name: "RequestTableTooltip",
|
|
13
13
|
props: {
|
|
14
14
|
schema: {},
|
|
15
15
|
value: {},
|
|
16
16
|
description: {}
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
return (
|
|
18
|
+
setup(e) {
|
|
19
|
+
const o = l(() => k(e.schema, e.value)), i = l(() => o.value.ok === !1);
|
|
20
|
+
return (P, z) => (t(), m(s(h), {
|
|
21
21
|
offset: 4,
|
|
22
22
|
placement: "left",
|
|
23
23
|
teleport: ""
|
|
24
24
|
}, {
|
|
25
|
-
popover:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"type" in e.schema ? (
|
|
29
|
-
"format" in e.schema ? (
|
|
30
|
-
"minimum" in e.schema ? (
|
|
31
|
-
"maximum" in e.schema ? (
|
|
32
|
-
"default" in e.schema ? (
|
|
33
|
-
])) :
|
|
34
|
-
e.description && !
|
|
25
|
+
popover: r(() => [
|
|
26
|
+
u("div", g, [
|
|
27
|
+
o.value.ok === !1 ? (t(), a("div", b, c(o.value.message), 1)) : e.schema && ("type" in e.schema || "format" in e.schema || "minimum" in e.schema || "maximum" in e.schema || "default" in e.schema) ? (t(), a("div", I, [
|
|
28
|
+
"type" in e.schema ? (t(), a("span", w, c(e.schema.type), 1)) : n("", !0),
|
|
29
|
+
"format" in e.schema ? (t(), a("span", S, c(e.schema.format), 1)) : n("", !0),
|
|
30
|
+
"minimum" in e.schema ? (t(), a("span", B, "min: " + c(e.schema.minimum), 1)) : n("", !0),
|
|
31
|
+
"maximum" in e.schema ? (t(), a("span", C, "max: " + c(e.schema.maximum), 1)) : n("", !0),
|
|
32
|
+
"default" in e.schema ? (t(), a("span", M, "default: " + c(e.schema.default), 1)) : n("", !0)
|
|
33
|
+
])) : n("", !0),
|
|
34
|
+
e.description && !i.value ? (t(), m(s(f), {
|
|
35
35
|
key: 2,
|
|
36
36
|
class: "max-w-[16rem]",
|
|
37
37
|
value: e.description
|
|
38
|
-
}, null, 8, ["value"])) :
|
|
38
|
+
}, null, 8, ["value"])) : n("", !0)
|
|
39
39
|
])
|
|
40
40
|
]),
|
|
41
|
-
default:
|
|
42
|
-
|
|
43
|
-
"aria-label":
|
|
41
|
+
default: r(() => [
|
|
42
|
+
u("button", {
|
|
43
|
+
"aria-label": i.value ? "Input is invalid" : "More Information",
|
|
44
44
|
class: "text-c-2 hover:text-c-1 hover:bg-b-2 rounded p-1",
|
|
45
|
-
role:
|
|
45
|
+
role: i.value ? "alert" : "none",
|
|
46
46
|
type: "button"
|
|
47
47
|
}, [
|
|
48
|
-
|
|
48
|
+
i.value ? (t(), m(s(v), {
|
|
49
49
|
key: 0,
|
|
50
50
|
class: "text-orange size-3.5 brightness-90 hover:brightness-75"
|
|
51
|
-
})) : (
|
|
51
|
+
})) : (t(), m(s(x), {
|
|
52
52
|
key: 1,
|
|
53
53
|
class: "text-c-2 hover:text-c-1 size-3.5"
|
|
54
54
|
}))
|
|
55
|
-
], 8,
|
|
55
|
+
], 8, y)
|
|
56
56
|
]),
|
|
57
57
|
_: 1
|
|
58
58
|
}));
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
export {
|
|
62
|
-
|
|
62
|
+
q as default
|
|
63
63
|
};
|
|
@@ -4,7 +4,7 @@ type ParameterType = 'path' | 'cookie' | 'header' | 'query';
|
|
|
4
4
|
/** Create parameter event handlers for a given type */
|
|
5
5
|
export declare const createParameterHandlers: (type: ParameterType, eventBus: WorkspaceEventBus, meta: OperationExampleMeta) => {
|
|
6
6
|
add: (payload: {
|
|
7
|
-
|
|
7
|
+
name?: string;
|
|
8
8
|
value?: string;
|
|
9
9
|
}) => void;
|
|
10
10
|
delete: (payload: {
|
|
@@ -14,7 +14,7 @@ export declare const createParameterHandlers: (type: ParameterType, eventBus: Wo
|
|
|
14
14
|
update: (payload: {
|
|
15
15
|
index: number;
|
|
16
16
|
payload: Partial<{
|
|
17
|
-
|
|
17
|
+
name: string;
|
|
18
18
|
value: string;
|
|
19
19
|
isDisabled: boolean;
|
|
20
20
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-parameter-handlers.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/create-parameter-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAE5E,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE3D,uDAAuD;AACvD,eAAO,MAAM,uBAAuB,GAClC,MAAM,aAAa,EACnB,UAAU,iBAAiB,EAC3B,MAAM,oBAAoB;mBAEX;QAAE,
|
|
1
|
+
{"version":3,"file":"create-parameter-handlers.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/create-parameter-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAE5E,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE3D,uDAAuD;AACvD,eAAO,MAAM,uBAAuB,GAClC,MAAM,aAAa,EACnB,UAAU,iBAAiB,EAC3B,MAAM,oBAAoB;mBAEX;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;sBAU9B;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;;sBAWjB;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,OAAO,CAAA;SAAE,CAAC,CAAA;KAAE;CAY3G,CAAA"}
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
const
|
|
2
|
-
add: (e) =>
|
|
1
|
+
const t = (a, r, d) => ({
|
|
2
|
+
add: (e) => r.emit("operation:add:parameter", {
|
|
3
3
|
type: a,
|
|
4
4
|
payload: {
|
|
5
|
-
|
|
5
|
+
name: e.name ?? "",
|
|
6
6
|
value: e.value ?? "",
|
|
7
7
|
isDisabled: !1
|
|
8
8
|
},
|
|
9
|
-
meta:
|
|
9
|
+
meta: d
|
|
10
10
|
}),
|
|
11
|
-
delete: (e) =>
|
|
11
|
+
delete: (e) => r.emit("operation:delete:parameter", {
|
|
12
12
|
type: a,
|
|
13
13
|
index: e.index,
|
|
14
|
-
meta:
|
|
14
|
+
meta: d
|
|
15
15
|
}),
|
|
16
|
-
deleteAll: () =>
|
|
16
|
+
deleteAll: () => r.emit("operation:delete-all:parameters", {
|
|
17
17
|
type: a,
|
|
18
|
-
meta:
|
|
18
|
+
meta: d
|
|
19
19
|
}),
|
|
20
|
-
update: (e) =>
|
|
20
|
+
update: (e) => r.emit(
|
|
21
21
|
"operation:update:parameter",
|
|
22
22
|
{
|
|
23
23
|
type: a,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
meta: r
|
|
24
|
+
...e,
|
|
25
|
+
meta: d
|
|
27
26
|
},
|
|
28
27
|
{
|
|
29
28
|
debounceKey: `update:parameter-${a}-${e.index}-${Object.keys(e.payload).join("-")}`
|
|
@@ -31,5 +30,5 @@ const i = (a, d, r) => ({
|
|
|
31
30
|
)
|
|
32
31
|
});
|
|
33
32
|
export {
|
|
34
|
-
|
|
33
|
+
t as createParameterHandlers
|
|
35
34
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ExampleObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
+
/** Build the table rows for the form data */
|
|
3
|
+
export declare const getFormBodyRows: (example: ExampleObject | undefined | null, contentType: string) => {
|
|
4
|
+
name: string;
|
|
5
|
+
value: any;
|
|
6
|
+
isDisabled: boolean;
|
|
7
|
+
}[];
|
|
8
|
+
//# sourceMappingURL=get-form-body-rows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-form-body-rows.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-form-body-rows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAEjG,6CAA6C;AAC7C,eAAO,MAAM,eAAe,GAAI,SAAS,aAAa,GAAG,SAAS,GAAG,IAAI,EAAE,aAAa,MAAM;;;;GA4B7F,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { objectEntries as i } from "@scalar/helpers/object/object-entries";
|
|
2
|
+
const e = (r, t) => !r?.value || t !== "multipart/form-data" && t !== "application/x-www-form-urlencoded" ? [] : Array.isArray(r.value) ? r.value : typeof r.value == "object" && r.value ? i(r.value).map(([o, a]) => ({
|
|
3
|
+
name: String(o),
|
|
4
|
+
value: a,
|
|
5
|
+
isDisabled: !1
|
|
6
|
+
})) : [];
|
|
7
|
+
export {
|
|
8
|
+
e as getFormBodyRows
|
|
9
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { ExampleObject, RequestBodyObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Basically getExample + we generate an example from the schema if no example is found
|
|
4
|
+
*/
|
|
3
5
|
export declare const getExampleFromBody: (requestBody: RequestBodyObject, contentType: string, exampleKey: string) => ExampleObject | null;
|
|
4
6
|
//# sourceMappingURL=get-request-body-example.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-request-body-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-request-body-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;
|
|
1
|
+
{"version":3,"file":"get-request-body-example.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/request-block/helpers/get-request-body-example.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAA;AAKpH;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,aAAa,iBAAiB,EAC9B,aAAa,MAAM,EACnB,YAAY,MAAM,KACjB,aAAa,GAAG,IAqBlB,CAAA"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { getResolvedRef as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { getResolvedRef as a } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
2
|
+
import { getExample as c } from "../../operation-block/helpers/get-example.js";
|
|
3
|
+
import { getExampleFromSchema as p } from "../../operation-code-sample/helpers/get-example-from-schema.js";
|
|
4
|
+
const u = (e, t, n) => {
|
|
5
|
+
const l = e.content?.[t], m = c(e, n, t);
|
|
6
|
+
if (m)
|
|
7
|
+
return m;
|
|
8
|
+
const o = a(l?.schema);
|
|
8
9
|
if (!o)
|
|
9
10
|
return null;
|
|
10
|
-
const r =
|
|
11
|
+
const r = p(o, { mode: "write" });
|
|
11
12
|
return r ? { value: r } : null;
|
|
12
13
|
};
|
|
13
14
|
export {
|