@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
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { defineComponent as W, useAttrs as j, ref as d, computed as s, toRef as r, watch as H, createElementBlock as i, openBlock as n, Fragment as Q, createBlock as c, createCommentVNode as f, normalizeClass as G, createElementVNode as v, toDisplayString as J, mergeProps as X, unref as T, withKeys as b, withModifiers as D, createTextVNode as w, renderSlot as $ } from "vue";
|
|
2
|
+
import { useCodeMirror as Y, useDropdown as Z, colorPicker as _ } from "@scalar/use-codemirror";
|
|
3
|
+
import { nanoid as ee } from "nanoid";
|
|
4
|
+
import V from "../data-table/DataTableInputSelect.vue.js";
|
|
5
|
+
import te from "../../features/environments/components/EnvironmentVariablesDropdown.vue.js";
|
|
6
|
+
import { pillPlugin as le, backspaceCommand as ne } from "./code-variable-widget.js";
|
|
7
|
+
const oe = { class: "whitespace-nowrap" }, ae = ["id"], re = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "z-context text-c-2 absolute right-1.5 bottom-1 hidden font-sans group-has-[:focus-visible]/input:block",
|
|
10
|
+
role: "alert"
|
|
11
|
+
}, ie = {
|
|
12
|
+
key: 5,
|
|
13
|
+
class: "centered-y text-orange absolute right-7 text-xs"
|
|
14
|
+
}, ue = {
|
|
15
|
+
key: 6,
|
|
16
|
+
class: "centered-y absolute right-0 flex h-full items-center p-1.5 group-has-[.cm-focused]:z-1"
|
|
17
|
+
}, de = {
|
|
18
|
+
key: 7,
|
|
19
|
+
class: "required centered-y text-xxs text-c-3 group-[.error]:text-red bg-b-1 pointer-events-none absolute right-0 mr-0.5 pt-px pr-2 opacity-100 shadow-[-8px_0_4px_var(--scalar-background-1)] transition-opacity duration-150 group-[.alert]:bg-transparent group-[.alert]:shadow-none group-[.error]:bg-transparent group-[.error]:shadow-none peer-has-[.cm-focused]:opacity-0"
|
|
20
|
+
}, se = {
|
|
21
|
+
inheritAttrs: !1
|
|
22
|
+
}, ge = /* @__PURE__ */ W({
|
|
23
|
+
...se,
|
|
24
|
+
__name: "CodeInput",
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: {},
|
|
27
|
+
environment: {},
|
|
28
|
+
type: {},
|
|
29
|
+
disabled: { type: Boolean, default: !1 },
|
|
30
|
+
error: { type: Boolean, default: !1 },
|
|
31
|
+
layout: { default: "desktop" },
|
|
32
|
+
enum: {},
|
|
33
|
+
examples: {},
|
|
34
|
+
default: {},
|
|
35
|
+
nullable: { type: Boolean, default: !1 },
|
|
36
|
+
placeholder: {},
|
|
37
|
+
required: { type: Boolean },
|
|
38
|
+
colorPicker: { type: Boolean, default: !1 },
|
|
39
|
+
lineNumbers: { type: Boolean, default: !1 },
|
|
40
|
+
lint: { type: Boolean, default: !1 },
|
|
41
|
+
lineWrapping: { type: Boolean, default: !1 },
|
|
42
|
+
language: {},
|
|
43
|
+
extensions: { default: () => [] },
|
|
44
|
+
disableTabIndent: { type: Boolean, default: !1 },
|
|
45
|
+
disableEnter: { type: Boolean, default: !1 },
|
|
46
|
+
disableCloseBrackets: { type: Boolean, default: !1 },
|
|
47
|
+
emitOnBlur: { type: Boolean, default: !0 },
|
|
48
|
+
withVariables: { type: Boolean, default: !0 },
|
|
49
|
+
importCurl: { type: Boolean, default: !1 },
|
|
50
|
+
handleFieldChange: { type: Function },
|
|
51
|
+
handleFieldSubmit: { type: Function }
|
|
52
|
+
},
|
|
53
|
+
emits: ["update:modelValue", "submit", "blur", "curl", "redirectToEnvironment"],
|
|
54
|
+
setup(t, { expose: M, emit: R }) {
|
|
55
|
+
const u = R, B = j(), q = B.id || `id-${ee()}`, k = d(!1), A = s(() => t.enum?.length ? !1 : t.type === "boolean" || Array.isArray(t.type) && t.type.includes("boolean")), x = s(() => t.nullable ? ["true", "false", "null"] : ["true", "false"]), I = s(() => Array.isArray(t.type) ? t.type.find((e) => e !== "null") ?? "string" : t.type), C = (e) => {
|
|
56
|
+
if (e !== t.modelValue) {
|
|
57
|
+
if (t.importCurl && e.trim().toLowerCase().startsWith("curl")) {
|
|
58
|
+
u("curl", e), o.value && o.value.dispatch({
|
|
59
|
+
changes: {
|
|
60
|
+
from: 0,
|
|
61
|
+
to: o.value.state.doc.length,
|
|
62
|
+
insert: String(t.modelValue)
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
t.handleFieldChange ? t.handleFieldChange(e) : u("update:modelValue", e);
|
|
68
|
+
}
|
|
69
|
+
}, p = (e) => {
|
|
70
|
+
t.handleFieldSubmit ? t.handleFieldSubmit(e) : u("submit", e);
|
|
71
|
+
}, S = (e) => {
|
|
72
|
+
k.value = !1, t.emitOnBlur && t.modelValue && p(e), u("blur", e);
|
|
73
|
+
}, y = (e) => {
|
|
74
|
+
u("update:modelValue", e);
|
|
75
|
+
}, N = () => {
|
|
76
|
+
const e = [...t.extensions];
|
|
77
|
+
return t.colorPicker && e.push(_), e;
|
|
78
|
+
}, O = s(
|
|
79
|
+
() => le({
|
|
80
|
+
environment: t.environment,
|
|
81
|
+
isReadOnly: t.layout === "modal"
|
|
82
|
+
})
|
|
83
|
+
), z = s(() => [
|
|
84
|
+
...N(),
|
|
85
|
+
O.value,
|
|
86
|
+
ne
|
|
87
|
+
]), E = d(null), { codeMirror: o } = Y({
|
|
88
|
+
content: r(() => String(t.modelValue ?? "")),
|
|
89
|
+
onChange: (e) => {
|
|
90
|
+
C(e), L();
|
|
91
|
+
},
|
|
92
|
+
onFocus: () => {
|
|
93
|
+
k.value = !0;
|
|
94
|
+
},
|
|
95
|
+
onBlur: S,
|
|
96
|
+
codeMirrorRef: E,
|
|
97
|
+
disableTabIndent: r(() => t.disableTabIndent),
|
|
98
|
+
disableEnter: r(() => t.disableEnter),
|
|
99
|
+
disableCloseBrackets: r(() => t.disableCloseBrackets),
|
|
100
|
+
lineNumbers: r(() => t.lineNumbers),
|
|
101
|
+
language: r(() => t.language),
|
|
102
|
+
lint: r(() => t.lint),
|
|
103
|
+
extensions: z,
|
|
104
|
+
placeholder: r(() => t.placeholder)
|
|
105
|
+
});
|
|
106
|
+
H(o, () => {
|
|
107
|
+
o.value && Object.hasOwn(B, "autofocus") && o.value.focus();
|
|
108
|
+
});
|
|
109
|
+
const g = d(!1), F = d(""), P = d({ left: 0, top: 0 }), h = d(null), { handleDropdownSelect: K, updateDropdownVisibility: L } = Z({
|
|
110
|
+
codeMirror: o,
|
|
111
|
+
query: F,
|
|
112
|
+
showDropdown: g,
|
|
113
|
+
dropdownPosition: P
|
|
114
|
+
}), U = s(() => g.value && t.withVariables && t.layout !== "modal" && !!t.environment), m = (e, l) => {
|
|
115
|
+
if (g.value) {
|
|
116
|
+
e === "down" || e === "up" ? (l.preventDefault(), h.value?.handleArrowKey(e)) : e === "enter" && (l.preventDefault(), h.value?.handleSelect());
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
e === "escape" && !t.disableTabIndent && l.stopPropagation(), e === "enter" && l.target instanceof HTMLDivElement && p(l.target.textContent ?? "");
|
|
120
|
+
};
|
|
121
|
+
return M({
|
|
122
|
+
focus: () => o.value?.focus(),
|
|
123
|
+
handleChange: C,
|
|
124
|
+
handleSubmit: p,
|
|
125
|
+
handleBlur: S,
|
|
126
|
+
booleanOptions: x,
|
|
127
|
+
codeMirror: o,
|
|
128
|
+
modelValue: t.modelValue
|
|
129
|
+
}), (e, l) => (n(), i(Q, null, [
|
|
130
|
+
e.disabled ? (n(), i("div", {
|
|
131
|
+
key: 0,
|
|
132
|
+
class: G(["text-c-2 flex cursor-default items-center justify-center", e.layout === "modal" ? "font-code pr-2 pl-1 text-base" : "px-2"]),
|
|
133
|
+
"data-testid": "code-input-disabled"
|
|
134
|
+
}, [
|
|
135
|
+
v("span", oe, J(e.modelValue), 1)
|
|
136
|
+
], 2)) : t.enum?.length ? (n(), c(V, {
|
|
137
|
+
key: 1,
|
|
138
|
+
default: t.default,
|
|
139
|
+
modelValue: e.modelValue,
|
|
140
|
+
type: I.value,
|
|
141
|
+
value: t.enum,
|
|
142
|
+
"onUpdate:modelValue": y
|
|
143
|
+
}, null, 8, ["default", "modelValue", "type", "value"])) : A.value ? (n(), c(V, {
|
|
144
|
+
key: 2,
|
|
145
|
+
default: t.default,
|
|
146
|
+
modelValue: e.modelValue,
|
|
147
|
+
value: x.value,
|
|
148
|
+
"onUpdate:modelValue": y
|
|
149
|
+
}, null, 8, ["default", "modelValue", "value"])) : e.examples?.length ? (n(), c(V, {
|
|
150
|
+
key: 3,
|
|
151
|
+
default: t.default,
|
|
152
|
+
modelValue: e.modelValue,
|
|
153
|
+
value: e.examples,
|
|
154
|
+
"onUpdate:modelValue": y
|
|
155
|
+
}, null, 8, ["default", "modelValue", "value"])) : (n(), i("div", X({
|
|
156
|
+
key: 4,
|
|
157
|
+
id: T(q)
|
|
158
|
+
}, e.$attrs, {
|
|
159
|
+
ref_key: "codeMirrorRef",
|
|
160
|
+
ref: E,
|
|
161
|
+
class: ["group/input group-[.alert]:outline-orange group-[.error]:outline-red font-code peer relative w-full overflow-hidden text-xs leading-[1.44] whitespace-nowrap -outline-offset-1 has-[:focus-visible]:rounded-[4px] has-[:focus-visible]:outline", {
|
|
162
|
+
"line-wrapping has-[:focus-visible]:bg-b-1 has-[:focus-visible]:absolute has-[:focus-visible]:z-1": e.lineWrapping,
|
|
163
|
+
"flow-code-input--error": e.error
|
|
164
|
+
}],
|
|
165
|
+
onKeydown: [
|
|
166
|
+
l[0] || (l[0] = b(D((a) => m("down", a), ["stop"]), ["down"])),
|
|
167
|
+
l[1] || (l[1] = b((a) => m("enter", a), ["enter"])),
|
|
168
|
+
l[2] || (l[2] = b((a) => m("escape", a), ["escape"])),
|
|
169
|
+
l[3] || (l[3] = b(D((a) => m("up", a), ["stop"]), ["up"]))
|
|
170
|
+
]
|
|
171
|
+
}), [
|
|
172
|
+
e.disableTabIndent ? f("", !0) : (n(), i("div", re, [...l[5] || (l[5] = [
|
|
173
|
+
w(" Press ", -1),
|
|
174
|
+
v("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Esc", -1),
|
|
175
|
+
w(" then ", -1),
|
|
176
|
+
v("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Tab", -1),
|
|
177
|
+
w(" to exit ", -1)
|
|
178
|
+
])]))
|
|
179
|
+
], 16, ae)),
|
|
180
|
+
e.$slots.warning ? (n(), i("div", ie, [
|
|
181
|
+
$(e.$slots, "warning", {}, void 0, !0)
|
|
182
|
+
])) : f("", !0),
|
|
183
|
+
e.$slots.icon ? (n(), i("div", ue, [
|
|
184
|
+
$(e.$slots, "icon", {}, void 0, !0)
|
|
185
|
+
])) : f("", !0),
|
|
186
|
+
e.required ? (n(), i("div", de, " Required ")) : f("", !0),
|
|
187
|
+
U.value && e.environment ? (n(), c(te, {
|
|
188
|
+
key: 8,
|
|
189
|
+
ref_key: "dropdownRef",
|
|
190
|
+
ref: h,
|
|
191
|
+
dropdownPosition: P.value,
|
|
192
|
+
environment: e.environment,
|
|
193
|
+
query: F.value,
|
|
194
|
+
onRedirect: l[4] || (l[4] = (a) => u("redirectToEnvironment")),
|
|
195
|
+
onSelect: T(K)
|
|
196
|
+
}, null, 8, ["dropdownPosition", "environment", "query", "onSelect"])) : f("", !0)
|
|
197
|
+
], 64));
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
export {
|
|
201
|
+
ge as default
|
|
202
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type DecorationSet, EditorView, ViewPlugin, type ViewUpdate } from '@scalar/use-codemirror';
|
|
2
|
+
import type { XScalarEnvironment } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-environments';
|
|
3
|
+
/**
|
|
4
|
+
* Styles the active environment variable pill.
|
|
5
|
+
* This plugin creates decorations for environment variables in the editor.
|
|
6
|
+
*/
|
|
7
|
+
export declare const pillPlugin: (props: {
|
|
8
|
+
environment: XScalarEnvironment | undefined;
|
|
9
|
+
isReadOnly: boolean | undefined;
|
|
10
|
+
}) => ViewPlugin<{
|
|
11
|
+
decorations: DecorationSet;
|
|
12
|
+
lastEnvironment: XScalarEnvironment | undefined;
|
|
13
|
+
update(update: ViewUpdate): void;
|
|
14
|
+
buildDecorations(view: EditorView): DecorationSet;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Custom backspace handler for the editor.
|
|
18
|
+
* Handles special cases like removing entire variable syntax and clearing all content.
|
|
19
|
+
*/
|
|
20
|
+
export declare const backspaceCommand: import("@codemirror/state").Extension;
|
|
21
|
+
//# sourceMappingURL=code-variable-widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-variable-widget.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/code-input/code-variable-widget.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AAyFnH;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO;IAAE,WAAW,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAAC,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE;iBAG/F,aAAa;qBACT,kBAAkB,GAAG,SAAS;mBAOhC,UAAU,GAAG,IAAI;2BAcT,UAAU,GAAG,aAAa;EAsCpD,CAAA;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,uCAoC3B,CAAA"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { ScalarTooltip as m } from "@scalar/components";
|
|
2
|
+
import { REGEX as u } from "@scalar/helpers/regex/regex-helpers";
|
|
3
|
+
import { ViewPlugin as p, EditorView as v, RangeSetBuilder as b, Decoration as g, WidgetType as E } from "@scalar/use-codemirror";
|
|
4
|
+
import { defineComponent as C, h as l, createApp as w } from "vue";
|
|
5
|
+
class c extends E {
|
|
6
|
+
constructor(e, n) {
|
|
7
|
+
super(), this.variableName = e, this.pillColor = n?.color || "var(--scalar-color-1)";
|
|
8
|
+
const t = n?.variables?.find((i) => i.name === e), a = t ? typeof t.value == "string" ? t.value : t.value?.default : void 0;
|
|
9
|
+
this.variableInfo = {
|
|
10
|
+
value: a || "No value",
|
|
11
|
+
hasValue: !!a
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
app;
|
|
15
|
+
pillColor;
|
|
16
|
+
variableInfo;
|
|
17
|
+
toDOM() {
|
|
18
|
+
const e = document.createElement("span");
|
|
19
|
+
e.className = "cm-pill", e.textContent = this.variableName, e.style.setProperty("--tw-bg-base", this.pillColor), e.style.opacity = this.variableInfo.hasValue ? "1" : "0.5";
|
|
20
|
+
const n = C({
|
|
21
|
+
render: () => {
|
|
22
|
+
const t = l("div", { class: "flex items-center gap-1 whitespace-nowrap" }, [
|
|
23
|
+
l("span", this.variableName)
|
|
24
|
+
]);
|
|
25
|
+
return l(
|
|
26
|
+
m,
|
|
27
|
+
{
|
|
28
|
+
content: this.variableInfo.value,
|
|
29
|
+
delay: 0,
|
|
30
|
+
placement: "bottom",
|
|
31
|
+
offset: 6
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
default: () => t
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return this.app = w(n), this.app.mount(e), e;
|
|
40
|
+
}
|
|
41
|
+
destroy() {
|
|
42
|
+
this.app && (this.app.unmount(), this.app = null);
|
|
43
|
+
}
|
|
44
|
+
eq(e) {
|
|
45
|
+
return e instanceof c && e.variableName === this.variableName && e.pillColor === this.pillColor && e.variableInfo.value === this.variableInfo.value && e.variableInfo.hasValue === this.variableInfo.hasValue;
|
|
46
|
+
}
|
|
47
|
+
ignoreEvent() {
|
|
48
|
+
return !1;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const N = (o) => p.fromClass(
|
|
52
|
+
class {
|
|
53
|
+
decorations;
|
|
54
|
+
lastEnvironment;
|
|
55
|
+
constructor(e) {
|
|
56
|
+
this.lastEnvironment = o.environment, this.decorations = this.buildDecorations(e);
|
|
57
|
+
}
|
|
58
|
+
update(e) {
|
|
59
|
+
if (o.environment !== this.lastEnvironment) {
|
|
60
|
+
this.lastEnvironment = o.environment, this.decorations = this.buildDecorations(e.view);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
(e.docChanged || e.viewportChanged) && (this.decorations = this.buildDecorations(e.view));
|
|
64
|
+
}
|
|
65
|
+
buildDecorations(e) {
|
|
66
|
+
const n = new b();
|
|
67
|
+
for (const { from: t, to: a } of e.visibleRanges) {
|
|
68
|
+
const i = e.state.doc.sliceString(t, a), f = new RegExp(u.VARIABLES.source, u.VARIABLES.flags);
|
|
69
|
+
let s;
|
|
70
|
+
for (; (s = f.exec(i)) !== null; ) {
|
|
71
|
+
const r = t + s.index, d = r + s[0].length, h = s[1] ?? "";
|
|
72
|
+
e.state.doc.sliceString(r, d).includes(`
|
|
73
|
+
`) || n.add(
|
|
74
|
+
r,
|
|
75
|
+
d,
|
|
76
|
+
g.widget({
|
|
77
|
+
widget: new c(h, o.environment),
|
|
78
|
+
side: 1
|
|
79
|
+
})
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return n.finish();
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
decorations: (e) => e.decorations
|
|
88
|
+
}
|
|
89
|
+
), S = v.domEventHandlers({
|
|
90
|
+
keydown(o, e) {
|
|
91
|
+
if (o.key !== "Backspace")
|
|
92
|
+
return !1;
|
|
93
|
+
const { state: n } = e, { from: t, to: a } = n.selection.main;
|
|
94
|
+
return t === 0 && a === n.doc.length ? (e.dispatch({
|
|
95
|
+
changes: { from: 0, to: n.doc.length },
|
|
96
|
+
selection: { anchor: 0 }
|
|
97
|
+
}), o.preventDefault(), !0) : t === a && t >= 2 && n.doc.sliceString(t - 2, t) === "}}" ? (e.dispatch({
|
|
98
|
+
changes: { from: t - 2, to: t },
|
|
99
|
+
selection: { anchor: t - 2 }
|
|
100
|
+
}), o.preventDefault(), !0) : !1;
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
export {
|
|
104
|
+
S as backspaceCommand,
|
|
105
|
+
N as pillPlugin
|
|
106
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/code-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
columns: (string | undefined)[];
|
|
3
|
+
/** Scroll horizontally */
|
|
4
|
+
scroll?: boolean;
|
|
5
|
+
/** Presentational table */
|
|
6
|
+
presentational?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
caption?: (props: typeof __VLS_1) => any;
|
|
11
|
+
} & {
|
|
12
|
+
default?: (props: typeof __VLS_3) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_component: 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>;
|
|
15
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
18
|
+
new (): {
|
|
19
|
+
$slots: S;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=DataTable.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTable.vue"],"names":[],"mappings":"AAwCA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAA;IAC/B,0BAA0B;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,2BAA2B;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAC;AA8CF,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAoB/C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent as s, createElementBlock as o, openBlock as l, normalizeProps as n, guardReactiveProps as i, unref as m, createElementVNode as p, normalizeStyle as c, normalizeClass as u, createCommentVNode as d, renderSlot as t } from "vue";
|
|
2
|
+
import { useBindCx as f } from "@scalar/components";
|
|
3
|
+
const b = ["role"], y = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "sr-only"
|
|
6
|
+
}, _ = /* @__PURE__ */ s({
|
|
7
|
+
__name: "DataTable",
|
|
8
|
+
props: {
|
|
9
|
+
columns: {},
|
|
10
|
+
scroll: { type: Boolean },
|
|
11
|
+
presentational: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
setup(v) {
|
|
14
|
+
const { cx: a } = f();
|
|
15
|
+
return (e, w) => (l(), o("div", n(i(
|
|
16
|
+
m(a)(
|
|
17
|
+
e.scroll ? "overflow-x-auto custom-scroll" : "overflow-visible",
|
|
18
|
+
"scalar-data-table"
|
|
19
|
+
)
|
|
20
|
+
)), [
|
|
21
|
+
p("table", {
|
|
22
|
+
class: u(["mb-0 grid min-h-8 auto-rows-auto border-t", { "w-max min-w-full": e.scroll }]),
|
|
23
|
+
role: e.presentational ? "presentation" : "table",
|
|
24
|
+
style: c({
|
|
25
|
+
gridTemplateColumns: e.columns.map((r) => r || "1fr").join(" ")
|
|
26
|
+
})
|
|
27
|
+
}, [
|
|
28
|
+
e.$slots.caption ? (l(), o("caption", y, [
|
|
29
|
+
t(e.$slots, "caption")
|
|
30
|
+
])) : d("", !0),
|
|
31
|
+
t(e.$slots, "default")
|
|
32
|
+
], 14, b)
|
|
33
|
+
], 16));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
_ as default
|
|
38
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
is?: string | Component;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_6: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_6) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
is: string | Component;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=DataTableCell.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableCell.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableCell.vue"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACxB,CAAC;AA4CJ,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;AAqB/C,QAAA,MAAM,eAAe;QApEZ,MAAM,GAAG,SAAS;6EA2EzB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent as t, createBlock as o, openBlock as a, resolveDynamicComponent as n, mergeProps as s, unref as l, withCtx as p, renderSlot as b } from "vue";
|
|
2
|
+
import { useBindCx as d } from "@scalar/components";
|
|
3
|
+
const f = /* @__PURE__ */ t({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "DataTableCell",
|
|
6
|
+
props: {
|
|
7
|
+
is: { default: "td" }
|
|
8
|
+
},
|
|
9
|
+
setup(i) {
|
|
10
|
+
const { cx: r } = d();
|
|
11
|
+
return (e, m) => (a(), o(n(e.is), s(
|
|
12
|
+
l(r)(
|
|
13
|
+
"box-content max-h-8 min-h-8 min-w-8 border-l-0 border-t border-b-0 border-r flex text-base last:border-r-0 group-last:border-b-transparent p-0 m-0 relative"
|
|
14
|
+
),
|
|
15
|
+
{ class: "group-[.alert]:bg-b-alert group-[.error]:bg-b-danger" }
|
|
16
|
+
), {
|
|
17
|
+
default: p(() => [
|
|
18
|
+
b(e.$slots, "default")
|
|
19
|
+
]),
|
|
20
|
+
_: 3
|
|
21
|
+
}, 16));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
f as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: boolean;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
align?: 'left' | 'center';
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
7
|
+
"update:modelValue": (v: boolean) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
align: "left" | "center";
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=DataTableCheckbox.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableCheckbox.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableCheckbox.vue"],"names":[],"mappings":"AA0DA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;CAC1B,CAAC;;;;;;WADQ,MAAM,GAAG,QAAQ;;AAoH7B,wBAQG"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineComponent as c, createBlock as n, openBlock as i, withCtx as d, createElementVNode as a, normalizeClass as t, unref as l, createVNode as u } from "vue";
|
|
2
|
+
import { cva as p, ScalarIcon as m } from "@scalar/components";
|
|
3
|
+
import b from "./DataTableCell.vue.js";
|
|
4
|
+
const f = ["checked", "disabled"], y = /* @__PURE__ */ c({
|
|
5
|
+
__name: "DataTableCheckbox",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: { type: Boolean },
|
|
8
|
+
disabled: { type: Boolean },
|
|
9
|
+
align: { default: "center" }
|
|
10
|
+
},
|
|
11
|
+
emits: ["update:modelValue"],
|
|
12
|
+
setup(h) {
|
|
13
|
+
const s = p({
|
|
14
|
+
base: "w-8 h-8 flex items-center justify-center text-border peer-checked:text-c-1 pointer-events-none absolute",
|
|
15
|
+
variants: {
|
|
16
|
+
align: {
|
|
17
|
+
left: "left-0",
|
|
18
|
+
center: "centered"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return (e, o) => (i(), n(b, { class: "group/cell relative flex min-w-8" }, {
|
|
23
|
+
default: d(() => [
|
|
24
|
+
a("input", {
|
|
25
|
+
checked: e.modelValue,
|
|
26
|
+
class: "peer absolute inset-0 cursor-pointer opacity-0 disabled:cursor-default",
|
|
27
|
+
disabled: !!e.disabled,
|
|
28
|
+
type: "checkbox",
|
|
29
|
+
onChange: o[0] || (o[0] = (r) => e.$emit("update:modelValue", r.target.checked))
|
|
30
|
+
}, null, 40, f),
|
|
31
|
+
a("div", {
|
|
32
|
+
class: t(l(s)({ align: e.align }))
|
|
33
|
+
}, [
|
|
34
|
+
a("div", {
|
|
35
|
+
class: t([
|
|
36
|
+
"absolute m-auto size-3/4 rounded border-[1px] opacity-0",
|
|
37
|
+
!e.disabled && "group-has-[:focus-visible]/cell:border-c-accent group-hover/cell:opacity-100 group-has-[:focus-visible]/cell:opacity-100"
|
|
38
|
+
])
|
|
39
|
+
}, null, 2),
|
|
40
|
+
u(l(m), {
|
|
41
|
+
icon: "Checkmark",
|
|
42
|
+
size: "xs",
|
|
43
|
+
thickness: "2.5"
|
|
44
|
+
})
|
|
45
|
+
], 2)
|
|
46
|
+
]),
|
|
47
|
+
_: 1
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export {
|
|
52
|
+
y as default
|
|
53
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_5: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_5) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
7
|
+
export default _default;
|
|
8
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
9
|
+
new (): {
|
|
10
|
+
$slots: S;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=DataTableHeader.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableHeader.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableHeader.vue"],"names":[],"mappings":"AA8CA,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;AAoB/C,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAE1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineComponent as o, createBlock as r, openBlock as n, mergeProps as m, unref as s, withCtx as a, renderSlot as f } from "vue";
|
|
2
|
+
import { useBindCx as i } from "@scalar/components";
|
|
3
|
+
import c from "./DataTableCell.vue.js";
|
|
4
|
+
const x = /* @__PURE__ */ o({
|
|
5
|
+
__name: "DataTableHeader",
|
|
6
|
+
setup(p) {
|
|
7
|
+
const { cx: e } = i();
|
|
8
|
+
return (t, u) => (n(), r(c, m({ is: "th" }, s(e)("items-center font-medium px-2 min-w-0 -outline-offset-1")), {
|
|
9
|
+
default: a(() => [
|
|
10
|
+
f(t.$slots, "default")
|
|
11
|
+
]),
|
|
12
|
+
_: 3
|
|
13
|
+
}, 16));
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
export {
|
|
17
|
+
x as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
2
|
+
import type { EnvVariable } from '../../../store/active-entities.js';
|
|
3
|
+
import type { VueClassProp } from '../../../types/vue';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
id?: string;
|
|
6
|
+
type?: string | undefined;
|
|
7
|
+
/** Class for the wrapping cell because attrs is bound to the input */
|
|
8
|
+
containerClass?: VueClassProp | undefined;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
modelValue: string | number;
|
|
11
|
+
/** Allows adding a custom value to the enum dropdown, defaults to true */
|
|
12
|
+
canAddCustomEnumValue?: boolean;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
enum?: string[];
|
|
15
|
+
min?: number;
|
|
16
|
+
max?: number;
|
|
17
|
+
environment: Environment;
|
|
18
|
+
envVariables: EnvVariable[];
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
lineWrapping?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare var __VLS_5: {}, __VLS_25: {}, __VLS_27: {};
|
|
23
|
+
type __VLS_Slots = {} & {
|
|
24
|
+
default?: (props: typeof __VLS_5) => any;
|
|
25
|
+
} & {
|
|
26
|
+
warning?: (props: typeof __VLS_25) => any;
|
|
27
|
+
} & {
|
|
28
|
+
icon?: (props: typeof __VLS_27) => any;
|
|
29
|
+
};
|
|
30
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
31
|
+
selectVariable: (value: string) => any;
|
|
32
|
+
"update:modelValue": (v: string) => any;
|
|
33
|
+
inputFocus: () => any;
|
|
34
|
+
inputBlur: () => any;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
36
|
+
onSelectVariable?: ((value: string) => any) | undefined;
|
|
37
|
+
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
38
|
+
onInputFocus?: (() => any) | undefined;
|
|
39
|
+
onInputBlur?: (() => any) | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
required: boolean;
|
|
42
|
+
readOnly: boolean;
|
|
43
|
+
lineWrapping: boolean;
|
|
44
|
+
canAddCustomEnumValue: boolean;
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=DataTableInput.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/data-table/DataTableInput.vue"],"names":[],"mappings":"AAqMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAIzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAK/C,KAAK,WAAW,GAAG;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,sEAAsE;IACtE,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,CAAC;AAwSJ,QAAA,IAAI,OAAO,IAAU,EAAuB,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACvF,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAmC7C,QAAA,MAAM,eAAe;;;;;;;;;;;cA3VN,OAAO;cAIP,OAAO;kBAOH,OAAO;2BARE,OAAO;6EAgWjC,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|