@scalar/api-client 2.9.0 → 2.10.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 +37 -0
- package/README.md +2 -2
- package/dist/components/CommandPalette/CommandActionForm.vue.js +9 -9
- package/dist/libs/send-request/build-request-security.d.ts.map +1 -1
- package/dist/libs/send-request/build-request-security.js +1 -1
- package/dist/libs/send-request/create-fetch-query-params.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +89 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue.js +129 -0
- package/dist/v2/blocks/operation-block/OperationBlock.vue2.js +4 -0
- package/dist/v2/{features/operation → blocks/operation-block}/components/Header.vue.d.ts +8 -27
- package/dist/v2/blocks/operation-block/components/Header.vue.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/components/Header.vue.js +7 -0
- package/dist/v2/blocks/operation-block/components/Header.vue2.js +93 -0
- package/dist/v2/blocks/operation-block/index.d.ts +2 -0
- package/dist/v2/blocks/operation-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/operation-block/index.js +4 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +8 -24
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +2 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +60 -59
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +7 -28
- 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 +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +97 -87
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +7 -17
- 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 +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +46 -41
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +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 +4 -5
- 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 +47 -45
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +5 -5
- 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 +7 -7
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +6 -9
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +255 -206
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +30 -25
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +140 -97
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +31 -29
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +2 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +32 -29
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +56 -51
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +2 -4
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +3 -3
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +39 -38
- package/dist/v2/components/code-input/CodeInput.vue.d.ts +140 -0
- package/dist/v2/components/code-input/CodeInput.vue.d.ts.map +1 -0
- package/dist/v2/components/code-input/CodeInput.vue.js +8 -0
- package/dist/v2/components/code-input/CodeInput.vue2.js +202 -0
- package/dist/v2/components/code-input/code-variable-widget.d.ts +21 -0
- package/dist/v2/components/code-input/code-variable-widget.d.ts.map +1 -0
- package/dist/v2/components/code-input/code-variable-widget.js +106 -0
- package/dist/v2/components/code-input/index.d.ts +2 -0
- package/dist/v2/components/code-input/index.d.ts.map +1 -0
- package/dist/v2/components/code-input/index.js +4 -0
- package/dist/v2/components/data-table/DataTable.vue.d.ts +22 -0
- package/dist/v2/components/data-table/DataTable.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTable.vue.js +38 -0
- package/dist/v2/components/data-table/DataTable.vue2.js +4 -0
- package/dist/v2/components/data-table/DataTableCell.vue.d.ts +19 -0
- package/dist/v2/components/data-table/DataTableCell.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableCell.vue.js +26 -0
- package/dist/v2/components/data-table/DataTableCell.vue2.js +4 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts +14 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue.js +53 -0
- package/dist/v2/components/data-table/DataTableCheckbox.vue2.js +4 -0
- package/dist/v2/components/data-table/DataTableHeader.vue.d.ts +13 -0
- package/dist/v2/components/data-table/DataTableHeader.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableHeader.vue.js +18 -0
- package/dist/v2/components/data-table/DataTableHeader.vue2.js +4 -0
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts +53 -0
- package/dist/v2/components/data-table/DataTableInput.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableInput.vue.js +7 -0
- package/dist/v2/components/data-table/DataTableInput.vue2.js +117 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +16 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue.js +146 -0
- package/dist/v2/components/data-table/DataTableInputSelect.vue2.js +4 -0
- package/dist/v2/components/data-table/DataTableRow.vue.d.ts +13 -0
- package/dist/v2/components/data-table/DataTableRow.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableRow.vue.js +12 -0
- package/dist/v2/components/data-table/DataTableText.vue.d.ts +16 -0
- package/dist/v2/components/data-table/DataTableText.vue.d.ts.map +1 -0
- package/dist/v2/components/data-table/DataTableText.vue.js +23 -0
- package/dist/v2/components/data-table/DataTableText.vue2.js +4 -0
- package/dist/v2/components/data-table/index.d.ts +9 -0
- package/dist/v2/components/data-table/index.d.ts.map +1 -0
- package/dist/v2/components/data-table/index.js +18 -0
- package/dist/v2/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/sidebar/Sidebar.vue.js +43 -42
- package/dist/v2/features/app/App.vue.d.ts.map +1 -1
- package/dist/v2/features/app/App.vue.js +72 -44
- package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
- package/dist/v2/features/app/components/AppSidebar.vue.js +2 -2
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts +3 -0
- package/dist/v2/features/app/components/DesktopTabs.vue.d.ts.map +1 -1
- package/dist/v2/features/app/components/DesktopTabs.vue.js +8 -7
- package/dist/v2/features/app/components/DesktopTabs.vue2.js +6 -0
- package/dist/v2/features/app/helpers/routes.d.ts +17 -10
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/app/helpers/routes.js +1 -7
- package/dist/v2/features/collection/DocumentCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/DocumentCollection.vue2.js +61 -45
- package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/WorkspaceCollection.vue2.js +19 -14
- package/dist/v2/features/collection/components/Authentication.vue.d.ts +4 -25
- package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Authentication.vue.js +1 -1
- package/dist/v2/features/collection/components/Authentication.vue2.js +27 -28
- package/dist/v2/features/collection/components/Environment.vue.d.ts +13 -87
- package/dist/v2/features/collection/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Environment.vue2.js +23 -25
- package/dist/v2/features/collection/components/Overview.vue.d.ts +13 -12
- package/dist/v2/features/collection/components/Overview.vue.d.ts.map +1 -1
- package/dist/v2/features/collection/components/Overview.vue.js +5 -2
- package/dist/v2/features/collection/components/Overview.vue2.js +68 -67
- package/dist/v2/features/collection/components/Tabs.vue.js +8 -8
- package/dist/v2/features/environments/EnvironmentsList.vue.d.ts +6 -95
- package/dist/v2/features/environments/EnvironmentsList.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/EnvironmentsList.vue.js +50 -98
- package/dist/v2/features/environments/components/Environment.vue.d.ts +9 -63
- package/dist/v2/features/environments/components/Environment.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/Environment.vue.js +41 -92
- package/dist/v2/features/environments/components/EnvironmentColors.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentColors.vue.js +105 -81
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts +7 -14
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +61 -39
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +3 -3
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts +21 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.d.ts.map +1 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +109 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue2.js +4 -0
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts +7 -20
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.d.ts.map +1 -1
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +3 -3
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +85 -71
- package/dist/v2/features/environments/index.d.ts +0 -3
- package/dist/v2/features/environments/index.d.ts.map +1 -1
- package/dist/v2/features/environments/index.js +2 -4
- package/dist/v2/features/operation/Operation.vue.d.ts +10 -77
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +56 -114
- package/dist/v2/helpers/test-utils.d.ts +4 -0
- package/dist/v2/helpers/test-utils.d.ts.map +1 -0
- package/dist/v2/hooks/use-workspace-client-events.d.ts +2 -1
- package/dist/v2/hooks/use-workspace-client-events.d.ts.map +1 -1
- package/dist/v2/hooks/use-workspace-client-events.js +137 -10
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +8 -6
- package/package.json +16 -16
- package/dist/components/CodeInput/CodeInput.test.d.ts +0 -2
- package/dist/components/CodeInput/CodeInput.test.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/get-openapi-version.test.d.ts +0 -2
- package/dist/components/ImportCollection/utils/get-openapi-version.test.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/is-document.test.d.ts +0 -2
- package/dist/components/ImportCollection/utils/is-document.test.d.ts.map +0 -1
- package/dist/components/ImportCollection/utils/is-url.test.d.ts +0 -2
- package/dist/components/ImportCollection/utils/is-url.test.d.ts.map +0 -1
- package/dist/components/Search/useSearch.test.d.ts +0 -2
- package/dist/components/Search/useSearch.test.d.ts.map +0 -1
- package/dist/components/Server/ServerDropdown.test.d.ts +0 -2
- package/dist/components/Server/ServerDropdown.test.d.ts.map +0 -1
- package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts +0 -2
- package/dist/components/ViewLayout/ViewLayoutSection.test.d.ts.map +0 -1
- package/dist/hooks/useResponseBody.test.d.ts +0 -2
- package/dist/hooks/useResponseBody.test.d.ts.map +0 -1
- package/dist/hooks/useSidebar.test.d.ts +0 -2
- package/dist/hooks/useSidebar.test.d.ts.map +0 -1
- package/dist/layouts/App/create-api-client-app.test.d.ts +0 -2
- package/dist/layouts/App/create-api-client-app.test.d.ts.map +0 -1
- package/dist/layouts/Modal/create-api-client-modal.test.d.ts +0 -2
- package/dist/layouts/Modal/create-api-client-modal.test.d.ts.map +0 -1
- package/dist/layouts/Web/create-api-client-web.test.d.ts +0 -2
- package/dist/layouts/Web/create-api-client-web.test.d.ts.map +0 -1
- package/dist/libs/create-client.test.d.ts +0 -2
- package/dist/libs/create-client.test.d.ts.map +0 -1
- package/dist/libs/env-helpers.test.d.ts +0 -2
- package/dist/libs/env-helpers.test.d.ts.map +0 -1
- package/dist/libs/event-bus.test.d.ts +0 -2
- package/dist/libs/event-bus.test.d.ts.map +0 -1
- package/dist/libs/extractAttachmentFilename.test.d.ts +0 -2
- package/dist/libs/extractAttachmentFilename.test.d.ts.map +0 -1
- package/dist/libs/find-request.test.d.ts +0 -2
- package/dist/libs/find-request.test.d.ts.map +0 -1
- package/dist/libs/get-request-uid-by-path-method.test.d.ts +0 -2
- package/dist/libs/get-request-uid-by-path-method.test.d.ts.map +0 -1
- package/dist/libs/hot-keys.test.d.ts +0 -2
- package/dist/libs/hot-keys.test.d.ts.map +0 -1
- package/dist/libs/importers/curl.test.d.ts +0 -2
- package/dist/libs/importers/curl.test.d.ts.map +0 -1
- package/dist/libs/normalize-headers.test.d.ts +0 -2
- package/dist/libs/normalize-headers.test.d.ts.map +0 -1
- package/dist/libs/parse-curl.test.d.ts +0 -2
- package/dist/libs/parse-curl.test.d.ts.map +0 -1
- package/dist/libs/send-request/build-request-security.test.d.ts +0 -2
- package/dist/libs/send-request/build-request-security.test.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-auth.test.d.ts +0 -2
- package/dist/libs/send-request/create-fetch-auth.test.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-body.test.d.ts +0 -2
- package/dist/libs/send-request/create-fetch-body.test.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-headers.test.d.ts +0 -2
- package/dist/libs/send-request/create-fetch-headers.test.d.ts.map +0 -1
- package/dist/libs/send-request/create-fetch-query-params.test.d.ts +0 -2
- package/dist/libs/send-request/create-fetch-query-params.test.d.ts.map +0 -1
- package/dist/libs/send-request/create-request-operation.test.d.ts +0 -191
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +0 -1
- package/dist/libs/send-request/decode-buffer.test.d.ts +0 -2
- package/dist/libs/send-request/decode-buffer.test.d.ts.map +0 -1
- package/dist/libs/send-request/set-request-cookies.test.d.ts +0 -2
- package/dist/libs/send-request/set-request-cookies.test.d.ts.map +0 -1
- package/dist/libs/string-template.test.d.ts +0 -2
- package/dist/libs/string-template.test.d.ts.map +0 -1
- package/dist/libs/validate-parameters.test.d.ts +0 -2
- package/dist/libs/validate-parameters.test.d.ts.map +0 -1
- package/dist/plugins/plugin-manager.test.d.ts +0 -2
- package/dist/plugins/plugin-manager.test.d.ts.map +0 -1
- package/dist/routes.test.d.ts +0 -2
- package/dist/routes.test.d.ts.map +0 -1
- package/dist/store/collections.test.d.ts +0 -2
- package/dist/store/collections.test.d.ts.map +0 -1
- package/dist/store/request.test.d.ts +0 -2
- package/dist/store/request.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/components/HttpMethod.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.test.d.ts.map +0 -1
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.test.d.ts +0 -2
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts.map +0 -1
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts +0 -2
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts.map +0 -1
- package/dist/v2/components/server/ServerDropdown.test.d.ts +0 -2
- package/dist/v2/components/server/ServerDropdown.test.d.ts.map +0 -1
- package/dist/v2/components/server/ServerDropdownItem.test.d.ts +0 -2
- package/dist/v2/components/server/ServerDropdownItem.test.d.ts.map +0 -1
- package/dist/v2/features/collection/DocumentCollection.test.d.ts +0 -2
- package/dist/v2/features/collection/DocumentCollection.test.d.ts.map +0 -1
- package/dist/v2/features/collection/WorkspaceCollection.test.d.ts +0 -2
- package/dist/v2/features/collection/WorkspaceCollection.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Authentication.test.d.ts +0 -2
- package/dist/v2/features/collection/components/Authentication.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Environment.test.d.ts +0 -2
- package/dist/v2/features/collection/components/Environment.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/LabelInput.test.d.ts +0 -2
- package/dist/v2/features/collection/components/LabelInput.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Overview.test.d.ts +0 -2
- package/dist/v2/features/collection/components/Overview.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Servers.test.d.ts +0 -2
- package/dist/v2/features/collection/components/Servers.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Settings.test.d.ts +0 -2
- package/dist/v2/features/collection/components/Settings.test.d.ts.map +0 -1
- package/dist/v2/features/collection/components/Tabs.test.d.ts +0 -2
- package/dist/v2/features/collection/components/Tabs.test.d.ts.map +0 -1
- package/dist/v2/features/environments/Environments.test.d.ts +0 -2
- package/dist/v2/features/environments/Environments.test.d.ts.map +0 -1
- package/dist/v2/features/environments/Environments.vue.d.ts +0 -31
- package/dist/v2/features/environments/Environments.vue.d.ts.map +0 -1
- package/dist/v2/features/environments/Environments.vue.js +0 -65
- package/dist/v2/features/environments/Environments.vue2.js +0 -4
- package/dist/v2/features/environments/EnvironmentsList.test.d.ts +0 -2
- package/dist/v2/features/environments/EnvironmentsList.test.d.ts.map +0 -1
- package/dist/v2/features/environments/components/Environment.test.d.ts +0 -2
- package/dist/v2/features/environments/components/Environment.test.d.ts.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.d.ts +0 -20
- package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.d.ts.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue.js +0 -48
- package/dist/v2/features/environments/components/EnvironmentColorUpdateModal.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentColors.test.d.ts +0 -2
- package/dist/v2/features/environments/components/EnvironmentColors.test.d.ts.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.d.ts +0 -18
- package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.d.ts.map +0 -1
- package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue.js +0 -35
- package/dist/v2/features/environments/components/EnvironmentNameUpdateModal.vue2.js +0 -4
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.test.d.ts +0 -2
- package/dist/v2/features/environments/components/EnvironmentVariablesTable.test.d.ts.map +0 -1
- package/dist/v2/features/global-cookies/components/CookiesTable.test.d.ts +0 -2
- package/dist/v2/features/global-cookies/components/CookiesTable.test.d.ts.map +0 -1
- package/dist/v2/features/global-cookies/components/GlobalCookies.test.d.ts +0 -2
- package/dist/v2/features/global-cookies/components/GlobalCookies.test.d.ts.map +0 -1
- package/dist/v2/features/operation/Operation.test.d.ts +0 -2
- package/dist/v2/features/operation/Operation.test.d.ts.map +0 -1
- package/dist/v2/features/operation/components/Header.test.d.ts +0 -2
- package/dist/v2/features/operation/components/Header.test.d.ts.map +0 -1
- package/dist/v2/features/operation/components/Header.vue.d.ts.map +0 -1
- package/dist/v2/features/operation/components/Header.vue.js +0 -7
- package/dist/v2/features/operation/components/Header.vue2.js +0 -97
- package/dist/v2/features/settings/Settings.test.d.ts +0 -2
- package/dist/v2/features/settings/Settings.test.d.ts.map +0 -1
- package/dist/v2/hooks/use-document-watcher.test.d.ts +0 -2
- package/dist/v2/hooks/use-document-watcher.test.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts +0 -2
- package/dist/views/Components/CodeSnippet/CodeSnippet.test.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts +0 -2
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.test.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts +0 -2
- package/dist/views/Components/CodeSnippet/helpers/get-har-request.test.d.ts.map +0 -1
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts +0 -2
- package/dist/views/Components/CodeSnippet/helpers/get-snippet.test.d.ts.map +0 -1
- package/dist/views/Request/RequestRoot.test.d.ts +0 -2
- package/dist/views/Request/RequestRoot.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestBody.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/RequestBody.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/RequestSection.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/RequestSection.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/helpers/filter-security-requirements.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/helpers/getting-started.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts +0 -2
- package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts.map +0 -1
- package/dist/views/Request/RequestSubpageHeader.test.d.ts +0 -2
- package/dist/views/Request/RequestSubpageHeader.test.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts +0 -2
- package/dist/views/Request/ResponseSection/ResponseBodyVirtual.test.d.ts.map +0 -1
- package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts +0 -2
- package/dist/views/Request/ResponseSection/ResponseSection.test.d.ts.map +0 -1
- package/dist/views/Request/consts/mediaTypes.test.d.ts +0 -2
- package/dist/views/Request/consts/mediaTypes.test.d.ts.map +0 -1
- package/dist/views/Request/libs/auth.test.d.ts +0 -2
- package/dist/views/Request/libs/auth.test.d.ts.map +0 -1
- package/dist/views/Request/libs/oauth2.test.d.ts +0 -2
- package/dist/views/Request/libs/oauth2.test.d.ts.map +0 -1
- package/dist/views/Request/libs/request.test.d.ts +0 -2
- package/dist/views/Request/libs/request.test.d.ts.map +0 -1
- package/dist/views/Request/libs/watch-mode.test.d.ts +0 -2
- package/dist/views/Request/libs/watch-mode.test.d.ts.map +0 -1
- package/dist/vitest.setup.d.ts +0 -34
- package/dist/vitest.setup.d.ts.map +0 -1
|
@@ -1,55 +1,77 @@
|
|
|
1
|
-
import { defineComponent as f, ref as
|
|
2
|
-
import { ScalarModal as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as f, ref as r, watch as N, computed as E, createBlock as y, openBlock as c, unref as h, withCtx as a, createVNode as m, createElementVNode as C, createElementBlock as b, createCommentVNode as x, createTextVNode as T, toDisplayString as F } from "vue";
|
|
2
|
+
import { ScalarModal as V } from "@scalar/components";
|
|
3
|
+
import k from "../../../../components/CommandPalette/CommandActionForm.vue.js";
|
|
4
|
+
import B from "../../../../components/CommandPalette/CommandActionInput.vue.js";
|
|
5
|
+
import S from "./EnvironmentColors.vue.js";
|
|
6
|
+
const O = { class: "flex items-start gap-2" }, g = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "text-red text-xs"
|
|
9
|
+
}, s = "#FFFFFF", w = /* @__PURE__ */ f({
|
|
7
10
|
__name: "EnvironmentCreateModal",
|
|
8
11
|
props: {
|
|
9
|
-
|
|
12
|
+
environments: {},
|
|
13
|
+
selectedEnvironmentName: {},
|
|
14
|
+
state: {},
|
|
15
|
+
eventBus: {},
|
|
16
|
+
collectionType: {}
|
|
10
17
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
e.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
setup(e) {
|
|
19
|
+
const t = r(""), n = r(s);
|
|
20
|
+
N(
|
|
21
|
+
() => e.state.open,
|
|
22
|
+
(l) => {
|
|
23
|
+
if (l) {
|
|
24
|
+
const o = e.environments[e.selectedEnvironmentName ?? ""];
|
|
25
|
+
e.selectedEnvironmentName && o ? (t.value = e.selectedEnvironmentName, n.value = o.color) : (t.value = "", n.value = s);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
const d = (l) => {
|
|
30
|
+
n.value = l;
|
|
31
|
+
}, v = () => {
|
|
32
|
+
e.selectedEnvironmentName ? e.eventBus.emit("environment:upsert:environment", {
|
|
33
|
+
oldEnvironmentName: e.selectedEnvironmentName,
|
|
34
|
+
payload: {
|
|
35
|
+
color: n.value
|
|
36
|
+
},
|
|
37
|
+
environmentName: t.value.trim(),
|
|
38
|
+
collectionType: e.collectionType
|
|
39
|
+
}) : e.eventBus.emit("environment:upsert:environment", {
|
|
40
|
+
environmentName: t.value.trim(),
|
|
41
|
+
payload: {
|
|
42
|
+
color: n.value
|
|
43
|
+
},
|
|
44
|
+
collectionType: e.collectionType
|
|
45
|
+
}), e.state.hide();
|
|
46
|
+
}, i = E(() => e.selectedEnvironmentName ? t.value !== e.selectedEnvironmentName && Object.keys(e.environments).includes(t.value) : Object.keys(e.environments).includes(t.value));
|
|
47
|
+
return (l, o) => (c(), y(h(V), {
|
|
24
48
|
bodyClass: "border-t-0 rounded-t-lg",
|
|
25
49
|
size: "xs",
|
|
26
|
-
state:
|
|
27
|
-
onClose: m
|
|
50
|
+
state: l.state
|
|
28
51
|
}, {
|
|
29
52
|
default: a(() => [
|
|
30
|
-
|
|
31
|
-
disabled: !
|
|
32
|
-
|
|
33
|
-
onSubmit: c
|
|
53
|
+
m(k, {
|
|
54
|
+
disabled: !t.value.trim() || i.value,
|
|
55
|
+
onSubmit: v
|
|
34
56
|
}, {
|
|
35
|
-
submit: a(() => [
|
|
36
|
-
|
|
37
|
-
])
|
|
57
|
+
submit: a(() => [
|
|
58
|
+
T(F(l.selectedEnvironmentName ? "Update" : "Add") + " Environment ", 1)
|
|
59
|
+
]),
|
|
38
60
|
default: a(() => [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
activeColor:
|
|
61
|
+
C("div", O, [
|
|
62
|
+
m(S, {
|
|
63
|
+
activeColor: n.value,
|
|
42
64
|
class: "peer",
|
|
43
|
-
|
|
44
|
-
onSelect: t[0] || (t[0] = (l) => o.value = l)
|
|
65
|
+
onSelect: d
|
|
45
66
|
}, null, 8, ["activeColor"]),
|
|
46
|
-
|
|
47
|
-
modelValue:
|
|
48
|
-
"onUpdate:modelValue":
|
|
67
|
+
m(B, {
|
|
68
|
+
modelValue: t.value,
|
|
69
|
+
"onUpdate:modelValue": o[0] || (o[0] = (u) => t.value = u),
|
|
49
70
|
class: "-mt-[.5px] !p-0 peer-has-[.color-selector]:hidden",
|
|
50
71
|
placeholder: "Environment name"
|
|
51
72
|
}, null, 8, ["modelValue"])
|
|
52
|
-
])
|
|
73
|
+
]),
|
|
74
|
+
i.value ? (c(), b("div", g, " This environment name is already in use. ")) : x("", !0)
|
|
53
75
|
]),
|
|
54
76
|
_: 1
|
|
55
77
|
}, 8, ["disabled"])
|
|
@@ -59,5 +81,5 @@ const N = { class: "flex items-start gap-2" }, M = /* @__PURE__ */ f({
|
|
|
59
81
|
}
|
|
60
82
|
});
|
|
61
83
|
export {
|
|
62
|
-
|
|
84
|
+
w as default
|
|
63
85
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ModalState } from '@scalar/components';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
state: ModalState;
|
|
4
|
-
name: string;
|
|
4
|
+
name: string | null;
|
|
5
5
|
};
|
|
6
6
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
7
|
submit: () => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentDeleteModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/EnvironmentDeleteModal.vue"],"names":[],"mappings":"AAoDA,OAAO,EAA6B,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/E,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,UAAU,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"EnvironmentDeleteModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/EnvironmentDeleteModal.vue"],"names":[],"mappings":"AAoDA,OAAO,EAA6B,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE/E,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,UAAU,CAAA;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB,CAAC;;;;;;;;AAwHF,wBAOG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as m, createBlock as u, openBlock as f, unref as n, withCtx as o, createElementVNode as a, createVNode as l, createTextVNode as i } from "vue";
|
|
2
2
|
import { ScalarModal as p, ScalarButton as r } from "@scalar/components";
|
|
3
|
-
const x = { class: "flex justify-between" },
|
|
3
|
+
const x = { class: "flex justify-between" }, k = /* @__PURE__ */ m({
|
|
4
4
|
__name: "EnvironmentDeleteModal",
|
|
5
5
|
props: {
|
|
6
6
|
state: {},
|
|
7
|
-
name: {}
|
|
7
|
+
name: { default: "unknown" }
|
|
8
8
|
},
|
|
9
9
|
emits: ["cancel", "submit"],
|
|
10
10
|
setup(b, { emit: d }) {
|
|
@@ -49,5 +49,5 @@ const x = { class: "flex justify-between" }, y = /* @__PURE__ */ m({
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
k as default
|
|
53
53
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
query: string;
|
|
4
|
+
environment: XScalarEnvironment;
|
|
5
|
+
dropdownPosition?: {
|
|
6
|
+
left: number;
|
|
7
|
+
top: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
11
|
+
handleArrowKey: (direction: "up" | "down") => void;
|
|
12
|
+
handleSelect: () => void;
|
|
13
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
+
select: (variable: string) => any;
|
|
15
|
+
redirect: () => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
+
onSelect?: ((variable: string) => any) | undefined;
|
|
18
|
+
onRedirect?: (() => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
export default _default;
|
|
21
|
+
//# sourceMappingURL=EnvironmentVariablesDropdown.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentVariablesDropdown.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/EnvironmentVariablesDropdown.vue"],"names":[],"mappings":"AAkKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAKnH,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD,CAAC;;gCAqDiC,IAAI,GAAG,MAAM;;;;;;;;;AA0OhD,wBAQG"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { defineComponent as E, ref as u, computed as d, onMounted as N, createBlock as x, createCommentVNode as P, openBlock as r, unref as f, withCtx as y, createElementVNode as s, normalizeStyle as b, createElementBlock as p, Fragment as _, renderList as q, normalizeClass as A, createTextVNode as w, toDisplayString as g, createVNode as T } from "vue";
|
|
2
|
+
import { ScalarTeleport as j, ScalarButton as D } from "@scalar/components";
|
|
3
|
+
import { ScalarIconPlus as F } from "@scalar/icons";
|
|
4
|
+
import { onClickOutside as I } from "@vueuse/core";
|
|
5
|
+
import K from "fuse.js";
|
|
6
|
+
const O = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "gap-1/2 flex flex-col"
|
|
9
|
+
}, R = ["onClick"], L = { class: "flex items-center gap-2 whitespace-nowrap" }, M = { class: "w-20 overflow-hidden text-right text-ellipsis whitespace-nowrap" }, Y = /* @__PURE__ */ E({
|
|
10
|
+
__name: "EnvironmentVariablesDropdown",
|
|
11
|
+
props: {
|
|
12
|
+
query: {},
|
|
13
|
+
environment: {},
|
|
14
|
+
dropdownPosition: {}
|
|
15
|
+
},
|
|
16
|
+
emits: ["select", "redirect"],
|
|
17
|
+
setup(n, { expose: k, emit: V }) {
|
|
18
|
+
const m = V, i = u(!0), c = u(null), o = u(0), C = () => {
|
|
19
|
+
m("redirect"), i.value = !1;
|
|
20
|
+
}, v = d(
|
|
21
|
+
() => n.environment.variables.map((e) => ({
|
|
22
|
+
key: e.name,
|
|
23
|
+
value: typeof e.value == "string" ? e.value : e.value.default
|
|
24
|
+
}))
|
|
25
|
+
), S = new K(v.value, {
|
|
26
|
+
keys: ["key", "value"]
|
|
27
|
+
}), a = d(() => {
|
|
28
|
+
if (!n.query)
|
|
29
|
+
return v.value.slice(-4).filter(({ key: t, value: l }) => t !== "" || l !== "");
|
|
30
|
+
const e = S.search(n.query, { limit: 10 });
|
|
31
|
+
return e.length > 0 ? e.map((t) => t.item).filter(({ key: t, value: l }) => t !== "" || l !== "") : [];
|
|
32
|
+
}), h = (e) => {
|
|
33
|
+
m("select", e);
|
|
34
|
+
};
|
|
35
|
+
k({
|
|
36
|
+
handleArrowKey: (e) => {
|
|
37
|
+
const t = e === "up" ? -1 : 1, l = a.value.length;
|
|
38
|
+
l !== 0 && (o.value = (o.value + t + l) % l);
|
|
39
|
+
},
|
|
40
|
+
handleSelect: () => {
|
|
41
|
+
if (o.value >= 0) {
|
|
42
|
+
const e = a.value[o.value];
|
|
43
|
+
e && h(e.key);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}), N(() => {
|
|
47
|
+
o.value = 0;
|
|
48
|
+
});
|
|
49
|
+
const z = d(() => ({
|
|
50
|
+
left: (n.dropdownPosition?.left ?? 0) + "px",
|
|
51
|
+
// Add a 5px offset from the editor
|
|
52
|
+
top: (n.dropdownPosition?.top ?? 0) + 5 + "px"
|
|
53
|
+
}));
|
|
54
|
+
return I(
|
|
55
|
+
c,
|
|
56
|
+
() => {
|
|
57
|
+
i.value = !1;
|
|
58
|
+
},
|
|
59
|
+
{ ignore: [c] }
|
|
60
|
+
), (e, t) => i.value ? (r(), x(f(j), {
|
|
61
|
+
key: 0,
|
|
62
|
+
class: "scalar-client"
|
|
63
|
+
}, {
|
|
64
|
+
default: y(() => [
|
|
65
|
+
s("div", {
|
|
66
|
+
ref_key: "dropdownRef",
|
|
67
|
+
ref: c,
|
|
68
|
+
class: "custom-scroll fixed top-0 left-0 flex max-h-[60svh] w-56 flex-col rounded border p-0.75",
|
|
69
|
+
style: b(z.value)
|
|
70
|
+
}, [
|
|
71
|
+
a.value.length ? (r(), p("ul", O, [
|
|
72
|
+
(r(!0), p(_, null, q(a.value, (l, B) => (r(), p("li", {
|
|
73
|
+
key: l.key,
|
|
74
|
+
class: A(["font-code text-xxs hover:bg-b-2 flex h-8 cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150", { "bg-b-2": B === o.value }]),
|
|
75
|
+
onClick: (H) => h(l.key)
|
|
76
|
+
}, [
|
|
77
|
+
s("div", L, [
|
|
78
|
+
s("span", {
|
|
79
|
+
class: "h-2.25 w-2.25 min-w-2.25 rounded-full",
|
|
80
|
+
style: b({
|
|
81
|
+
backgroundColor: e.environment.color
|
|
82
|
+
})
|
|
83
|
+
}, null, 4),
|
|
84
|
+
w(" " + g(l.key), 1)
|
|
85
|
+
]),
|
|
86
|
+
s("span", M, g(l.value), 1)
|
|
87
|
+
], 10, R))), 128))
|
|
88
|
+
])) : (r(), x(f(D), {
|
|
89
|
+
key: 1,
|
|
90
|
+
class: "font-code text-xxs bg-b-inherit hover:bg-b-2 flex h-8 w-full justify-start gap-2 px-1.5 transition-colors duration-150",
|
|
91
|
+
variant: "outlined",
|
|
92
|
+
onClick: C
|
|
93
|
+
}, {
|
|
94
|
+
default: y(() => [
|
|
95
|
+
T(f(F), { class: "size-3" }),
|
|
96
|
+
t[0] || (t[0] = w(" Add Variable ", -1))
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
})),
|
|
100
|
+
t[1] || (t[1] = s("div", { class: "bg-b-1 brightness-lifted absolute inset-0 -z-1 rounded shadow-lg" }, null, -1))
|
|
101
|
+
], 4)
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
})) : P("", !0);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
export {
|
|
108
|
+
Y as default
|
|
109
|
+
};
|
|
@@ -1,23 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
type TableRow = {
|
|
4
|
-
name: string;
|
|
5
|
-
value: string;
|
|
6
|
-
};
|
|
1
|
+
import type { CollectionType, WorkspaceEventBus } from '@scalar/workspace-store/events';
|
|
2
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
7
3
|
type __VLS_Props = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
|
-
updateRow: (index: number, payload: Partial<TableRow>) => any;
|
|
15
|
-
addRow: (payload: Partial<TableRow>) => any;
|
|
16
|
-
deleteRow: (index: number) => any;
|
|
17
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
-
onUpdateRow?: ((index: number, payload: Partial<TableRow>) => any) | undefined;
|
|
19
|
-
onAddRow?: ((payload: Partial<TableRow>) => any) | undefined;
|
|
20
|
-
onDeleteRow?: ((index: number) => any) | undefined;
|
|
21
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
environment: XScalarEnvironment;
|
|
5
|
+
environmentName: string;
|
|
6
|
+
eventBus: WorkspaceEventBus;
|
|
7
|
+
} & CollectionType;
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
9
|
export default _default;
|
|
23
10
|
//# sourceMappingURL=EnvironmentVariablesTable.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentVariablesTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/EnvironmentVariablesTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EnvironmentVariablesTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/features/environments/components/EnvironmentVariablesTable.vue"],"names":[],"mappings":"AAgMA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAWnH,KAAK,WAAW,GAAG;IACf,WAAW,EAAE,kBAAkB,CAAA;IAC/B,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,iBAAiB,CAAA;CAC5B,GAAG,cAAc,CAAC;;AAkVrB,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./EnvironmentVariablesTable.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const m = /* @__PURE__ */
|
|
3
|
+
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ o(a, [["__scopeId", "data-v-572665aa"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,122 +1,136 @@
|
|
|
1
|
-
import { defineComponent as h, computed as
|
|
2
|
-
import { ScalarButton as
|
|
3
|
-
import { ScalarIconTrash as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as h, computed as y, createBlock as s, openBlock as u, unref as a, withCtx as r, createVNode as i, createElementBlock as T, createTextVNode as v, Fragment as C, renderList as k, createCommentVNode as B } from "vue";
|
|
2
|
+
import { ScalarButton as w } from "@scalar/components";
|
|
3
|
+
import { ScalarIconTrash as I } from "@scalar/icons";
|
|
4
|
+
import R from "../../../components/data-table/DataTable.vue.js";
|
|
5
|
+
import b from "../../../components/data-table/DataTableRow.vue.js";
|
|
6
|
+
import c from "../../../components/data-table/DataTableHeader.vue.js";
|
|
7
|
+
import d from "../../../components/data-table/DataTableCell.vue.js";
|
|
8
|
+
import p from "../../../components/code-input/CodeInput.vue.js";
|
|
9
|
+
const W = /* @__PURE__ */ h({
|
|
10
10
|
__name: "EnvironmentVariablesTable",
|
|
11
11
|
props: {
|
|
12
|
-
data: {},
|
|
13
12
|
environment: {},
|
|
14
|
-
|
|
13
|
+
environmentName: {},
|
|
14
|
+
eventBus: {},
|
|
15
|
+
collectionType: {}
|
|
15
16
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
setup(n) {
|
|
18
|
+
const V = ["1fr", "1fr", "36px"], N = y(() => {
|
|
19
|
+
const t = n.environment.variables.map((l) => ({
|
|
20
|
+
name: l.name,
|
|
21
|
+
value: typeof l.value == "string" ? l.value : l.value.default
|
|
22
|
+
})), e = n.environment.variables.at(-1), o = e && (e.name !== "" || e.value !== "");
|
|
23
|
+
return !e || o ? [...t, { name: "", value: "" }] : t;
|
|
24
|
+
}), f = (t, e, o) => {
|
|
25
|
+
const l = o >= n.environment.variables.length;
|
|
26
|
+
if (!(!t && l)) {
|
|
27
|
+
if (o >= n.environment.variables.length) {
|
|
28
|
+
n.eventBus.emit("environment:upsert:environment-variable", {
|
|
29
|
+
environmentName: n.environmentName,
|
|
30
|
+
variable: { name: t, value: e },
|
|
31
|
+
collectionType: n.collectionType
|
|
32
|
+
});
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
n.eventBus.emit("environment:upsert:environment-variable", {
|
|
36
|
+
environmentName: n.environmentName,
|
|
37
|
+
variable: { name: t, value: e },
|
|
38
|
+
index: o,
|
|
39
|
+
collectionType: n.collectionType
|
|
40
|
+
});
|
|
28
41
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
42
|
+
}, g = (t) => n.eventBus.emit("environment:delete:environment-variable", {
|
|
43
|
+
environmentName: n.environmentName,
|
|
44
|
+
index: t,
|
|
45
|
+
collectionType: n.collectionType
|
|
46
|
+
});
|
|
47
|
+
return (t, e) => (u(), s(a(R), {
|
|
48
|
+
class: "group/table data-table h-min flex-1 rounded",
|
|
49
|
+
columns: V
|
|
34
50
|
}, {
|
|
35
|
-
default:
|
|
36
|
-
|
|
37
|
-
default:
|
|
38
|
-
|
|
39
|
-
default:
|
|
40
|
-
|
|
51
|
+
default: r(() => [
|
|
52
|
+
i(a(b), { class: "sr-only !block" }, {
|
|
53
|
+
default: r(() => [
|
|
54
|
+
i(a(c), null, {
|
|
55
|
+
default: r(() => [...e[0] || (e[0] = [
|
|
56
|
+
v("Name", -1)
|
|
41
57
|
])]),
|
|
42
58
|
_: 1
|
|
43
59
|
}),
|
|
44
|
-
|
|
45
|
-
default:
|
|
46
|
-
|
|
60
|
+
i(a(c), null, {
|
|
61
|
+
default: r(() => [...e[1] || (e[1] = [
|
|
62
|
+
v("Value", -1)
|
|
47
63
|
])]),
|
|
48
64
|
_: 1
|
|
49
65
|
}),
|
|
50
|
-
|
|
51
|
-
default:
|
|
52
|
-
|
|
66
|
+
i(a(c), null, {
|
|
67
|
+
default: r(() => [...e[2] || (e[2] = [
|
|
68
|
+
v("Actions", -1)
|
|
53
69
|
])]),
|
|
54
70
|
_: 1
|
|
55
71
|
})
|
|
56
72
|
]),
|
|
57
73
|
_: 1
|
|
58
74
|
}),
|
|
59
|
-
(u(!0), C
|
|
60
|
-
|
|
61
|
-
key: o,
|
|
75
|
+
(u(!0), T(C, null, k(N.value, (o, l) => (u(), s(a(b), {
|
|
76
|
+
key: l,
|
|
62
77
|
class: "group/row"
|
|
63
78
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
|
|
66
|
-
default:
|
|
67
|
-
|
|
68
|
-
"aria-label": "
|
|
79
|
+
default: r(() => [
|
|
80
|
+
i(a(d), null, {
|
|
81
|
+
default: r(() => [
|
|
82
|
+
i(a(p), {
|
|
83
|
+
"aria-label": "Environment Variable Name",
|
|
69
84
|
disableCloseBrackets: "",
|
|
70
85
|
disableTabIndent: "",
|
|
71
|
-
|
|
72
|
-
environment: a.environment,
|
|
86
|
+
environment: void 0,
|
|
73
87
|
lineWrapping: "",
|
|
74
|
-
modelValue:
|
|
88
|
+
modelValue: o.name,
|
|
75
89
|
placeholder: "Name",
|
|
76
|
-
"onUpdate:modelValue": (
|
|
77
|
-
}, null, 8, ["
|
|
90
|
+
"onUpdate:modelValue": (m) => f(m, o.value, l)
|
|
91
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
78
92
|
]),
|
|
79
93
|
_: 2
|
|
80
94
|
}, 1024),
|
|
81
|
-
|
|
82
|
-
default:
|
|
83
|
-
|
|
84
|
-
"aria-label": "
|
|
95
|
+
i(a(d), null, {
|
|
96
|
+
default: r(() => [
|
|
97
|
+
i(a(p), {
|
|
98
|
+
"aria-label": "Environment Variable Value",
|
|
85
99
|
disableTabIndent: "",
|
|
86
|
-
|
|
87
|
-
environment: a.environment,
|
|
100
|
+
environment: void 0,
|
|
88
101
|
lineWrapping: "",
|
|
89
|
-
modelValue:
|
|
102
|
+
modelValue: o.value,
|
|
90
103
|
placeholder: "Value",
|
|
91
|
-
"onUpdate:modelValue": (
|
|
92
|
-
}, null, 8, ["
|
|
104
|
+
"onUpdate:modelValue": (m) => f(o.name, m, l)
|
|
105
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
93
106
|
]),
|
|
94
107
|
_: 2
|
|
95
108
|
}, 1024),
|
|
96
|
-
|
|
97
|
-
default:
|
|
98
|
-
l(
|
|
109
|
+
i(a(d), { class: "flex items-center justify-center" }, {
|
|
110
|
+
default: r(() => [
|
|
111
|
+
l < t.environment.variables.length ? (u(), s(a(w), {
|
|
112
|
+
key: 0,
|
|
99
113
|
class: "text-c-2 hover:text-c-1 hover:bg-b-2 hidden h-fit rounded p-1 group-focus-within:flex group-hover/row:flex",
|
|
100
114
|
size: "sm",
|
|
101
115
|
variant: "ghost",
|
|
102
|
-
onClick: (
|
|
116
|
+
onClick: (m) => g(l)
|
|
103
117
|
}, {
|
|
104
|
-
default:
|
|
105
|
-
|
|
118
|
+
default: r(() => [
|
|
119
|
+
i(a(I), { class: "size-3.5" })
|
|
106
120
|
]),
|
|
107
121
|
_: 1
|
|
108
|
-
}, 8, ["onClick"])
|
|
122
|
+
}, 8, ["onClick"])) : B("", !0)
|
|
109
123
|
]),
|
|
110
124
|
_: 2
|
|
111
125
|
}, 1024)
|
|
112
126
|
]),
|
|
113
127
|
_: 2
|
|
114
|
-
},
|
|
128
|
+
}, 1024))), 128))
|
|
115
129
|
]),
|
|
116
130
|
_: 1
|
|
117
131
|
}));
|
|
118
132
|
}
|
|
119
133
|
});
|
|
120
134
|
export {
|
|
121
|
-
|
|
135
|
+
W as default
|
|
122
136
|
};
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
/** biome-ignore-all lint/performance/noBarrelFile: It's an entry point for this feature */
|
|
2
|
-
export type { Environment, EnvironmentVariable } from './components/Environment.vue.js';
|
|
3
|
-
export { default as Environments } from './Environments.vue.js';
|
|
4
1
|
export { default as EnvironmentsList } from './EnvironmentsList.vue.js';
|
|
5
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/environments/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/features/environments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA"}
|