@scalar/api-client 3.19.3 → 3.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +79 -0
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts +2 -2
- package/dist/components/HttpMethod/HttpMethod.vue.d.ts.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.js.map +1 -1
- package/dist/components/HttpMethod/HttpMethod.vue.script.js +15 -7
- package/dist/components/HttpMethod/HttpMethod.vue.script.js.map +1 -1
- package/dist/components/SectionFilter.vue.d.ts +2 -0
- package/dist/components/SectionFilter.vue.d.ts.map +1 -1
- package/dist/components/SectionFilter.vue.js +1 -1
- package/dist/components/SectionFilter.vue.js.map +1 -1
- package/dist/components/SectionFilter.vue.script.js +11 -8
- package/dist/components/SectionFilter.vue.script.js.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.js.map +1 -1
- package/dist/components/Server/ServerVariablesSelect.vue.script.js +5 -3
- package/dist/components/Server/ServerVariablesSelect.vue.script.js.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.d.ts.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.js.map +1 -1
- package/dist/components/Server/ServerVariablesTextbox.vue.script.js +6 -3
- package/dist/components/Server/ServerVariablesTextbox.vue.script.js.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js.map +1 -1
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js +4 -2
- package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.script.js.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js.map +1 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js +3 -1
- package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.script.js.map +1 -1
- package/dist/style.css +164 -141
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +3 -2
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js +16 -3
- package/dist/v2/blocks/operation-block/OperationBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +1 -2
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js +10 -6
- package/dist/v2/blocks/operation-block/components/Header.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.js.map +1 -1
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js +6 -3
- package/dist/v2/blocks/operation-block/components/OpenApiClientButton.vue.script.js.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -2
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -2
- package/dist/v2/blocks/operation-block/helpers/send-request.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/send-request.js +4 -3
- package/dist/v2/blocks/operation-block/helpers/send-request.js.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +3 -2
- package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js +59 -26
- package/dist/v2/blocks/request-block/RequestBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js +28 -8
- package/dist/v2/blocks/request-block/components/RequestBody.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js +9 -3
- package/dist/v2/blocks/request-block/components/RequestBodyStructured.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js +6 -4
- package/dist/v2/blocks/request-block/components/RequestBodyViewToggle.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js +13 -4
- package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +2 -0
- package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js +14 -7
- package/dist/v2/blocks/request-block/components/RequestParams.vue.script.js.map +1 -1
- 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 +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js +40 -7
- package/dist/v2/blocks/request-block/components/RequestTable.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts +16 -16
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js +24 -20
- package/dist/v2/blocks/request-block/components/RequestTableRow.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js.map +1 -1
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js +6 -4
- package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.script.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js +14 -6
- package/dist/v2/blocks/request-block/helpers/create-parameter-rows.js.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts.map +1 -1
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +5 -4
- package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js +34 -13
- package/dist/v2/blocks/response-block/ResponseBlock.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.d.ts +3 -3
- package/dist/v2/blocks/response-block/components/Headers.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/Headers.vue.script.js +5 -3
- package/dist/v2/blocks/response-block/components/Headers.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js +3 -1
- package/dist/v2/blocks/response-block/components/ResponseBody.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js +11 -3
- package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js +8 -6
- package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts +1 -0
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js +109 -56
- package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js +5 -3
- package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js +6 -3
- package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js +7 -5
- package/dist/v2/blocks/response-block/components/ResponseCookies.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +2 -2
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js +20 -15
- package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js +4 -2
- package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js.map +1 -1
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js +11 -6
- package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.script.js.map +1 -1
- package/dist/v2/blocks/response-block/helpers/response-stream-multipart.d.ts +4 -0
- package/dist/v2/blocks/response-block/helpers/response-stream-multipart.d.ts.map +1 -0
- package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js +100 -0
- package/dist/v2/blocks/response-block/helpers/response-stream-multipart.js.map +1 -0
- package/dist/v2/blocks/response-block/helpers/response-stream.d.ts +13 -0
- package/dist/v2/blocks/response-block/helpers/response-stream.d.ts.map +1 -0
- package/dist/v2/blocks/response-block/helpers/response-stream.js +97 -0
- package/dist/v2/blocks/response-block/helpers/response-stream.js.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -3
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js +41 -29
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts +6 -7
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js +7 -4
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js +21 -16
- package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.script.js.map +1 -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.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js +7 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js +7 -5
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js +105 -40
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js +10 -8
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js +20 -14
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js +6 -4
- package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js +3 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js +40 -40
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.script.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts +108 -7
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +12 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js +8 -5
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-oauth2-metadata.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.d.ts +3 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.js +8 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-allowed-oauth-url.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.d.ts +3 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.js +11 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-client-authorization.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts +19 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js +117 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth-device-authorization.js.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -1
- 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 +15 -11
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.d.ts +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.js +8 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth2-metadata-to-flows.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +6 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +2 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +8 -6
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +4 -4
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.js.map +1 -1
- package/dist/v2/components/code-input/CodeInput.vue.script.js +10 -10
- package/dist/v2/components/code-input/CodeInput.vue.script.js.map +1 -1
- package/dist/v2/components/code-input/CodeInputLite.vue.d.ts +4 -4
- package/dist/v2/components/code-input/CodeInputLite.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/CodeInputLite.vue.js +1 -1
- package/dist/v2/components/code-input/CodeInputLite.vue.js.map +1 -1
- package/dist/v2/components/code-input/CodeInputLite.vue.script.js +8 -5
- package/dist/v2/components/code-input/CodeInputLite.vue.script.js.map +1 -1
- package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts +4 -0
- package/dist/v2/components/code-input/PillTooltipHost.vue.d.ts.map +1 -1
- package/dist/v2/components/code-input/PillTooltipHost.vue.js.map +1 -1
- package/dist/v2/components/code-input/PillTooltipHost.vue.script.js +7 -3
- package/dist/v2/components/code-input/PillTooltipHost.vue.script.js.map +1 -1
- package/dist/v2/components/code-input/code-variable-widget.d.ts +3 -0
- package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -1
- package/dist/v2/components/code-input/code-variable-widget.js +6 -3
- package/dist/v2/components/code-input/code-variable-widget.js.map +1 -1
- package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTable.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTable.vue.script.js +2 -1
- package/dist/v2/components/data-table/DataTable.vue.script.js.map +1 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts +0 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js +4 -2
- package/dist/v2/components/data-table/DataTableCheckbox.vue.script.js.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.js +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableInput.vue.script.js +5 -3
- package/dist/v2/components/data-table/DataTableInput.vue.script.js.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js.map +1 -1
- package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js +12 -9
- package/dist/v2/components/data-table/DataTableInputSelect.vue.script.js.map +1 -1
- package/dist/v2/components/forms/ConfirmationForm.vue.d.ts.map +1 -1
- package/dist/v2/components/forms/ConfirmationForm.vue.js.map +1 -1
- package/dist/v2/components/forms/ConfirmationForm.vue.script.js +5 -3
- package/dist/v2/components/forms/ConfirmationForm.vue.script.js.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.d.ts.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.js.map +1 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.script.js +3 -1
- package/dist/v2/components/layout/CollapsibleSection.vue.script.js.map +1 -1
- package/dist/v2/components/modals/DeleteModal.vue.d.ts.map +1 -1
- package/dist/v2/components/modals/DeleteModal.vue.js.map +1 -1
- package/dist/v2/components/modals/DeleteModal.vue.script.js +3 -1
- package/dist/v2/components/modals/DeleteModal.vue.script.js.map +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.d.ts.map +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.js +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.js.map +1 -1
- package/dist/v2/components/modals/ModalClientContainer.vue.script.js +5 -2
- package/dist/v2/components/modals/ModalClientContainer.vue.script.js.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.js.map +1 -1
- package/dist/v2/components/server/ServerDropdown.vue.script.js +9 -5
- package/dist/v2/components/server/ServerDropdown.vue.script.js.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.script.js +4 -2
- package/dist/v2/components/sidebar/Sidebar.vue.script.js.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.js.map +1 -1
- package/dist/v2/components/sidebar/SidebarMenu.vue.script.js +4 -2
- package/dist/v2/components/sidebar/SidebarMenu.vue.script.js.map +1 -1
- package/dist/v2/components/sidebar/SidebarToggle.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/SidebarToggle.vue.js.map +1 -1
- package/dist/v2/components/sidebar/SidebarToggle.vue.script.js +4 -2
- package/dist/v2/components/sidebar/SidebarToggle.vue.script.js.map +1 -1
- package/dist/v2/constants.js +1 -1
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.d.ts.map +1 -1
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js +4 -2
- package/dist/v2/features/command-palette/components/CommandActionForm.vue.script.js.map +1 -1
- package/dist/v2/features/command-palette/components/CommandActionInput.vue.d.ts +2 -2
- package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.js.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.script.js +4 -2
- package/dist/v2/features/environments/EnvironmentsList.vue.script.js.map +1 -1
- package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/Environment.vue.js.map +1 -1
- package/dist/v2/features/environments/components/Environment.vue.script.js +12 -10
- package/dist/v2/features/environments/components/Environment.vue.script.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js +5 -3
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.script.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js +9 -6
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.script.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js +6 -4
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.script.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js +22 -10
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.script.js.map +1 -1
- package/dist/v2/features/localization/index.d.ts +18 -0
- package/dist/v2/features/localization/index.d.ts.map +1 -0
- package/dist/v2/features/localization/index.js +35 -0
- package/dist/v2/features/localization/index.js.map +1 -0
- package/dist/v2/features/localization/locales/ar.d.ts +389 -0
- package/dist/v2/features/localization/locales/ar.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/ar.js +351 -0
- package/dist/v2/features/localization/locales/ar.js.map +1 -0
- package/dist/v2/features/localization/locales/de.d.ts +389 -0
- package/dist/v2/features/localization/locales/de.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/de.js +351 -0
- package/dist/v2/features/localization/locales/de.js.map +1 -0
- package/dist/v2/features/localization/locales/es.d.ts +389 -0
- package/dist/v2/features/localization/locales/es.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/es.js +351 -0
- package/dist/v2/features/localization/locales/es.js.map +1 -0
- package/dist/v2/features/localization/locales/fr.d.ts +389 -0
- package/dist/v2/features/localization/locales/fr.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/fr.js +351 -0
- package/dist/v2/features/localization/locales/fr.js.map +1 -0
- package/dist/v2/features/localization/locales/pt.d.ts +389 -0
- package/dist/v2/features/localization/locales/pt.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/pt.js +351 -0
- package/dist/v2/features/localization/locales/pt.js.map +1 -0
- package/dist/v2/features/localization/locales/ru.d.ts +389 -0
- package/dist/v2/features/localization/locales/ru.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/ru.js +351 -0
- package/dist/v2/features/localization/locales/ru.js.map +1 -0
- package/dist/v2/features/localization/locales/zh-cn.d.ts +389 -0
- package/dist/v2/features/localization/locales/zh-cn.d.ts.map +1 -0
- package/dist/v2/features/localization/locales/zh-cn.js +351 -0
- package/dist/v2/features/localization/locales/zh-cn.js.map +1 -0
- package/dist/v2/features/localization/translations.d.ts +389 -0
- package/dist/v2/features/localization/translations.d.ts.map +1 -0
- package/dist/v2/features/localization/translations.js +351 -0
- package/dist/v2/features/localization/translations.js.map +1 -0
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -2
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js.map +1 -1
- package/dist/v2/features/modal/Modal.vue.script.js +15 -4
- package/dist/v2/features/modal/Modal.vue.script.js.map +1 -1
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts +2 -3
- package/dist/v2/features/modal/helpers/resolve-route-parameters.d.ts.map +1 -1
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js +8 -7
- package/dist/v2/features/modal/helpers/resolve-route-parameters.js.map +1 -1
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +2 -3
- package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts.map +1 -1
- package/dist/v2/features/modal/hooks/use-modal-sidebar.js.map +1 -1
- package/dist/v2/features/modal/use-lazy-api-client.d.ts +11 -0
- package/dist/v2/features/modal/use-lazy-api-client.d.ts.map +1 -0
- package/dist/v2/features/modal/use-lazy-api-client.js +48 -0
- package/dist/v2/features/modal/use-lazy-api-client.js.map +1 -0
- package/dist/v2/features/operation/Operation.vue.d.ts +1 -2
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js.map +1 -1
- package/dist/v2/features/operation/Operation.vue.script.js +22 -6
- package/dist/v2/features/operation/Operation.vue.script.js.map +1 -1
- package/dist/v2/features/search/components/DocumentSearchModal.vue.d.ts.map +1 -1
- package/dist/v2/features/search/components/DocumentSearchModal.vue.js +1 -1
- package/dist/v2/features/search/components/DocumentSearchModal.vue.js.map +1 -1
- package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js +12 -8
- package/dist/v2/features/search/components/DocumentSearchModal.vue.script.js.map +1 -1
- package/dist/v2/features/search/components/SearchResult.vue.d.ts.map +1 -1
- package/dist/v2/features/search/components/SearchResult.vue.js.map +1 -1
- package/dist/v2/features/search/components/SearchResult.vue.script.js +14 -10
- package/dist/v2/features/search/components/SearchResult.vue.script.js.map +1 -1
- package/dist/v2/helpers/generate-location-id.d.ts +1 -2
- package/dist/v2/helpers/generate-location-id.d.ts.map +1 -1
- package/dist/v2/helpers/generate-location-id.js.map +1 -1
- package/dist/v2/types/options.d.ts +1 -1
- package/dist/v2/types/options.d.ts.map +1 -1
- package/dist/v2/workspace-events.d.ts +2 -2
- package/dist/v2/workspace-events.d.ts.map +1 -1
- package/dist/v2/workspace-events.js +8 -1
- package/dist/v2/workspace-events.js.map +1 -1
- package/dist/vue-styles.css +128 -129
- package/package.json +22 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,84 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 3.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#10189](https://github.com/scalar/scalar/pull/10189): Support OpenAPI 3.2 `in: querystring` parameters, including content-based serialization, editing the entire query string, schema rendering, and generated request URLs.
|
|
8
|
+
|
|
9
|
+
Non-form whole-query content, including JSON delimiters, is percent-encoded in request URLs and code samples. Use an example with `serializedValue` on the parameter itself for URI-ready query content that must retain its existing encoding.
|
|
10
|
+
|
|
11
|
+
Preserve the encoding of named query values when they coexist with whole-query content in generated code samples, while encoding query authentication values once.
|
|
12
|
+
|
|
13
|
+
Explain why the whole-query editor disables adding named parameters. Existing named parameters follow the whole-query value, preserving duplicate keys for the server to interpret.
|
|
14
|
+
|
|
15
|
+
- [#10186](https://github.com/scalar/scalar/pull/10186): Support OpenAPI 3.2 additionalOperations in operation storage, navigation, documentation, callbacks, and the API client. Preserve custom HTTP method spelling when displaying and sending requests and generating code samples.
|
|
16
|
+
|
|
17
|
+
Traversed operation and webhook methods now use the exported `OperationMethod` type, which accepts custom strings while retaining known-method editor completion. Consumers must handle unknown methods; this open type cannot provide exhaustive checking over the fixed HTTP method set. Unknown method presentation uses `colorClass` and `colorVar`, matching known methods. Preserve uppercase and mixed-case additional operation names consistently.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#10186](https://github.com/scalar/scalar/pull/10186): Show a clear error when a request uses a Fetch-forbidden method (CONNECT, TRACE, or TRACK), including methods changed by pre-request scripts, instead of throwing while building the request.
|
|
22
|
+
- [#10186](https://github.com/scalar/scalar/pull/10186): Include the current document-defined custom method in the request method picker and preserve its spelling when selected.
|
|
23
|
+
|
|
24
|
+
Keep QUERY operation chunk names aligned with their references when additional operations are supported.
|
|
25
|
+
|
|
26
|
+
- [#10313](https://github.com/scalar/scalar/pull/10313): Render data table rows inside a `tbody` so server-rendered tables hydrate. The HTML parser inserts a `tbody` around rows that sit directly under a `table`, so markup rendered without one handed the client a `tbody` where the component tree held the row, and the table — an auth form, for example — was discarded and rebuilt after hydration.
|
|
27
|
+
- [#10186](https://github.com/scalar/scalar/pull/10186): Preserve request bodies for extension HTTP methods such as QUERY and PROPFIND in the browser client.
|
|
28
|
+
- [#10322](https://github.com/scalar/scalar/pull/10322): Use OpenAPI 3.2 dataValue and serializedValue examples for named parameters in the editor, outgoing requests, and code samples. Preserve already serialized values without encoding them twice.
|
|
29
|
+
|
|
30
|
+
Optional parameters with `dataValue` or `serializedValue` examples are now enabled by default, matching legacy `value` examples. Explicitly disabled examples remain disabled.
|
|
31
|
+
|
|
32
|
+
Parameter-level `serializedValue` examples remain editable as raw wire text, including parameter names and percent encoding (for example, `term=hello` rather than `hello`). Media-level cookie examples are percent-encoded when sent, matching generated snippets. Generating snippets no longer modifies the input cookies.
|
|
33
|
+
|
|
34
|
+
- [#10189](https://github.com/scalar/scalar/pull/10189): Translate the whole-query editor label and explanation in all supported API Client locales.
|
|
35
|
+
- [#10310](https://github.com/scalar/scalar/pull/10310): Connect SDK code samples to named request body examples using optional example and contentType fields. Keep the example switcher available for static samples and use the selected request example in API client snippets. Display unavailable linked samples as a localized status message in all supported languages.
|
|
36
|
+
|
|
37
|
+
## 3.20.0
|
|
38
|
+
|
|
39
|
+
### Minor Changes
|
|
40
|
+
|
|
41
|
+
- [#10207](https://github.com/scalar/scalar/pull/10207): Display JSON Lines, JSON Sequences, and multipart response parts as they arrive instead of waiting for the complete response. Preserve cancellation and show malformed records, incomplete multipart responses, and bounded display limits.
|
|
42
|
+
|
|
43
|
+
JSON Lines responses (including `application/jsonl` and `application/x-ndjson`), JSON Sequences (`application/json-seq` and `+json-seq`) and `multipart/mixed` or `multipart/x-mixed-replace` responses now use the streaming text viewer, including finite responses. Other multipart subtypes, such as `multipart/form-data`, retain the buffered viewer. Nested parts use hierarchical labels, such as Part 1.1.
|
|
44
|
+
|
|
45
|
+
The streaming viewer shows received bytes and offers Copy text and Download text for the displayed transcript, including after completion, cancellation, or a framing error. These exports contain formatted records and multipart labels/base64 rather than the original wire body. Streams retain at most 16 MiB of displayed text and reject records/parts above 8 MiB; preview plugins and virtualized raw-body rendering remain available only in the buffered viewer. HTTP status, headers, and declared Content-Length remain visible.
|
|
46
|
+
|
|
47
|
+
- [#10175](https://github.com/scalar/scalar/pull/10175): Support API Client UI translations through `localization.translations.apiClient`, including the client embedded in API Reference. Ship client translations for English, Russian, Spanish, French, German, Simplified Chinese, Arabic, and Portuguese to match API Reference. Preserve English fallbacks across package providers and react to locale, direction, and translation updates.
|
|
48
|
+
- [#10191](https://github.com/scalar/scalar/pull/10191): Support OpenAPI 3.2 OAuth device authorization with verification codes, cancellable token polling, stored credentials, and OAuth metadata discovery. Add mock device authorization and approval endpoints with pending, denial, expiry, and polling backoff responses.
|
|
49
|
+
|
|
50
|
+
Use consistent form-encoded Basic credentials and environment substitution across OAuth token and refresh flows. Allow HTTP metadata and verification links on local development hosts and reserved test domains, coerce discovery fields consistently, and report device-code expiry clearly.
|
|
51
|
+
|
|
52
|
+
- [#10178](https://github.com/scalar/scalar/pull/10178): Support OpenAPI 3.2 streaming item schemas in the workspace store, request body examples, and API reference schema views. Frame generated and structured examples as JSON Lines, JSON Sequence, or server-sent events while preserving explicit wire-format strings.
|
|
53
|
+
|
|
54
|
+
Preserve generated falsy request examples (`0`, `false`, and empty strings) for non-streaming bodies as well.
|
|
55
|
+
|
|
56
|
+
Use cURL `--data-binary` for supported streaming media types, making framed body handling explicit. Authored arrays and objects are framed as stream records; authored wire-format strings remain unchanged. SSE records with no valid fields are safely omitted with one console warning per serialization call reporting the omitted count, including when all records are omitted.
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- [#10177](https://github.com/scalar/scalar/pull/10177): Use OpenAPI 3.2 schemas throughout workspace-store consumers, stories, tests, and type generation. Update the app editor to offer OpenAPI 3.2 validation and completion while continuing to accept existing 3.1 documents.
|
|
61
|
+
|
|
62
|
+
Preserve OpenAPI 3.2 fields in the loose workspace schema, including tag hierarchy, streaming media types, nested encoding, additional operations, and OAuth device authorization.
|
|
63
|
+
|
|
64
|
+
The editor intentionally offers the 3.2 field set to documents declaring 3.1 as well; it does not flag 3.2-only fields solely because the declared version is 3.1. This does not certify conformance to the declared version or automatically update it. Before using 3.2-only fields, migrate and explicitly declare OpenAPI 3.2, and verify support in other validators and generators. Remove the unused 3.1 loose-schema generator to prevent schema drift.
|
|
65
|
+
|
|
66
|
+
Migration: the OpenAPI 3.1 loose-schema generator (`@scalar/workspace-store/schemas/v3.1/openapi`, published through the wildcard as `@scalar/workspace-store/schemas/v3.1/openapi/index`) and its `@scalar/workspace-store/schemas/v3.1/openapi/reference` helpers have been removed. Import the generator from `@scalar/workspace-store/schemas/v3.2/openapi/index` and the reference helpers from `@scalar/workspace-store/schemas/v3.2/openapi/reference` instead. The `./schemas/*` wildcard and the 3.1 strict-schema exports remain available; the explicit 3.2 strict-schema exports are additive. Locally generated types now use the `OpenAPIV3_2` namespace instead of `OpenAPIV3_1`.
|
|
67
|
+
|
|
68
|
+
Inline the editor path-extension reference so Monaco retains the leading-slash path pattern and does not report valid paths as unknown properties.
|
|
69
|
+
|
|
70
|
+
Document ingestion continues to upgrade only to OpenAPI 3.1, so existing inline XML bodies without `xml.name` remain loadable. This schema migration does not opt consumers into the stricter OpenAPI 3.2 XML upgrade.
|
|
71
|
+
|
|
72
|
+
- [#10284](https://github.com/scalar/scalar/pull/10284): Load the API client modal on its first open request instead of downloading it when the API reference or agent chat mounts. Preserve the requested operation, example, and request-body variant while loading. Show loading feedback and retry guidance if the request editor cannot be downloaded.
|
|
73
|
+
- [#10281](https://github.com/scalar/scalar/pull/10281): Fix duplicate rows and lost focus when entering request headers, cookies, and query parameters, and remove unchecked parameters cleanly.
|
|
74
|
+
- [#10208](https://github.com/scalar/scalar/pull/10208): Share OpenAPI 3.2 example-value selection across request bodies, response examples, and code snippets. Preserve serialized payloads verbatim, serialize structured JSON strings correctly, retain falsy values, and replace original example sources after body edits. Keep dataValue and serializedValue during document ingestion.
|
|
75
|
+
|
|
76
|
+
Editing a request body, including form fields, discards its authored `externalValue` URL and replaces it with the edited inline value in the workspace and exported API description. Rendering or focusing a form field preserves the external source.
|
|
77
|
+
|
|
78
|
+
Form editors prefer structured `dataValue` when both example fields exist, while raw editors, requests, and code snippets preserve `serializedValue` as wire text. Structured examples now affect generated request payloads and snippets; XML remains raw-only in the request editor.
|
|
79
|
+
|
|
80
|
+
- [#10303](https://github.com/scalar/scalar/pull/10303): Preserve parameter edits when another parameter changes, including parameters displaying downloaded examples. Keep downloaded values out of the document until explicitly edited, and use examples and defaults from resolved schema references when building requests.
|
|
81
|
+
|
|
3
82
|
## 3.19.3
|
|
4
83
|
|
|
5
84
|
### Patch Changes
|
|
@@ -4,9 +4,9 @@ type __VLS_Props = {
|
|
|
4
4
|
isEditable?: boolean;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
-
change: (value:
|
|
7
|
+
change: (value: string) => any;
|
|
8
8
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
-
onChange?: ((value:
|
|
9
|
+
onChange?: ((value: string) => any) | undefined;
|
|
10
10
|
}>, {
|
|
11
11
|
isSquare: boolean;
|
|
12
12
|
isEditable: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HttpMethod.vue.d.ts","sourceRoot":"","sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"names":[],"mappings":"AAoHA,KAAK,WAAW,GAAG;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;AA6IJ,QAAA,MAAM,YAAY;;;;;cAhJH,OAAO;gBAEL,OAAO;6EAkJtB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -2,7 +2,7 @@ import HttpMethod_vue_vue_type_script_setup_true_lang_default from "./HttpMethod
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
//#region src/components/HttpMethod/HttpMethod.vue
|
|
5
|
-
var HttpMethod_default = /*#__PURE__*/ _plugin_vue_export_helper_default(HttpMethod_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var HttpMethod_default = /*#__PURE__*/ _plugin_vue_export_helper_default(HttpMethod_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e7883636"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { HttpMethod_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpMethod.vue.js","names":[],"sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport {\n getHttpMethodInfo,\n REQUEST_METHODS,\n} from '@scalar/helpers/http/http-info'\nimport
|
|
1
|
+
{"version":3,"file":"HttpMethod.vue.js","names":[],"sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport {\n getHttpMethodInfo,\n REQUEST_METHODS,\n} from '@scalar/helpers/http/http-info'\nimport { objectEntries } from '@scalar/helpers/object/object-entries'\nimport { cva, cx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nconst props = withDefaults(\n defineProps<{\n isSquare?: boolean\n method: string\n isEditable?: boolean\n }>(),\n { isSquare: false, isDisable: false, isEditable: false },\n)\n\nconst emit = defineEmits<{\n (e: 'change', value: string): void\n}>()\n\nconst method = computed(() => getHttpMethodInfo(props.method))\nconst methodOptions = computed(() => {\n const options = objectEntries(REQUEST_METHODS).map(([id]) => ({\n id: String(id),\n label: id.toUpperCase(),\n color: getHttpMethodInfo(id).colorClass,\n }))\n\n // Keep document-defined methods selectable without changing their spelling.\n if (!options.some(({ id }) => id === props.method)) {\n options.push({\n id: props.method,\n label: props.method,\n color: method.value.colorClass,\n })\n }\n\n return options\n})\nconst selectedMethod = computed({\n get: () => methodOptions.value.find(({ id }) => id === props.method),\n set: (opt) => opt?.id && emit('change', opt.id),\n})\n\nconst variants = cva({\n base: 'text-center font-code text-3xs justify-center items-center flex',\n variants: {\n isSquare: {\n true: 'px-2.5 whitespace-nowrap font-bold border-r h-fit m-auto',\n false: 'rounded-full',\n },\n isEditable: {\n true: 'http-bg-gradient rounded-md border',\n false: 'cursor-auto',\n },\n },\n})\n\nconst httpLabel = computed(() => method.value.short)\n</script>\n<template>\n <!-- Dropdown select -->\n <ScalarListbox\n v-if=\"isEditable\"\n v-model=\"selectedMethod\"\n class=\"font-code scalar-client mt-1 text-sm\"\n :options=\"methodOptions\">\n <div\n class=\"h-full\"\n :class=\"{ 'pointer-events-none': !isEditable }\">\n <button\n class=\"relative h-full\"\n :class=\"cx(variants({ isSquare, isEditable }), method.colorClass)\"\n type=\"button\">\n <span>{{ httpLabel }}</span>\n </button>\n </div>\n </ScalarListbox>\n <!-- Display only -->\n <div\n v-else\n class=\"relative gap-1 whitespace-nowrap\"\n :class=\"cx(variants({ isSquare, isEditable }), method.colorClass)\"\n type=\"button\">\n {{ method.short }}\n </div>\n</template>\n<style scoped>\n.http-bg-gradient {\n background: linear-gradient(rgba(255, 255, 255, 0.75), rgba(0, 0, 0, 0.035));\n}\n.http-bg-gradient:hover {\n background: linear-gradient(rgba(0, 0, 0, 0.035), rgba(255, 255, 255, 0.75));\n}\n.dark-mode .http-bg-gradient {\n background: linear-gradient(rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.15));\n}\n.dark-mode .http-bg-gradient:hover {\n background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.035));\n}\n</style>\n"],"mappings":""}
|
|
@@ -22,13 +22,21 @@ var HttpMethod_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
22
22
|
const props = __props;
|
|
23
23
|
const emit = __emit;
|
|
24
24
|
const method = computed(() => getHttpMethodInfo(props.method));
|
|
25
|
-
const methodOptions =
|
|
26
|
-
id
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
const methodOptions = computed(() => {
|
|
26
|
+
const options = objectEntries(REQUEST_METHODS).map(([id]) => ({
|
|
27
|
+
id: String(id),
|
|
28
|
+
label: id.toUpperCase(),
|
|
29
|
+
color: getHttpMethodInfo(id).colorClass
|
|
30
|
+
}));
|
|
31
|
+
if (!options.some(({ id }) => id === props.method)) options.push({
|
|
32
|
+
id: props.method,
|
|
33
|
+
label: props.method,
|
|
34
|
+
color: method.value.colorClass
|
|
35
|
+
});
|
|
36
|
+
return options;
|
|
37
|
+
});
|
|
30
38
|
const selectedMethod = computed({
|
|
31
|
-
get: () => methodOptions.find(({ id }) => id === props.method),
|
|
39
|
+
get: () => methodOptions.value.find(({ id }) => id === props.method),
|
|
32
40
|
set: (opt) => opt?.id && emit("change", opt.id)
|
|
33
41
|
});
|
|
34
42
|
const variants = cva({
|
|
@@ -51,7 +59,7 @@ var HttpMethod_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
51
59
|
modelValue: selectedMethod.value,
|
|
52
60
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedMethod.value = $event),
|
|
53
61
|
class: "font-code scalar-client mt-1 text-sm",
|
|
54
|
-
options:
|
|
62
|
+
options: methodOptions.value
|
|
55
63
|
}, {
|
|
56
64
|
default: withCtx(() => [createElementVNode("div", { class: normalizeClass(["h-full", { "pointer-events-none": !__props.isEditable }]) }, [createElementVNode("button", {
|
|
57
65
|
class: normalizeClass(["relative h-full", unref(cx)(unref(variants)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpMethod.vue.script.js","names":[],"sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport {\n getHttpMethodInfo,\n REQUEST_METHODS,\n} from '@scalar/helpers/http/http-info'\nimport
|
|
1
|
+
{"version":3,"file":"HttpMethod.vue.script.js","names":[],"sources":["../../../src/components/HttpMethod/HttpMethod.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarListbox } from '@scalar/components/listbox'\nimport {\n getHttpMethodInfo,\n REQUEST_METHODS,\n} from '@scalar/helpers/http/http-info'\nimport { objectEntries } from '@scalar/helpers/object/object-entries'\nimport { cva, cx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nconst props = withDefaults(\n defineProps<{\n isSquare?: boolean\n method: string\n isEditable?: boolean\n }>(),\n { isSquare: false, isDisable: false, isEditable: false },\n)\n\nconst emit = defineEmits<{\n (e: 'change', value: string): void\n}>()\n\nconst method = computed(() => getHttpMethodInfo(props.method))\nconst methodOptions = computed(() => {\n const options = objectEntries(REQUEST_METHODS).map(([id]) => ({\n id: String(id),\n label: id.toUpperCase(),\n color: getHttpMethodInfo(id).colorClass,\n }))\n\n // Keep document-defined methods selectable without changing their spelling.\n if (!options.some(({ id }) => id === props.method)) {\n options.push({\n id: props.method,\n label: props.method,\n color: method.value.colorClass,\n })\n }\n\n return options\n})\nconst selectedMethod = computed({\n get: () => methodOptions.value.find(({ id }) => id === props.method),\n set: (opt) => opt?.id && emit('change', opt.id),\n})\n\nconst variants = cva({\n base: 'text-center font-code text-3xs justify-center items-center flex',\n variants: {\n isSquare: {\n true: 'px-2.5 whitespace-nowrap font-bold border-r h-fit m-auto',\n false: 'rounded-full',\n },\n isEditable: {\n true: 'http-bg-gradient rounded-md border',\n false: 'cursor-auto',\n },\n },\n})\n\nconst httpLabel = computed(() => method.value.short)\n</script>\n<template>\n <!-- Dropdown select -->\n <ScalarListbox\n v-if=\"isEditable\"\n v-model=\"selectedMethod\"\n class=\"font-code scalar-client mt-1 text-sm\"\n :options=\"methodOptions\">\n <div\n class=\"h-full\"\n :class=\"{ 'pointer-events-none': !isEditable }\">\n <button\n class=\"relative h-full\"\n :class=\"cx(variants({ isSquare, isEditable }), method.colorClass)\"\n type=\"button\">\n <span>{{ httpLabel }}</span>\n </button>\n </div>\n </ScalarListbox>\n <!-- Display only -->\n <div\n v-else\n class=\"relative gap-1 whitespace-nowrap\"\n :class=\"cx(variants({ isSquare, isEditable }), method.colorClass)\"\n type=\"button\">\n {{ method.short }}\n </div>\n</template>\n<style scoped>\n.http-bg-gradient {\n background: linear-gradient(rgba(255, 255, 255, 0.75), rgba(0, 0, 0, 0.035));\n}\n.http-bg-gradient:hover {\n background: linear-gradient(rgba(0, 0, 0, 0.035), rgba(255, 255, 255, 0.75));\n}\n.dark-mode .http-bg-gradient {\n background: linear-gradient(rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.15));\n}\n.dark-mode .http-bg-gradient:hover {\n background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.035));\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAUA,MAAM,QAAQ;EASd,MAAM,OAAO;EAIb,MAAM,SAAS,eAAe,kBAAkB,MAAM,MAAM,CAAC;EAC7D,MAAM,gBAAgB,eAAe;GACnC,MAAM,UAAU,cAAc,eAAe,CAAC,CAAC,KAAK,CAAC,SAAS;IAC5D,IAAI,OAAO,EAAE;IACb,OAAO,GAAG,YAAY;IACtB,OAAO,kBAAkB,EAAE,CAAC,CAAC;GAC/B,EAAE;GAGF,IAAI,CAAC,QAAQ,MAAM,EAAE,SAAS,OAAO,MAAM,MAAM,GAC/C,QAAQ,KAAK;IACX,IAAI,MAAM;IACV,OAAO,MAAM;IACb,OAAO,OAAO,MAAM;GACtB,CAAC;GAGH,OAAO;EACT,CAAC;EACD,MAAM,iBAAiB,SAAS;GAC9B,WAAW,cAAc,MAAM,MAAM,EAAE,SAAS,OAAO,MAAM,MAAM;GACnE,MAAM,QAAQ,KAAK,MAAM,KAAK,UAAU,IAAI,EAAE;EAChD,CAAC;EAED,MAAM,WAAW,IAAI;GACnB,MAAM;GACN,UAAU;IACR,UAAU;KACR,MAAM;KACN,OAAO;IACT;IACA,YAAY;KACV,MAAM;KACN,OAAO;IACT;GACF;EACF,CAAC;EAED,MAAM,YAAY,eAAe,OAAO,MAAM,KAAK;;UAKzC,QAAA,cAAA,UAAA,GADR,YAegB,MAAA,aAAA,GAAA;;gBAbL,eAAA;gFAAc,QAAA;IACvB,OAAM;IACL,SAAS,cAAA;;2BAUJ,CATN,mBASM,OAAA,EARJ,OAAK,eAAA,CAAC,UAAQ,EAAA,uBAAA,CACoB,QAAA,WAAU,CAAA,CAAA,EAAA,GAAA,CAC5C,mBAKS,UAAA;KAJP,OAAK,eAAA,CAAC,mBACE,MAAA,EAAA,CAAE,CAAC,MAAA,QAAA,CAAQ,CAAA;MAAA,UAAG,QAAA;MAAQ,YAAE,QAAA;KAAU,CAAA,GAAK,OAAA,MAAO,UAAU,CAAA,CAAA;KAChE,MAAK;QACL,mBAA4B,QAAA,MAAA,gBAAnB,UAAA,KAAS,GAAA,CAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA;;qDAKxB,mBAMM,OAAA;;IAJJ,OAAK,eAAA,CAAC,oCACE,MAAA,EAAA,CAAE,CAAC,MAAA,QAAA,CAAQ,CAAA;KAAA,UAAG,QAAA;KAAQ,YAAE,QAAA;IAAU,CAAA,GAAK,OAAA,MAAO,UAAU,CAAA,CAAA;IAChE,MAAK;sBACF,OAAA,MAAO,KAAK,GAAA,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
declare const __VLS_export: <T extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
2
2
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
3
3
|
filters?: T[];
|
|
4
|
+
/** Localized labels keyed by stable filter IDs. */
|
|
5
|
+
labels?: Partial<Record<T, string>>;
|
|
4
6
|
/** IDs for the currently available sections. */
|
|
5
7
|
filterIds?: Partial<Record<T, string>>;
|
|
6
8
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionFilter.vue.d.ts","sourceRoot":"","sources":["../../src/components/SectionFilter.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SectionFilter.vue.d.ts","sourceRoot":"","sources":["../../src/components/SectionFilter.vue"],"names":[],"mappings":"AA4LA,QAAA,MAAM,YAAY,GAAK,CAAC,SAAS,MAAM,EACtC,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,gBAAgB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAClE;WA8NO,OAAO,KAAK,EAAE,WAAW,GAAG,mBAAmB,CAAC;kBA5N5C,CAAC,EAAE;QACb,mDAAmD;iBAC1C,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;QACnC,gDAAgD;oBACpC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;;qBAyC3B,CAAC;;;KA+K6E,CAAC,GAAG,CAAC,OAAO,UAAU,SAAS;QAAE,oBAAoB,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAC5J,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI;WACtB,GAAG;WACH,EAAE;;EAGN,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAA;CAAI,CAAC;wBACpE,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -2,7 +2,7 @@ import _plugin_vue_export_helper_default from "../_virtual/_plugin-vue_export-he
|
|
|
2
2
|
import SectionFilter_vue_vue_type_script_setup_true_lang_default from "./SectionFilter.vue.script.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region src/components/SectionFilter.vue
|
|
5
|
-
var SectionFilter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(SectionFilter_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
5
|
+
var SectionFilter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(SectionFilter_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-48147b15"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SectionFilter_default as default };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionFilter.vue.js","names":[],"sources":["../../src/components/SectionFilter.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T extends string\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { nextTick, ref } from 'vue'\n\nimport SectionFilterButton from '@/components/SectionFilterButton.vue'\n\nconst {
|
|
1
|
+
{"version":3,"file":"SectionFilter.vue.js","names":[],"sources":["../../src/components/SectionFilter.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T extends string\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { nextTick, ref } from 'vue'\n\nimport SectionFilterButton from '@/components/SectionFilterButton.vue'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst {\n filters = [],\n filterIds,\n labels,\n} = defineProps<{\n filters?: T[]\n /** Localized labels keyed by stable filter IDs. */\n labels?: Partial<Record<T, string>>\n /** IDs for the currently available sections. */\n filterIds?: Partial<Record<T, string>>\n}>()\n\nconst model = defineModel<T>()\n\nconst tablist = ref<HTMLDivElement>()\nconst { direction } = useLocalization()\n\n/** Keyboard navigation */\nconst navigateSection = (arrow: 'left' | 'right'): void => {\n // Flex rows reverse in RTL, so the visual arrow direction reverses the index step.\n const offset =\n (arrow === 'left' ? -1 : 1) * (direction.value === 'rtl' ? -1 : 1)\n const index = model.value ? filters.indexOf(model.value) : 0\n const length = filters.length\n\n // Ensures we loop around the array by using the remainder\n const newIndex = (index + offset + length) % length\n model.value = filters[newIndex]\n\n // Focus the selected button\n nextTick(() => {\n if (tablist.value) {\n const selectedButton = tablist.value.querySelector(\n `button[aria-selected=\"true\"]`,\n ) satisfies HTMLButtonElement | null\n if (selectedButton) {\n selectedButton.focus()\n }\n }\n })\n}\n</script>\n<template>\n <div\n ref=\"tablist\"\n class=\"filter-hover context-bar-group ms-auto hidden lg:flex\"\n role=\"tablist\"\n @keydown.left=\"navigateSection('left')\"\n @keydown.right=\"navigateSection('right')\">\n <div\n class=\"request-section-content request-section-content-filter fade-request-section-content text-c-3 pointer-events-auto relative hidden w-full justify-end gap-[1.5px] rounded py-1.75 text-xs xl:flex\">\n <SectionFilterButton\n v-for=\"filter in filters\"\n :key=\"filter\"\n class=\"filter-hover-item\"\n :controls=\"filterIds?.[filter]\"\n role=\"tab\"\n :selected=\"model === filter\"\n @click=\"model = filter\">\n {{ labels?.[filter] ?? filter }}\n </SectionFilterButton>\n <div\n class=\"filter-button context-bar-group-hover:text-c-1 absolute -end-[30px] flex items-center\">\n <span class=\"context-bar-group-hover:hidden me-1.5\">{{\n model ? (labels?.[model] ?? model) : model\n }}</span>\n <ScalarIcon\n icon=\"FilterList\"\n size=\"md\"\n thickness=\"2\" />\n </div>\n </div>\n </div>\n</template>\n<style scoped>\n.fade-request-section-content {\n background: linear-gradient(\n to left,\n var(--scalar-background-1) 64%,\n transparent\n );\n}\n.fade-request-section-content:dir(rtl) {\n background: linear-gradient(\n to right,\n var(--scalar-background-1) 64%,\n transparent\n );\n}\n.filter-hover {\n height: 100%;\n padding-inline-end: 39px;\n padding-inline-start: 24px;\n position: absolute;\n inset-inline-end: 0;\n transition: width 0s ease-in-out 0.2s;\n overflow: hidden;\n}\n.filter-hover:hover,\n.filter-hover:has(:focus-visible) {\n width: 100%;\n z-index: 10;\n}\n.filter-hover:before {\n content: '';\n position: absolute;\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: fit-content;\n background-color: var(--scalar-background-1);\n opacity: 0;\n transition: all 0.3s ease-in-out;\n pointer-events: none;\n}\n.filter-hover-item {\n opacity: 0;\n}\n.filter-hover-item:not(:last-of-type) {\n transform: translate3d(0, 3px, 0);\n}\n.filter-hover:hover .filter-hover-item {\n transition:\n opacity 0.2s ease-in-out,\n transform 0.2s ease-in-out;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(1) {\n transition-delay: 0.05s;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(2) {\n transition-delay: 0.1s;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(3) {\n transition-delay: 0.15s;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(4) {\n transition-delay: 0.2s;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(5) {\n transition-delay: 0.25s;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(6) {\n transition-delay: 0.3s;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(7) {\n transition-delay: 0.35s;\n}\n.filter-hover:hover .filter-hover-item,\n.filter-hover:has(:focus-visible) .filter-hover-item {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n}\n.filter-hover:hover:before,\n.filter-hover:has(:focus-visible):before {\n opacity: 0.9;\n backdrop-filter: blur(10px);\n}\n.filter-button {\n top: 50%;\n transform: translateY(-50%);\n}\n.context-bar-group:hover .context-bar-group-hover\\:text-c-1,\n.context-bar-group:has(:focus-visible) .context-bar-group-hover\\:text-c-1 {\n --tw-text-opacity: 1;\n color: rgb(var(--scalar-color-1) / var(--tw-text-opacity));\n}\n\n.context-bar-group:hover .context-bar-group-hover\\:hidden,\n.context-bar-group:has(:focus-visible) .context-bar-group-hover\\:hidden {\n display: none;\n}\n</style>\n"],"mappings":""}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import { useLocalization } from "../v2/features/localization/index.js";
|
|
1
2
|
import SectionFilterButton_default from "./SectionFilterButton.vue.js";
|
|
2
3
|
import { Fragment, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, nextTick, openBlock, ref, renderList, toDisplayString, unref, useModel, withCtx, withKeys } from "vue";
|
|
3
4
|
import { ScalarIcon } from "@scalar/components/icon";
|
|
4
5
|
//#region src/components/SectionFilter.vue?vue&type=script&setup=true&lang.ts
|
|
5
6
|
var _hoisted_1 = { class: "request-section-content request-section-content-filter fade-request-section-content text-c-3 pointer-events-auto relative hidden w-full justify-end gap-[1.5px] rounded py-1.75 text-xs xl:flex" };
|
|
6
|
-
var _hoisted_2 = { class: "filter-button context-bar-group-hover:text-c-1 absolute -
|
|
7
|
-
var _hoisted_3 = { class: "context-bar-group-hover:hidden
|
|
7
|
+
var _hoisted_2 = { class: "filter-button context-bar-group-hover:text-c-1 absolute -end-[30px] flex items-center" };
|
|
8
|
+
var _hoisted_3 = { class: "context-bar-group-hover:hidden me-1.5" };
|
|
8
9
|
var SectionFilter_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
9
10
|
__name: "SectionFilter",
|
|
10
11
|
props: /*@__PURE__*/ mergeModels({
|
|
11
12
|
filters: { default: () => [] },
|
|
13
|
+
labels: {},
|
|
12
14
|
filterIds: {}
|
|
13
15
|
}, {
|
|
14
16
|
"modelValue": {},
|
|
@@ -18,9 +20,10 @@ var SectionFilter_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
18
20
|
setup(__props) {
|
|
19
21
|
const model = useModel(__props, "modelValue");
|
|
20
22
|
const tablist = ref();
|
|
23
|
+
const { direction } = useLocalization();
|
|
21
24
|
/** Keyboard navigation */
|
|
22
|
-
const navigateSection = (
|
|
23
|
-
const offset = direction === "
|
|
25
|
+
const navigateSection = (arrow) => {
|
|
26
|
+
const offset = (arrow === "left" ? -1 : 1) * (direction.value === "rtl" ? -1 : 1);
|
|
24
27
|
const index = model.value ? __props.filters.indexOf(model.value) : 0;
|
|
25
28
|
const length = __props.filters.length;
|
|
26
29
|
const newIndex = (index + offset + length) % length;
|
|
@@ -36,9 +39,9 @@ var SectionFilter_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
36
39
|
return openBlock(), createElementBlock("div", {
|
|
37
40
|
ref_key: "tablist",
|
|
38
41
|
ref: tablist,
|
|
39
|
-
class: "filter-hover context-bar-group
|
|
42
|
+
class: "filter-hover context-bar-group ms-auto hidden lg:flex",
|
|
40
43
|
role: "tablist",
|
|
41
|
-
onKeydown: [_cache[0] || (_cache[0] = withKeys(($event) => navigateSection("
|
|
44
|
+
onKeydown: [_cache[0] || (_cache[0] = withKeys(($event) => navigateSection("left"), ["left"])), _cache[1] || (_cache[1] = withKeys(($event) => navigateSection("right"), ["right"]))]
|
|
42
45
|
}, [createElementVNode("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.filters, (filter) => {
|
|
43
46
|
return openBlock(), createBlock(SectionFilterButton_default, {
|
|
44
47
|
key: filter,
|
|
@@ -48,14 +51,14 @@ var SectionFilter_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
48
51
|
selected: model.value === filter,
|
|
49
52
|
onClick: ($event) => model.value = filter
|
|
50
53
|
}, {
|
|
51
|
-
default: withCtx(() => [createTextVNode(toDisplayString(filter), 1)]),
|
|
54
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.labels?.[filter] ?? filter), 1)]),
|
|
52
55
|
_: 2
|
|
53
56
|
}, 1032, [
|
|
54
57
|
"controls",
|
|
55
58
|
"selected",
|
|
56
59
|
"onClick"
|
|
57
60
|
]);
|
|
58
|
-
}), 128)), createElementVNode("div", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(model.value), 1), createVNode(unref(ScalarIcon), {
|
|
61
|
+
}), 128)), createElementVNode("div", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(model.value ? __props.labels?.[model.value] ?? model.value : model.value), 1), createVNode(unref(ScalarIcon), {
|
|
59
62
|
icon: "FilterList",
|
|
60
63
|
size: "md",
|
|
61
64
|
thickness: "2"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionFilter.vue.script.js","names":[],"sources":["../../src/components/SectionFilter.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T extends string\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { nextTick, ref } from 'vue'\n\nimport SectionFilterButton from '@/components/SectionFilterButton.vue'\n\nconst {
|
|
1
|
+
{"version":3,"file":"SectionFilter.vue.script.js","names":[],"sources":["../../src/components/SectionFilter.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"T extends string\">\nimport { ScalarIcon } from '@scalar/components/icon'\nimport { nextTick, ref } from 'vue'\n\nimport SectionFilterButton from '@/components/SectionFilterButton.vue'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst {\n filters = [],\n filterIds,\n labels,\n} = defineProps<{\n filters?: T[]\n /** Localized labels keyed by stable filter IDs. */\n labels?: Partial<Record<T, string>>\n /** IDs for the currently available sections. */\n filterIds?: Partial<Record<T, string>>\n}>()\n\nconst model = defineModel<T>()\n\nconst tablist = ref<HTMLDivElement>()\nconst { direction } = useLocalization()\n\n/** Keyboard navigation */\nconst navigateSection = (arrow: 'left' | 'right'): void => {\n // Flex rows reverse in RTL, so the visual arrow direction reverses the index step.\n const offset =\n (arrow === 'left' ? -1 : 1) * (direction.value === 'rtl' ? -1 : 1)\n const index = model.value ? filters.indexOf(model.value) : 0\n const length = filters.length\n\n // Ensures we loop around the array by using the remainder\n const newIndex = (index + offset + length) % length\n model.value = filters[newIndex]\n\n // Focus the selected button\n nextTick(() => {\n if (tablist.value) {\n const selectedButton = tablist.value.querySelector(\n `button[aria-selected=\"true\"]`,\n ) satisfies HTMLButtonElement | null\n if (selectedButton) {\n selectedButton.focus()\n }\n }\n })\n}\n</script>\n<template>\n <div\n ref=\"tablist\"\n class=\"filter-hover context-bar-group ms-auto hidden lg:flex\"\n role=\"tablist\"\n @keydown.left=\"navigateSection('left')\"\n @keydown.right=\"navigateSection('right')\">\n <div\n class=\"request-section-content request-section-content-filter fade-request-section-content text-c-3 pointer-events-auto relative hidden w-full justify-end gap-[1.5px] rounded py-1.75 text-xs xl:flex\">\n <SectionFilterButton\n v-for=\"filter in filters\"\n :key=\"filter\"\n class=\"filter-hover-item\"\n :controls=\"filterIds?.[filter]\"\n role=\"tab\"\n :selected=\"model === filter\"\n @click=\"model = filter\">\n {{ labels?.[filter] ?? filter }}\n </SectionFilterButton>\n <div\n class=\"filter-button context-bar-group-hover:text-c-1 absolute -end-[30px] flex items-center\">\n <span class=\"context-bar-group-hover:hidden me-1.5\">{{\n model ? (labels?.[model] ?? model) : model\n }}</span>\n <ScalarIcon\n icon=\"FilterList\"\n size=\"md\"\n thickness=\"2\" />\n </div>\n </div>\n </div>\n</template>\n<style scoped>\n.fade-request-section-content {\n background: linear-gradient(\n to left,\n var(--scalar-background-1) 64%,\n transparent\n );\n}\n.fade-request-section-content:dir(rtl) {\n background: linear-gradient(\n to right,\n var(--scalar-background-1) 64%,\n transparent\n );\n}\n.filter-hover {\n height: 100%;\n padding-inline-end: 39px;\n padding-inline-start: 24px;\n position: absolute;\n inset-inline-end: 0;\n transition: width 0s ease-in-out 0.2s;\n overflow: hidden;\n}\n.filter-hover:hover,\n.filter-hover:has(:focus-visible) {\n width: 100%;\n z-index: 10;\n}\n.filter-hover:before {\n content: '';\n position: absolute;\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: fit-content;\n background-color: var(--scalar-background-1);\n opacity: 0;\n transition: all 0.3s ease-in-out;\n pointer-events: none;\n}\n.filter-hover-item {\n opacity: 0;\n}\n.filter-hover-item:not(:last-of-type) {\n transform: translate3d(0, 3px, 0);\n}\n.filter-hover:hover .filter-hover-item {\n transition:\n opacity 0.2s ease-in-out,\n transform 0.2s ease-in-out;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(1) {\n transition-delay: 0.05s;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(2) {\n transition-delay: 0.1s;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(3) {\n transition-delay: 0.15s;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(4) {\n transition-delay: 0.2s;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(5) {\n transition-delay: 0.25s;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(6) {\n transition-delay: 0.3s;\n}\n.filter-hover:hover .filter-hover-item:nth-last-of-type(7) {\n transition-delay: 0.35s;\n}\n.filter-hover:hover .filter-hover-item,\n.filter-hover:has(:focus-visible) .filter-hover-item {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n}\n.filter-hover:hover:before,\n.filter-hover:has(:focus-visible):before {\n opacity: 0.9;\n backdrop-filter: blur(10px);\n}\n.filter-button {\n top: 50%;\n transform: translateY(-50%);\n}\n.context-bar-group:hover .context-bar-group-hover\\:text-c-1,\n.context-bar-group:has(:focus-visible) .context-bar-group-hover\\:text-c-1 {\n --tw-text-opacity: 1;\n color: rgb(var(--scalar-color-1) / var(--tw-text-opacity));\n}\n\n.context-bar-group:hover .context-bar-group-hover\\:hidden,\n.context-bar-group:has(:focus-visible) .context-bar-group-hover\\:hidden {\n display: none;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAmBA,MAAM,QAAQ,SAAc,SAAA,YAAC;EAE7B,MAAM,UAAU,IAAoB;EACpC,MAAM,EAAE,cAAc,gBAAgB;;EAGtC,MAAM,mBAAmB,UAAkC;GAEzD,MAAM,UACH,UAAU,SAAS,KAAK,MAAM,UAAU,UAAU,QAAQ,KAAK;GAClE,MAAM,QAAQ,MAAM,QAAQ,QAAA,QAAQ,QAAQ,MAAM,KAAK,IAAI;GAC3D,MAAM,SAAS,QAAA,QAAQ;GAGvB,MAAM,YAAY,QAAQ,SAAS,UAAU;GAC7C,MAAM,QAAQ,QAAA,QAAQ;GAGtB,eAAe;IACb,IAAI,QAAQ,OAAO;KACjB,MAAM,iBAAiB,QAAQ,MAAM,cACnC,8BACF;KACA,IAAI,gBACF,eAAe,MAAM;IAEzB;GACF,CAAC;EACH;;uBAGE,mBA6BM,OAAA;aA5BA;IAAJ,KAAI;IACJ,OAAM;IACN,MAAK;IACJ,WAAO,CAAA,OAAA,OAAA,OAAA,KAAA,UAAA,WAAO,gBAAe,MAAA,GAAA,CAAA,MAAA,CAAA,IAAA,OAAA,OAAA,OAAA,KAAA,UAAA,WACd,gBAAe,OAAA,GAAA,CAAA,OAAA,CAAA,EAAA;OAC/B,mBAsBM,OAtBN,YAsBM,EAAA,UAAA,IAAA,GApBJ,mBASsB,UAAA,MAAA,WARH,QAAA,UAAV,WAAM;wBADf,YASsB,6BAAA;KAPnB,KAAK;KACN,OAAM;KACL,UAAU,QAAA,YAAY;KACvB,MAAK;KACJ,UAAU,MAAA,UAAU;KACpB,UAAK,WAAE,MAAA,QAAQ;;4BACgB,CAAA,gBAAA,gBAA7B,QAAA,SAAS,WAAW,MAAM,GAAA,CAAA,CAAA,CAAA;;;;;;;cAE/B,mBASM,OATN,YASM,CAPJ,mBAES,QAFT,YAES,gBADP,MAAA,QAAS,QAAA,SAAS,MAAA,UAAU,MAAA,QAAS,MAAA,KAAK,GAAA,CAAA,GAE5C,YAGkB,MAAA,UAAA,GAAA;IAFhB,MAAK;IACL,MAAK;IACL,WAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariablesSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesSelect.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServerVariablesSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesSelect.vue"],"names":[],"mappings":"AAmEA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,CAAC;AAqHF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariablesSelect.vue.js","names":[],"sources":["../../../src/components/Server/ServerVariablesSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport {\n ScalarListbox,\n type ScalarListboxOption,\n} from '@scalar/components/listbox'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n enum: string[]\n value: string\n controls: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'change', v: string): void\n}>()\n\nconst options = computed<ScalarListboxOption[]>(() =>\n props.enum.map((s) => ({ id: s, label: s })),\n)\n\nconst selected = computed<ScalarListboxOption | undefined>({\n get: () => options.value.find((opt) => opt.id === props.value),\n set: (opt?: ScalarListboxOption) => emit('change', opt?.id ?? ''),\n})\n</script>\n<template>\n <ScalarListbox\n v-model=\"selected\"\n :options=\"options\">\n <ScalarButton\n :aria-controls=\"controls\"\n class=\"group/button h-8 gap-1.5 p-1.5 text-base font-normal\"\n variant=\"ghost\">\n <span :class=\"{ 'text-c-1': value }\">\n <span\n v-if=\"value\"\n class=\"sr-only\"
|
|
1
|
+
{"version":3,"file":"ServerVariablesSelect.vue.js","names":[],"sources":["../../../src/components/Server/ServerVariablesSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport {\n ScalarListbox,\n type ScalarListboxOption,\n} from '@scalar/components/listbox'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst props = defineProps<{\n enum: string[]\n value: string\n controls: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'change', v: string): void\n}>()\n\nconst { translate } = useLocalization()\n\nconst options = computed<ScalarListboxOption[]>(() =>\n props.enum.map((s) => ({ id: s, label: s })),\n)\n\nconst selected = computed<ScalarListboxOption | undefined>({\n get: () => options.value.find((opt) => opt.id === props.value),\n set: (opt?: ScalarListboxOption) => emit('change', opt?.id ?? ''),\n})\n</script>\n<template>\n <ScalarListbox\n v-model=\"selected\"\n :options=\"options\">\n <ScalarButton\n :aria-controls=\"controls\"\n class=\"group/button h-8 gap-1.5 p-1.5 text-base font-normal\"\n variant=\"ghost\">\n <span :class=\"{ 'text-c-1': value }\">\n <span\n v-if=\"value\"\n class=\"sr-only\"\n >{{ translate('apiClient.serverVariablesSelect.selected') }}</span\n >\n {{ value || 'Select value' }}\n </span>\n <ScalarIconCaretDown\n class=\"mt-0.25 size-3 transition-transform duration-100 group-aria-expanded/button:rotate-180\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n</template>\n"],"mappings":""}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useLocalization } from "../../v2/features/localization/index.js";
|
|
1
2
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, withCtx } from "vue";
|
|
2
3
|
import { ScalarButton } from "@scalar/components/button";
|
|
3
4
|
import { ScalarListbox } from "@scalar/components/listbox";
|
|
@@ -18,6 +19,7 @@ var ServerVariablesSelect_vue_vue_type_script_setup_true_lang_default = /*@__PUR
|
|
|
18
19
|
setup(__props, { emit: __emit }) {
|
|
19
20
|
const props = __props;
|
|
20
21
|
const emit = __emit;
|
|
22
|
+
const { translate } = useLocalization();
|
|
21
23
|
const options = computed(() => props.enum.map((s) => ({
|
|
22
24
|
id: s,
|
|
23
25
|
label: s
|
|
@@ -37,9 +39,9 @@ var ServerVariablesSelect_vue_vue_type_script_setup_true_lang_default = /*@__PUR
|
|
|
37
39
|
class: "group/button h-8 gap-1.5 p-1.5 text-base font-normal",
|
|
38
40
|
variant: "ghost"
|
|
39
41
|
}, {
|
|
40
|
-
default: withCtx(() => [createElementVNode("span", { class: normalizeClass({ "text-c-1": __props.value }) }, [__props.value ? (openBlock(), createElementBlock("span", _hoisted_1, "
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
default: withCtx(() => [createElementVNode("span", { class: normalizeClass({ "text-c-1": __props.value }) }, [__props.value ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(unref(translate)("apiClient.serverVariablesSelect.selected")), 1)) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(__props.value || "Select value"), 1)], 2), createVNode(unref(ScalarIconCaretDown), {
|
|
43
|
+
class: "mt-0.25 size-3 transition-transform duration-100 group-aria-expanded/button:rotate-180",
|
|
44
|
+
weight: "bold"
|
|
43
45
|
})]),
|
|
44
46
|
_: 1
|
|
45
47
|
}, 8, ["aria-controls"])]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariablesSelect.vue.script.js","names":[],"sources":["../../../src/components/Server/ServerVariablesSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport {\n ScalarListbox,\n type ScalarListboxOption,\n} from '@scalar/components/listbox'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n enum: string[]\n value: string\n controls: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'change', v: string): void\n}>()\n\nconst options = computed<ScalarListboxOption[]>(() =>\n props.enum.map((s) => ({ id: s, label: s })),\n)\n\nconst selected = computed<ScalarListboxOption | undefined>({\n get: () => options.value.find((opt) => opt.id === props.value),\n set: (opt?: ScalarListboxOption) => emit('change', opt?.id ?? ''),\n})\n</script>\n<template>\n <ScalarListbox\n v-model=\"selected\"\n :options=\"options\">\n <ScalarButton\n :aria-controls=\"controls\"\n class=\"group/button h-8 gap-1.5 p-1.5 text-base font-normal\"\n variant=\"ghost\">\n <span :class=\"{ 'text-c-1': value }\">\n <span\n v-if=\"value\"\n class=\"sr-only\"
|
|
1
|
+
{"version":3,"file":"ServerVariablesSelect.vue.script.js","names":[],"sources":["../../../src/components/Server/ServerVariablesSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\nimport {\n ScalarListbox,\n type ScalarListboxOption,\n} from '@scalar/components/listbox'\nimport { ScalarIconCaretDown } from '@scalar/icons'\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst props = defineProps<{\n enum: string[]\n value: string\n controls: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'change', v: string): void\n}>()\n\nconst { translate } = useLocalization()\n\nconst options = computed<ScalarListboxOption[]>(() =>\n props.enum.map((s) => ({ id: s, label: s })),\n)\n\nconst selected = computed<ScalarListboxOption | undefined>({\n get: () => options.value.find((opt) => opt.id === props.value),\n set: (opt?: ScalarListboxOption) => emit('change', opt?.id ?? ''),\n})\n</script>\n<template>\n <ScalarListbox\n v-model=\"selected\"\n :options=\"options\">\n <ScalarButton\n :aria-controls=\"controls\"\n class=\"group/button h-8 gap-1.5 p-1.5 text-base font-normal\"\n variant=\"ghost\">\n <span :class=\"{ 'text-c-1': value }\">\n <span\n v-if=\"value\"\n class=\"sr-only\"\n >{{ translate('apiClient.serverVariablesSelect.selected') }}</span\n >\n {{ value || 'Select value' }}\n </span>\n <ScalarIconCaretDown\n class=\"mt-0.25 size-3 transition-transform duration-100 group-aria-expanded/button:rotate-180\"\n weight=\"bold\" />\n </ScalarButton>\n </ScalarListbox>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAWA,MAAM,QAAQ;EAMd,MAAM,OAAO;EAIb,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,UAAU,eACd,MAAM,KAAK,KAAK,OAAO;GAAE,IAAI;GAAG,OAAO;EAAE,EAAE,CAC7C;EAEA,MAAM,WAAW,SAA0C;GACzD,WAAW,QAAQ,MAAM,MAAM,QAAQ,IAAI,OAAO,MAAM,KAAK;GAC7D,MAAM,QAA8B,KAAK,UAAU,KAAK,MAAM,EAAE;EAClE,CAAC;;uBAGC,YAmBgB,MAAA,aAAA,GAAA;gBAlBL,SAAA;0EAAQ,QAAA;IAChB,SAAS,QAAA;;2BAgBK,CAff,YAee,MAAA,YAAA,GAAA;KAdZ,iBAAe,QAAA;KAChB,OAAM;KACN,SAAQ;;4BAQD,CAPP,mBAOO,QAAA,EAPA,OAAK,eAAA,EAAA,YAAgB,QAAA,MAAK,CAAA,EAAA,GAAA,CAEvB,QAAA,SAAA,UAAA,GADR,mBAIC,QAJD,YAIC,gBADK,MAAA,SAAA,CAAS,CAAA,0CAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,GAAA,gBACd,MACD,gBAAG,QAAA,SAAK,cAAA,GAAA,CAAA,CAAA,GAAA,CAAA,GAEV,YAEkB,MAAA,mBAAA,GAAA;MADhB,OAAM;MACN,QAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariablesTextbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesTextbox.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServerVariablesTextbox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Server/ServerVariablesTextbox.vue"],"names":[],"mappings":"AAsCA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;CAC7B,CAAC;AAuDF,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariablesTextbox.vue.js","names":[],"sources":["../../../src/components/Server/ServerVariablesTextbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n value: string\n controls: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'change', v: string): void\n}>()\n\nconst model = computed<string>({\n get: () => props.value,\n set: (v) => emit('change', v),\n})\n</script>\n<template>\n <input\n v-model=\"model\"\n v-bind=\"controls ? { ...$attrs, 'aria-controls': controls } : {}\"\n autocomplete=\"off\"\n class=\"text-c-1 w-full border-transparent px-1.5 py-1.25 -outline-offset-1 group-last/label:rounded-br-lg\"\n placeholder=\"value\"\n spellcheck=\"false\"\n type=\"text\" />\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ServerVariablesTextbox.vue.js","names":[],"sources":["../../../src/components/Server/ServerVariablesTextbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst props = defineProps<{\n value: string\n controls: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'change', v: string): void\n}>()\n\nconst { translate } = useLocalization()\n\nconst model = computed<string>({\n get: () => props.value,\n set: (v) => emit('change', v),\n})\n</script>\n<template>\n <input\n v-model=\"model\"\n v-bind=\"controls ? { ...$attrs, 'aria-controls': controls } : {}\"\n autocomplete=\"off\"\n class=\"text-c-1 w-full border-transparent px-1.5 py-1.25 -outline-offset-1 group-last/label:rounded-br-lg\"\n :placeholder=\"translate('apiClient.serverVariablesTextbox.value')\"\n spellcheck=\"false\"\n type=\"text\" />\n</template>\n"],"mappings":""}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useLocalization } from "../../v2/features/localization/index.js";
|
|
2
|
+
import { computed, createElementBlock, defineComponent, mergeProps, openBlock, unref, vModelText, withDirectives } from "vue";
|
|
2
3
|
//#region src/components/Server/ServerVariablesTextbox.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var _hoisted_1 = ["placeholder"];
|
|
3
5
|
var ServerVariablesTextbox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
4
6
|
__name: "ServerVariablesTextbox",
|
|
5
7
|
props: {
|
|
@@ -10,6 +12,7 @@ var ServerVariablesTextbox_vue_vue_type_script_setup_true_lang_default = /*@__PU
|
|
|
10
12
|
setup(__props, { emit: __emit }) {
|
|
11
13
|
const props = __props;
|
|
12
14
|
const emit = __emit;
|
|
15
|
+
const { translate } = useLocalization();
|
|
13
16
|
const model = computed({
|
|
14
17
|
get: () => props.value,
|
|
15
18
|
set: (v) => emit("change", v)
|
|
@@ -21,10 +24,10 @@ var ServerVariablesTextbox_vue_vue_type_script_setup_true_lang_default = /*@__PU
|
|
|
21
24
|
} : {}, {
|
|
22
25
|
autocomplete: "off",
|
|
23
26
|
class: "text-c-1 w-full border-transparent px-1.5 py-1.25 -outline-offset-1 group-last/label:rounded-br-lg",
|
|
24
|
-
placeholder: "value",
|
|
27
|
+
placeholder: unref(translate)("apiClient.serverVariablesTextbox.value"),
|
|
25
28
|
spellcheck: "false",
|
|
26
29
|
type: "text"
|
|
27
|
-
}), null, 16)), [[vModelText, model.value]]);
|
|
30
|
+
}), null, 16, _hoisted_1)), [[vModelText, model.value]]);
|
|
28
31
|
};
|
|
29
32
|
}
|
|
30
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerVariablesTextbox.vue.script.js","names":["$attrs"],"sources":["../../../src/components/Server/ServerVariablesTextbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nconst props = defineProps<{\n value: string\n controls: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'change', v: string): void\n}>()\n\nconst model = computed<string>({\n get: () => props.value,\n set: (v) => emit('change', v),\n})\n</script>\n<template>\n <input\n v-model=\"model\"\n v-bind=\"controls ? { ...$attrs, 'aria-controls': controls } : {}\"\n autocomplete=\"off\"\n class=\"text-c-1 w-full border-transparent px-1.5 py-1.25 -outline-offset-1 group-last/label:rounded-br-lg\"\n placeholder=\"value\"\n spellcheck=\"false\"\n type=\"text\" />\n</template>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServerVariablesTextbox.vue.script.js","names":["$attrs"],"sources":["../../../src/components/Server/ServerVariablesTextbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport { useLocalization } from '@/v2/features/localization'\n\nconst props = defineProps<{\n value: string\n controls: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'change', v: string): void\n}>()\n\nconst { translate } = useLocalization()\n\nconst model = computed<string>({\n get: () => props.value,\n set: (v) => emit('change', v),\n})\n</script>\n<template>\n <input\n v-model=\"model\"\n v-bind=\"controls ? { ...$attrs, 'aria-controls': controls } : {}\"\n autocomplete=\"off\"\n class=\"text-c-1 w-full border-transparent px-1.5 py-1.25 -outline-offset-1 group-last/label:rounded-br-lg\"\n :placeholder=\"translate('apiClient.serverVariablesTextbox.value')\"\n spellcheck=\"false\"\n type=\"text\" />\n</template>\n"],"mappings":";;;;;;;;;;;;EAKA,MAAM,QAAQ;EAKd,MAAM,OAAO;EAIb,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,QAAQ,SAAiB;GAC7B,WAAW,MAAM;GACjB,MAAM,MAAM,KAAK,UAAU,CAAC;EAC9B,CAAC;;uCAGC,mBAOgB,SAPhB,WAOgB,EAAA,uBAAA,OAAA,OAAA,OAAA,MAAA,WAAA,MANA,QAAA,QAAA,GACN,QAAA,WAAQ;IAAA,GAAQA,KAAAA;IAAM,iBAAmB,QAAA;GAAQ,IAAA,CAAA,GAAA;IACzD,cAAa;IACb,OAAM;IACL,aAAa,MAAA,SAAA,CAAS,CAAA,wCAAA;IACvB,YAAW;IACX,MAAK;6CANI,MAAA,KAAK,CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteSidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Sidebar/Actions/DeleteSidebarListElement.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeleteSidebarListElement.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Sidebar/Actions/DeleteSidebarListElement.vue"],"names":[],"mappings":"AAkDA,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;CACnC,CAAC;AAkGF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteSidebarListElement.vue.js","names":[],"sources":["../../../../src/components/Sidebar/Actions/DeleteSidebarListElement.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport SidebarListElementForm from '@/components/Sidebar/Actions/SidebarListElementForm.vue'\n\nconst props = defineProps<{\n variableName: string\n warningMessage: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'close'): void\n (e: 'delete'): void\n}>()\n\nconst truncatedName = computed(() => {\n if (props.variableName.length > 18) {\n return props.variableName.slice(0, 18) + '…'\n }\n return props.variableName\n})\n</script>\n<template>\n <SidebarListElementForm\n danger\n :label=\"
|
|
1
|
+
{"version":3,"file":"DeleteSidebarListElement.vue.js","names":[],"sources":["../../../../src/components/Sidebar/Actions/DeleteSidebarListElement.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport SidebarListElementForm from '@/components/Sidebar/Actions/SidebarListElementForm.vue'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst props = defineProps<{\n variableName: string\n warningMessage: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'close'): void\n (e: 'delete'): void\n}>()\n\nconst { translate } = useLocalization()\n\nconst truncatedName = computed(() => {\n if (props.variableName.length > 18) {\n return props.variableName.slice(0, 18) + '…'\n }\n return props.variableName\n})\n</script>\n<template>\n <SidebarListElementForm\n danger\n :label=\"\n translate('apiClient.deleteSidebarListElement.delete', {\n name: truncatedName,\n })\n \"\n @cancel=\"emit('close')\"\n @submit=\"emit('delete')\">\n <p\n v-if=\"warningMessage\"\n class=\"text-c-2 text-sm leading-normal text-pretty\">\n {{ warningMessage }}\n </p>\n </SidebarListElementForm>\n</template>\n"],"mappings":""}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { useLocalization } from "../../../v2/features/localization/index.js";
|
|
1
2
|
import SidebarListElementForm_default from "./SidebarListElementForm.vue.js";
|
|
2
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, openBlock, toDisplayString, withCtx } from "vue";
|
|
3
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, openBlock, toDisplayString, unref, withCtx } from "vue";
|
|
3
4
|
//#region src/components/Sidebar/Actions/DeleteSidebarListElement.vue?vue&type=script&setup=true&lang.ts
|
|
4
5
|
var _hoisted_1 = {
|
|
5
6
|
key: 0,
|
|
@@ -15,6 +16,7 @@ var DeleteSidebarListElement_vue_vue_type_script_setup_true_lang_default = /*@__
|
|
|
15
16
|
setup(__props, { emit: __emit }) {
|
|
16
17
|
const props = __props;
|
|
17
18
|
const emit = __emit;
|
|
19
|
+
const { translate } = useLocalization();
|
|
18
20
|
const truncatedName = computed(() => {
|
|
19
21
|
if (props.variableName.length > 18) return props.variableName.slice(0, 18) + "…";
|
|
20
22
|
return props.variableName;
|
|
@@ -22,7 +24,7 @@ var DeleteSidebarListElement_vue_vue_type_script_setup_true_lang_default = /*@__
|
|
|
22
24
|
return (_ctx, _cache) => {
|
|
23
25
|
return openBlock(), createBlock(SidebarListElementForm_default, {
|
|
24
26
|
danger: "",
|
|
25
|
-
label:
|
|
27
|
+
label: unref(translate)("apiClient.deleteSidebarListElement.delete", { name: truncatedName.value }),
|
|
26
28
|
onCancel: _cache[0] || (_cache[0] = ($event) => emit("close")),
|
|
27
29
|
onSubmit: _cache[1] || (_cache[1] = ($event) => emit("delete"))
|
|
28
30
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteSidebarListElement.vue.script.js","names":[],"sources":["../../../../src/components/Sidebar/Actions/DeleteSidebarListElement.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport SidebarListElementForm from '@/components/Sidebar/Actions/SidebarListElementForm.vue'\n\nconst props = defineProps<{\n variableName: string\n warningMessage: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'close'): void\n (e: 'delete'): void\n}>()\n\nconst truncatedName = computed(() => {\n if (props.variableName.length > 18) {\n return props.variableName.slice(0, 18) + '…'\n }\n return props.variableName\n})\n</script>\n<template>\n <SidebarListElementForm\n danger\n :label=\"
|
|
1
|
+
{"version":3,"file":"DeleteSidebarListElement.vue.script.js","names":[],"sources":["../../../../src/components/Sidebar/Actions/DeleteSidebarListElement.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nimport SidebarListElementForm from '@/components/Sidebar/Actions/SidebarListElementForm.vue'\nimport { useLocalization } from '@/v2/features/localization'\n\nconst props = defineProps<{\n variableName: string\n warningMessage: string | undefined\n}>()\n\nconst emit = defineEmits<{\n (e: 'close'): void\n (e: 'delete'): void\n}>()\n\nconst { translate } = useLocalization()\n\nconst truncatedName = computed(() => {\n if (props.variableName.length > 18) {\n return props.variableName.slice(0, 18) + '…'\n }\n return props.variableName\n})\n</script>\n<template>\n <SidebarListElementForm\n danger\n :label=\"\n translate('apiClient.deleteSidebarListElement.delete', {\n name: truncatedName,\n })\n \"\n @cancel=\"emit('close')\"\n @submit=\"emit('delete')\">\n <p\n v-if=\"warningMessage\"\n class=\"text-c-2 text-sm leading-normal text-pretty\">\n {{ warningMessage }}\n </p>\n </SidebarListElementForm>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAMA,MAAM,QAAQ;EAKd,MAAM,OAAO;EAKb,MAAM,EAAE,cAAc,gBAAgB;EAEtC,MAAM,gBAAgB,eAAe;GACnC,IAAI,MAAM,aAAa,SAAS,IAC9B,OAAO,MAAM,aAAa,MAAM,GAAG,EAAE,IAAI;GAE3C,OAAO,MAAM;EACf,CAAC;;uBAGC,YAcyB,gCAAA;IAbvB,QAAA;IACC,OAAc,MAAA,SAAA,CAAS,CAAA,6CAAA,EAAA,MAA8D,cAAA,MAAA,CAAA;IAKrF,UAAM,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,OAAA;IACZ,UAAM,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,QAAA;;2BAKT,CAHI,QAAA,kBAAA,UAAA,GADR,mBAII,KAJJ,YAII,gBADC,QAAA,cAAc,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarListElementForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Sidebar/Actions/SidebarListElementForm.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SidebarListElementForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Sidebar/Actions/SidebarListElementForm.vue"],"names":[],"mappings":"AA+CA,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAyGF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;;;kFAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarListElementForm.vue.js","names":[],"sources":["../../../../src/components/Sidebar/Actions/SidebarListElementForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\n\ndefineProps<{\n danger?: boolean\n label?: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'cancel'): void\n (e: 'submit'): void\n}>()\n</script>\n<template>\n <form\n class=\"flex flex-col gap-4 text-base\"\n @submit.prevent=\"emit('submit')\">\n <slot />\n <div class=\"flex justify-between gap-10\">\n <ScalarButton\n size=\"sm\"\n type=\"button\"\n variant=\"outlined\"\n @click=\"emit('cancel')\">\n
|
|
1
|
+
{"version":3,"file":"SidebarListElementForm.vue.js","names":[],"sources":["../../../../src/components/Sidebar/Actions/SidebarListElementForm.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ScalarButton } from '@scalar/components/button'\n\nimport { useLocalization } from '@/v2/features/localization'\n\ndefineProps<{\n danger?: boolean\n label?: string\n}>()\n\nconst emit = defineEmits<{\n (e: 'cancel'): void\n (e: 'submit'): void\n}>()\n\nconst { translate } = useLocalization()\n</script>\n<template>\n <form\n class=\"flex flex-col gap-4 text-base\"\n @submit.prevent=\"emit('submit')\">\n <slot />\n <div class=\"flex justify-between gap-10\">\n <ScalarButton\n size=\"sm\"\n type=\"button\"\n variant=\"outlined\"\n @click=\"emit('cancel')\">\n {{ translate('apiClient.sidebarListElementForm.cancel') }}\n </ScalarButton>\n <ScalarButton\n data-testid=\"sidebar-list-element-form-submit-button\"\n size=\"sm\"\n type=\"submit\"\n :variant=\"danger ? 'danger' : 'solid'\">\n {{ label ?? 'Save' }}\n </ScalarButton>\n </div>\n </form>\n</template>\n"],"mappings":""}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useLocalization } from "../../../v2/features/localization/index.js";
|
|
1
2
|
import { createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, renderSlot, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
2
3
|
import { ScalarButton } from "@scalar/components/button";
|
|
3
4
|
//#region src/components/Sidebar/Actions/SidebarListElementForm.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -11,6 +12,7 @@ var SidebarListElementForm_vue_vue_type_script_setup_true_lang_default = /*@__PU
|
|
|
11
12
|
emits: ["cancel", "submit"],
|
|
12
13
|
setup(__props, { emit: __emit }) {
|
|
13
14
|
const emit = __emit;
|
|
15
|
+
const { translate } = useLocalization();
|
|
14
16
|
return (_ctx, _cache) => {
|
|
15
17
|
return openBlock(), createElementBlock("form", {
|
|
16
18
|
class: "flex flex-col gap-4 text-base",
|
|
@@ -21,7 +23,7 @@ var SidebarListElementForm_vue_vue_type_script_setup_true_lang_default = /*@__PU
|
|
|
21
23
|
variant: "outlined",
|
|
22
24
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("cancel"))
|
|
23
25
|
}, {
|
|
24
|
-
default: withCtx(() => [
|
|
26
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(translate)("apiClient.sidebarListElementForm.cancel")), 1)]),
|
|
25
27
|
_: 1
|
|
26
28
|
}), createVNode(unref(ScalarButton), {
|
|
27
29
|
"data-testid": "sidebar-list-element-form-submit-button",
|