@scalar/api-client 2.5.35 → 2.6.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 +22 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts +0 -3
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +60 -62
- package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -3
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +25 -32
- package/dist/components/DataTable/DataTableInput.vue.d.ts +0 -2
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +2 -2
- package/dist/components/DataTable/DataTableInput.vue2.js +17 -19
- package/dist/layouts/App/create-api-client-app.d.ts +10 -10
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +20 -20
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +10 -10
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +10 -10
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +10 -10
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts +10 -10
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts +14 -0
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +55 -0
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue2.js +4 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +104 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +7 -0
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +237 -0
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +41 -0
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.js +20 -0
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/find-client.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +20 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +4 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +17 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +30 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts +29 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +209 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts +26 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +29 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +4 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.js +10 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts +7 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.js +28 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/get-example-value.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +52 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +59 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +12 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +57 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts +25 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +212 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +15 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.js +55 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts +6 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +18 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.test.d.ts +2 -0
- package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.test.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/index.d.ts +3 -0
- package/dist/v2/blocks/operation-code-sample/index.d.ts.map +1 -0
- package/dist/v2/blocks/operation-code-sample/index.js +6 -0
- package/dist/v2/blocks/operation-code-sample/types.d.ts +29 -0
- package/dist/v2/blocks/operation-code-sample/types.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +65 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +7 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +122 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts +25 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +7 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +90 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts +55 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +39 -0
- package/dist/v2/blocks/scalar-address-bar-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-address-bar-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-address-bar-block/index.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +49 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +172 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts +17 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +52 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +45 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +254 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts +16 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +134 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +33 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +7 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +82 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +48 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +48 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +29 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +232 -0
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +4 -0
- package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts +29 -0
- package/dist/v2/blocks/scalar-auth-selector-block/event-types.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts +9 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +121 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +34 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +111 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts +39 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +52 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-auth-selector-block/index.js +4 -0
- package/dist/v2/components/server/ServerDropdown.test.d.ts +2 -0
- package/dist/v2/components/server/ServerDropdown.test.d.ts.map +1 -0
- package/dist/v2/components/server/ServerDropdown.vue.d.ts +33 -0
- package/dist/v2/components/server/ServerDropdown.vue.d.ts.map +1 -0
- package/dist/v2/components/server/ServerDropdown.vue.js +87 -0
- package/dist/v2/components/server/ServerDropdown.vue2.js +4 -0
- package/dist/v2/components/server/ServerDropdownItem.test.d.ts +2 -0
- package/dist/v2/components/server/ServerDropdownItem.test.d.ts.map +1 -0
- package/dist/v2/components/server/ServerDropdownItem.vue.d.ts +21 -0
- package/dist/v2/components/server/ServerDropdownItem.vue.d.ts.map +1 -0
- package/dist/v2/components/server/ServerDropdownItem.vue.js +7 -0
- package/dist/v2/components/server/ServerDropdownItem.vue2.js +51 -0
- package/dist/v2/components/server/index.d.ts +2 -0
- package/dist/v2/components/server/index.d.ts.map +1 -0
- package/dist/v2/components/server/index.js +4 -0
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +4 -4
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/vitest.setup.d.ts.map +1 -1
- package/package.json +14 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @scalar/api-client
|
|
2
2
|
|
|
3
|
+
## 2.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 170b890: feat: scalar address bar block
|
|
8
|
+
- db5b649: feat: auth selector block
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- b858566: chore: moved api client code sample to new store
|
|
13
|
+
- Updated dependencies [6462733]
|
|
14
|
+
- Updated dependencies [b858566]
|
|
15
|
+
- Updated dependencies [db5b649]
|
|
16
|
+
- @scalar/json-magic@0.5.2
|
|
17
|
+
- @scalar/workspace-store@0.16.0
|
|
18
|
+
- @scalar/components@0.14.37
|
|
19
|
+
- @scalar/oas-utils@0.4.32
|
|
20
|
+
- @scalar/openapi-parser@0.21.2
|
|
21
|
+
- @scalar/use-codemirror@0.12.38
|
|
22
|
+
- @scalar/postman-to-openapi@0.3.35
|
|
23
|
+
- @scalar/import@0.4.27
|
|
24
|
+
|
|
3
25
|
## 2.5.35
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
2
|
-
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
3
2
|
import { type CodeMirrorLanguage, type Extension } from '@scalar/use-codemirror';
|
|
4
3
|
import { type Ref } from 'vue';
|
|
5
4
|
import type { EnvVariable } from '../../store/active-entities.js';
|
|
@@ -29,7 +28,6 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
29
28
|
default?: string | number;
|
|
30
29
|
environment: Environment;
|
|
31
30
|
envVariables: EnvVariable[];
|
|
32
|
-
workspace: Workspace;
|
|
33
31
|
lineWrapping?: boolean;
|
|
34
32
|
}, {
|
|
35
33
|
/** Expose focus method */
|
|
@@ -71,7 +69,6 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
71
69
|
default?: string | number;
|
|
72
70
|
environment: Environment;
|
|
73
71
|
envVariables: EnvVariable[];
|
|
74
|
-
workspace: Workspace;
|
|
75
72
|
lineWrapping?: boolean;
|
|
76
73
|
}> & Readonly<{
|
|
77
74
|
onSubmit?: ((v: string) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodeInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.vue"],"names":[],"mappings":"AA2eA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAyC,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAGrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;;kBAUxC,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;iBACP,SAAS,EAAE;kBACV,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;mBACZ,OAAO;;IAiMxB,0BAA0B;;0BArJC,MAAM;0BA0BN,MAAM;wBAOR,MAAM;;;;;;;;;;kBAtGf,OAAO;eACV,OAAO;gBACN,MAAM,GAAG,MAAM;YACnB,OAAO;iBACF,OAAO;iBACP,SAAS,EAAE;kBACV,OAAO;WACd,OAAO;uBACK,OAAO;eACf,kBAAkB;wBACT,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;wBACnB,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI;kBACzB,MAAM;eACT,OAAO;mBACH,OAAO;2BACC,OAAO;WACvB,MAAM,EAAE;eACJ,MAAM,EAAE;WACZ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;eACzB,OAAO;oBACF,OAAO;iBACV,OAAO;cACV,MAAM,GAAG,MAAM;iBACZ,WAAW;kBACV,WAAW,EAAE;mBACZ,OAAO;;;;;;;cAxBX,OAAO;cAkBP,OAAO;iBAnBJ,OAAO;gBAIR,OAAO;gBACP,SAAS,EAAE;sBAGL,OAAO;kBAMX,OAAO;0BACC,OAAO;mBAKd,OAAO;kBAKR,OAAO;;cAkhBZ,CAAC,KAAK,IAAiB,KAAK,GAAG;;WAClC,CAAC,KAAK,IAAiB,KAAK,GAAG;;AA9iB1C,wBAmmBC;AAYD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import o from "./CodeInput.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-103d9d56"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
_ as default
|
|
8
8
|
};
|
|
@@ -2,7 +2,7 @@ import { defineComponent as W, useAttrs as j, ref as i, computed as d, toRef as
|
|
|
2
2
|
import { useCodeMirror as Y, useDropdown as Z, colorPicker as _ } from "@scalar/use-codemirror";
|
|
3
3
|
import { nanoid as ee } from "nanoid";
|
|
4
4
|
import oe from "../../views/Environment/EnvironmentVariableDropdown.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import x from "../DataTable/DataTableInputSelect.vue.js";
|
|
6
6
|
import { pillPlugin as le, backspaceCommand as te } from "./codeVariableWidget.js";
|
|
7
7
|
import { useLayout as ne } from "../../hooks/useLayout.js";
|
|
8
8
|
const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
|
|
@@ -49,34 +49,32 @@ const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
|
|
|
49
49
|
default: {},
|
|
50
50
|
environment: {},
|
|
51
51
|
envVariables: {},
|
|
52
|
-
workspace: {},
|
|
53
52
|
lineWrapping: { type: Boolean, default: !1 }
|
|
54
53
|
},
|
|
55
54
|
emits: ["submit", "update:modelValue", "curl", "blur"],
|
|
56
55
|
setup(R, { expose: A, emit: I }) {
|
|
57
|
-
const
|
|
58
|
-
function D(
|
|
59
|
-
return
|
|
56
|
+
const o = R, s = I, B = j(), M = B.id || `id-${ee()}`, k = i(!1), y = i(!1), C = i(""), S = i({ left: 0, top: 0 }), f = i(null), { layout: g } = ne();
|
|
57
|
+
function D(e) {
|
|
58
|
+
return e === o.modelValue ? null : o.importCurl && e.trim().toLowerCase().startsWith("curl") ? (s("curl", e), a.value?.dispatch({
|
|
60
59
|
changes: {
|
|
61
60
|
from: 0,
|
|
62
61
|
to: a.value.state.doc.length,
|
|
63
|
-
insert: String(
|
|
62
|
+
insert: String(o.modelValue)
|
|
64
63
|
}
|
|
65
|
-
}), null) :
|
|
64
|
+
}), null) : o.handleFieldChange ? o.handleFieldChange(e) : s("update:modelValue", e);
|
|
66
65
|
}
|
|
67
|
-
function v(
|
|
68
|
-
return
|
|
66
|
+
function v(e) {
|
|
67
|
+
return o.handleFieldSubmit ? o.handleFieldSubmit(e) : s("submit", e);
|
|
69
68
|
}
|
|
70
|
-
function P(
|
|
71
|
-
|
|
69
|
+
function P(e) {
|
|
70
|
+
k.value = !1, o.emitOnBlur && o.modelValue && v(e), s("blur", e);
|
|
72
71
|
}
|
|
73
|
-
const E = [...
|
|
74
|
-
|
|
72
|
+
const E = [...o.extensions];
|
|
73
|
+
o.colorPicker && E.push(_);
|
|
75
74
|
const N = d(
|
|
76
75
|
() => le({
|
|
77
|
-
environment:
|
|
78
|
-
envVariables:
|
|
79
|
-
workspace: e.workspace,
|
|
76
|
+
environment: o.environment,
|
|
77
|
+
envVariables: o.envVariables,
|
|
80
78
|
isReadOnly: g === "modal"
|
|
81
79
|
})
|
|
82
80
|
), O = d(() => [
|
|
@@ -85,25 +83,25 @@ const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
|
|
|
85
83
|
te
|
|
86
84
|
]), F = i(null), { codeMirror: a } = Y({
|
|
87
85
|
content: r(
|
|
88
|
-
() =>
|
|
86
|
+
() => o.modelValue !== void 0 ? String(o.modelValue) : ""
|
|
89
87
|
),
|
|
90
|
-
onChange: (
|
|
91
|
-
D(
|
|
88
|
+
onChange: (e) => {
|
|
89
|
+
D(e), z();
|
|
92
90
|
},
|
|
93
|
-
onFocus: () =>
|
|
94
|
-
onBlur: (
|
|
91
|
+
onFocus: () => k.value = !0,
|
|
92
|
+
onBlur: (e) => P(e),
|
|
95
93
|
codeMirrorRef: F,
|
|
96
|
-
disableTabIndent: r(() =>
|
|
97
|
-
disableEnter: r(() =>
|
|
98
|
-
disableCloseBrackets: r(() =>
|
|
99
|
-
lineNumbers: r(() =>
|
|
100
|
-
language: r(() =>
|
|
101
|
-
lint: r(() =>
|
|
94
|
+
disableTabIndent: r(() => o.disableTabIndent),
|
|
95
|
+
disableEnter: r(() => o.disableEnter),
|
|
96
|
+
disableCloseBrackets: r(() => o.disableCloseBrackets),
|
|
97
|
+
lineNumbers: r(() => o.lineNumbers),
|
|
98
|
+
language: r(() => o.language),
|
|
99
|
+
lint: r(() => o.lint),
|
|
102
100
|
extensions: O,
|
|
103
|
-
placeholder: r(() =>
|
|
101
|
+
placeholder: r(() => o.placeholder)
|
|
104
102
|
});
|
|
105
103
|
a.value?.focus(), H(a, () => {
|
|
106
|
-
a.value && Object.hasOwn(
|
|
104
|
+
a.value && Object.hasOwn(B, "autofocus") && a.value.focus();
|
|
107
105
|
});
|
|
108
106
|
const { handleDropdownSelect: K, updateDropdownVisibility: z } = Z({
|
|
109
107
|
codeMirror: a,
|
|
@@ -111,17 +109,17 @@ const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
|
|
|
111
109
|
showDropdown: y,
|
|
112
110
|
dropdownPosition: S
|
|
113
111
|
}), T = d(
|
|
114
|
-
() =>
|
|
115
|
-
), m = (
|
|
116
|
-
y.value ?
|
|
117
|
-
}, L = d(() => Array.isArray(
|
|
112
|
+
() => o.nullable ? ["true", "false", "null"] : ["true", "false"]
|
|
113
|
+
), m = (e, l) => {
|
|
114
|
+
y.value ? e === "down" ? (l.preventDefault(), f.value?.handleArrowKey("down")) : e === "up" ? (l.preventDefault(), f.value?.handleArrowKey("up")) : e === "enter" && (l.preventDefault(), f.value?.handleSelect()) : e === "escape" ? o.disableTabIndent || l.stopPropagation() : e === "enter" && l.target instanceof HTMLDivElement && v(l.target.textContent ?? "");
|
|
115
|
+
}, L = d(() => Array.isArray(o.type) ? (
|
|
118
116
|
// Find the first type, that's not 'null'
|
|
119
|
-
|
|
117
|
+
o.type.find((e) => e !== "null") ?? "string"
|
|
120
118
|
) : (
|
|
121
119
|
// If it's not an array, just return the type
|
|
122
|
-
|
|
120
|
+
o.type
|
|
123
121
|
)), U = d(
|
|
124
|
-
() => y.value &&
|
|
122
|
+
() => y.value && o.withVariables && g !== "modal" && o.environment
|
|
125
123
|
);
|
|
126
124
|
return A({
|
|
127
125
|
/** Expose focus method */
|
|
@@ -134,42 +132,42 @@ const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
|
|
|
134
132
|
handleBlur: P,
|
|
135
133
|
booleanOptions: T,
|
|
136
134
|
codeMirror: a,
|
|
137
|
-
modelValue:
|
|
138
|
-
}), (
|
|
139
|
-
|
|
135
|
+
modelValue: o.modelValue
|
|
136
|
+
}), (e, l) => (n(), u(Q, null, [
|
|
137
|
+
e.disabled ? (n(), u("div", {
|
|
140
138
|
key: 0,
|
|
141
139
|
class: G(["text-c-2 flex cursor-default items-center justify-center", h(g) === "modal" ? "font-code pr-2 pl-1 text-base" : "px-2"]),
|
|
142
140
|
"data-testid": "code-input-disabled"
|
|
143
141
|
}, [
|
|
144
|
-
w("span", ae, J(
|
|
145
|
-
], 2)) :
|
|
142
|
+
w("span", ae, J(e.modelValue), 1)
|
|
143
|
+
], 2)) : o.enum && o.enum.length ? (n(), c(x, {
|
|
146
144
|
key: 1,
|
|
147
|
-
default:
|
|
148
|
-
modelValue:
|
|
145
|
+
default: o.default,
|
|
146
|
+
modelValue: e.modelValue,
|
|
149
147
|
type: L.value,
|
|
150
|
-
value:
|
|
148
|
+
value: o.enum,
|
|
151
149
|
"onUpdate:modelValue": l[0] || (l[0] = (t) => s("update:modelValue", t))
|
|
152
|
-
}, null, 8, ["default", "modelValue", "type", "value"])) :
|
|
150
|
+
}, null, 8, ["default", "modelValue", "type", "value"])) : e.type === "boolean" || e.type?.includes("boolean") ? (n(), c(x, {
|
|
153
151
|
key: 2,
|
|
154
|
-
default:
|
|
155
|
-
modelValue:
|
|
152
|
+
default: o.default,
|
|
153
|
+
modelValue: e.modelValue,
|
|
156
154
|
value: T.value,
|
|
157
155
|
"onUpdate:modelValue": l[1] || (l[1] = (t) => s("update:modelValue", t))
|
|
158
|
-
}, null, 8, ["default", "modelValue", "value"])) :
|
|
156
|
+
}, null, 8, ["default", "modelValue", "value"])) : o.examples && o.examples.length ? (n(), c(x, {
|
|
159
157
|
key: 3,
|
|
160
|
-
default:
|
|
161
|
-
modelValue:
|
|
162
|
-
value:
|
|
158
|
+
default: o.default,
|
|
159
|
+
modelValue: o.modelValue,
|
|
160
|
+
value: o.examples,
|
|
163
161
|
"onUpdate:modelValue": l[2] || (l[2] = (t) => s("update:modelValue", t))
|
|
164
162
|
}, null, 8, ["default", "modelValue", "value"])) : (n(), u("div", X({
|
|
165
163
|
key: 4,
|
|
166
164
|
id: h(M)
|
|
167
|
-
},
|
|
165
|
+
}, e.$attrs, {
|
|
168
166
|
ref_key: "codeMirrorRef",
|
|
169
167
|
ref: F,
|
|
170
168
|
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", {
|
|
171
|
-
"line-wrapping has-[:focus-visible]:bg-b-1 has-[:focus-visible]:absolute has-[:focus-visible]:z-1":
|
|
172
|
-
"flow-code-input--error":
|
|
169
|
+
"line-wrapping has-[:focus-visible]:bg-b-1 has-[:focus-visible]:absolute has-[:focus-visible]:z-1": e.lineWrapping,
|
|
170
|
+
"flow-code-input--error": e.error
|
|
173
171
|
}],
|
|
174
172
|
onKeydown: [
|
|
175
173
|
l[3] || (l[3] = b($((t) => m("down", t), ["stop"]), ["down"])),
|
|
@@ -178,7 +176,7 @@ const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
|
|
|
178
176
|
l[6] || (l[6] = b($((t) => m("up", t), ["stop"]), ["up"]))
|
|
179
177
|
]
|
|
180
178
|
}), [
|
|
181
|
-
|
|
179
|
+
e.disableTabIndent ? p("", !0) : (n(), u("div", se, l[7] || (l[7] = [
|
|
182
180
|
V(" Press "),
|
|
183
181
|
w("kbd", { class: "-mx-0.25 rounded border px-0.5 font-mono" }, "Esc", -1),
|
|
184
182
|
V(" then "),
|
|
@@ -186,20 +184,20 @@ const ae = { class: "whitespace-nowrap" }, re = ["id"], se = {
|
|
|
186
184
|
V(" to exit ")
|
|
187
185
|
])))
|
|
188
186
|
], 16, re)),
|
|
189
|
-
|
|
190
|
-
q(
|
|
187
|
+
e.$slots.warning ? (n(), u("div", ue, [
|
|
188
|
+
q(e.$slots, "warning", {}, void 0, !0)
|
|
191
189
|
])) : p("", !0),
|
|
192
|
-
|
|
193
|
-
q(
|
|
190
|
+
e.$slots.icon ? (n(), u("div", ie, [
|
|
191
|
+
q(e.$slots, "icon", {}, void 0, !0)
|
|
194
192
|
])) : p("", !0),
|
|
195
|
-
|
|
193
|
+
e.required ? (n(), u("div", de, " Required ")) : p("", !0),
|
|
196
194
|
U.value ? (n(), c(oe, {
|
|
197
195
|
key: 8,
|
|
198
196
|
ref_key: "dropdownRef",
|
|
199
197
|
ref: f,
|
|
200
198
|
dropdownPosition: S.value,
|
|
201
|
-
envVariables:
|
|
202
|
-
environment:
|
|
199
|
+
envVariables: e.envVariables,
|
|
200
|
+
environment: e.environment,
|
|
203
201
|
query: C.value,
|
|
204
202
|
onSelect: h(K)
|
|
205
203
|
}, null, 8, ["dropdownPosition", "envVariables", "environment", "query", "onSelect"])) : p("", !0)
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { type EnvVariables } from '../../libs/env-helpers.js';
|
|
2
1
|
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
3
|
-
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
4
2
|
import { Decoration, type DecorationSet, EditorView, ViewPlugin, type ViewUpdate } from '@scalar/use-codemirror';
|
|
3
|
+
import { type EnvVariables } from '../../libs/env-helpers.js';
|
|
5
4
|
/**
|
|
6
5
|
* Styles the active environment variable pill
|
|
7
6
|
*/
|
|
8
7
|
export declare const pillPlugin: (props: {
|
|
9
8
|
environment: Environment | undefined;
|
|
10
9
|
envVariables: EnvVariables | undefined;
|
|
11
|
-
workspace: Workspace | undefined;
|
|
12
10
|
isReadOnly: boolean | undefined;
|
|
13
11
|
}) => ViewPlugin<{
|
|
14
12
|
decorations: DecorationSet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"codeVariableWidget.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/codeVariableWidget.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAEzE,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,UAAU,EAEV,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAA;AAK/B,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,oBAAoB,CAAA;AAiGnE;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO;IAChC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAA;IACpC,YAAY,EAAE,YAAY,GAAG,SAAS,CAAA;IACtC,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;CAChC;iBAGkB,aAAa;mBAMX,UAAU;2BASF,UAAU;EA4BpC,CAAA;AAEH,eAAO,MAAM,gBAAgB,uCA8B3B,CAAA"}
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { defineComponent as
|
|
7
|
-
import {
|
|
1
|
+
import { ScalarTooltip as p } from "@scalar/components";
|
|
2
|
+
import { ScalarIconGlobe as h } from "@scalar/icons";
|
|
3
|
+
import { REGEX as u } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import { ViewPlugin as v, EditorView as f, RangeSetBuilder as b, Decoration as g, WidgetType as y } from "@scalar/use-codemirror";
|
|
5
|
+
import { nanoid as N } from "nanoid";
|
|
6
|
+
import { defineComponent as w, h as l, createApp as E } from "vue";
|
|
7
|
+
import { getEnvColor as C } from "../../libs/env-helpers.js";
|
|
8
8
|
import { parseEnvVariables as V } from "../../libs/environment-parser.js";
|
|
9
9
|
class m extends y {
|
|
10
|
-
constructor(e, n, t, o
|
|
11
|
-
super(), this.variableName = e, this.variableName = e, this.environment = n, this.envVariables = t, this.
|
|
10
|
+
constructor(e, n, t, o) {
|
|
11
|
+
super(), this.variableName = e, this.variableName = e, this.environment = n, this.envVariables = t, this.isReadOnly = o ?? !1, this.uid = N();
|
|
12
12
|
}
|
|
13
13
|
app;
|
|
14
14
|
uid;
|
|
15
15
|
environment;
|
|
16
16
|
envVariables;
|
|
17
|
-
workspace;
|
|
18
17
|
isReadOnly;
|
|
19
18
|
toDOM() {
|
|
20
19
|
const e = document.createElement("span");
|
|
21
20
|
e.className = "cm-pill", e.textContent = `${this.variableName}`;
|
|
22
|
-
const n =
|
|
21
|
+
const n = w({
|
|
23
22
|
props: { variableName: { type: String, default: null } },
|
|
24
23
|
render: () => {
|
|
25
|
-
const t = this.envVariables ? V(this.envVariables).find((c) => c.key === this.variableName) : void 0, o = t?.source === "global",
|
|
26
|
-
e.style.setProperty("--tw-bg-base",
|
|
27
|
-
const
|
|
28
|
-
(o || this.environment?.name === "No Environment" && t?.value) && l(
|
|
24
|
+
const t = this.envVariables ? V(this.envVariables).find((c) => c.key === this.variableName) : void 0, o = t?.source === "global", r = o ? "var(--scalar-color-1)" : t && this.environment && this.environment.name !== "No Environment" ? C(this.environment) : "var(--scalar-color-1)";
|
|
25
|
+
e.style.setProperty("--tw-bg-base", r), e.style.opacity = t?.value ? "1" : "0.5";
|
|
26
|
+
const a = t?.value || "No value", s = l("div", { class: "flex items-center gap-1 whitespace-nowrap" }, [
|
|
27
|
+
(o || this.environment?.name === "No Environment" && t?.value) && l(h, { class: "size-3 -ml-1", icon: "Globe" }),
|
|
29
28
|
l("span", this.variableName)
|
|
30
29
|
]);
|
|
31
30
|
return l(
|
|
32
|
-
|
|
31
|
+
p,
|
|
33
32
|
{
|
|
34
|
-
content:
|
|
33
|
+
content: a,
|
|
35
34
|
delay: 0,
|
|
36
35
|
placement: "bottom",
|
|
37
36
|
offset: 6
|
|
@@ -54,7 +53,7 @@ class m extends y {
|
|
|
54
53
|
return !1;
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
|
-
const B = (i) =>
|
|
56
|
+
const B = (i) => v.fromClass(
|
|
58
57
|
class {
|
|
59
58
|
decorations;
|
|
60
59
|
constructor(e) {
|
|
@@ -66,23 +65,17 @@ const B = (i) => f.fromClass(
|
|
|
66
65
|
});
|
|
67
66
|
}
|
|
68
67
|
buildDecorations(e) {
|
|
69
|
-
const n = new
|
|
68
|
+
const n = new b();
|
|
70
69
|
for (const { from: t, to: o } of e.visibleRanges) {
|
|
71
|
-
const
|
|
72
|
-
let
|
|
73
|
-
for (; (
|
|
74
|
-
const s = t +
|
|
70
|
+
const r = e.state.doc.sliceString(t, o);
|
|
71
|
+
let a;
|
|
72
|
+
for (; (a = u.VARIABLES.exec(r)) !== null; ) {
|
|
73
|
+
const s = t + a.index, c = s + a[0].length, d = a[1] ?? "";
|
|
75
74
|
n.add(
|
|
76
75
|
s,
|
|
77
76
|
c,
|
|
78
|
-
|
|
79
|
-
widget: new m(
|
|
80
|
-
d,
|
|
81
|
-
i.environment,
|
|
82
|
-
i.envVariables,
|
|
83
|
-
i.workspace,
|
|
84
|
-
i.isReadOnly
|
|
85
|
-
),
|
|
77
|
+
g.widget({
|
|
78
|
+
widget: new m(d, i.environment, i.envVariables, i.isReadOnly),
|
|
86
79
|
side: 1
|
|
87
80
|
})
|
|
88
81
|
);
|
|
@@ -94,7 +87,7 @@ const B = (i) => f.fromClass(
|
|
|
94
87
|
{
|
|
95
88
|
decorations: (e) => e.decorations
|
|
96
89
|
}
|
|
97
|
-
), P =
|
|
90
|
+
), P = f.domEventHandlers({
|
|
98
91
|
keydown(i, e) {
|
|
99
92
|
if (i.key === "Backspace") {
|
|
100
93
|
const { state: n } = e, { from: t, to: o } = n.selection.main;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
2
|
-
import type { Workspace } from '@scalar/oas-utils/entities/workspace';
|
|
3
2
|
import type { EnvVariable } from '../../store/active-entities.js';
|
|
4
3
|
import type { VueClassProp } from '../../types/vue';
|
|
5
4
|
type __VLS_Props = {
|
|
@@ -17,7 +16,6 @@ type __VLS_Props = {
|
|
|
17
16
|
max?: number;
|
|
18
17
|
environment: Environment;
|
|
19
18
|
envVariables: EnvVariable[];
|
|
20
|
-
workspace: Workspace;
|
|
21
19
|
description?: string | undefined;
|
|
22
20
|
lineWrapping?: boolean;
|
|
23
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/DataTableInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataTableInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/DataTable/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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./DataTableInput.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ a(t, [["__scopeId", "data-v-2b299aed"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, ref as d, computed as B, createBlock as s, openBlock as
|
|
1
|
+
import { defineComponent as g, ref as d, computed as B, createBlock as s, openBlock as a, normalizeClass as C, withCtx as $, createElementBlock as i, createCommentVNode as u, createElementVNode as I, renderSlot as p, createTextVNode as O, Fragment as h, mergeProps as v, unref as m } from "vue";
|
|
2
2
|
import { ScalarIconButton as E } from "@scalar/components";
|
|
3
3
|
import { ScalarIconEye as S, ScalarIconEyeSlash as A } from "@scalar/icons";
|
|
4
4
|
import W from "../CodeInput/CodeInput.vue.js";
|
|
@@ -23,24 +23,23 @@ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly
|
|
|
23
23
|
max: {},
|
|
24
24
|
environment: {},
|
|
25
25
|
envVariables: {},
|
|
26
|
-
workspace: {},
|
|
27
26
|
description: {},
|
|
28
27
|
lineWrapping: { type: Boolean, default: !1 }
|
|
29
28
|
},
|
|
30
29
|
emits: ["update:modelValue", "inputFocus", "inputBlur", "selectVariable"],
|
|
31
|
-
setup(
|
|
32
|
-
const
|
|
30
|
+
setup(c, { emit: V }) {
|
|
31
|
+
const n = c, t = V, r = d(!0), w = d(!1), f = d(null), k = () => {
|
|
33
32
|
w.value || t("inputBlur");
|
|
34
33
|
}, y = B(
|
|
35
|
-
() =>
|
|
34
|
+
() => n.type === "password" ? "text" : n.type ?? "text"
|
|
36
35
|
), b = () => {
|
|
37
|
-
!
|
|
36
|
+
!n.enum?.length && !n.readOnly && f.value?.focus();
|
|
38
37
|
};
|
|
39
|
-
return (e, l) => (
|
|
38
|
+
return (e, l) => (a(), s(q, {
|
|
40
39
|
class: C(["relative flex", e.containerClass])
|
|
41
40
|
}, {
|
|
42
41
|
default: $(() => [
|
|
43
|
-
e.$slots.default ? (
|
|
42
|
+
e.$slots.default ? (a(), i("div", {
|
|
44
43
|
key: 0,
|
|
45
44
|
class: "text-c-1 flex items-center pr-0 pl-3",
|
|
46
45
|
for: e.id ?? "",
|
|
@@ -50,14 +49,14 @@ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly
|
|
|
50
49
|
l[5] || (l[5] = O(": "))
|
|
51
50
|
], 8, T)) : u("", !0),
|
|
52
51
|
I("div", N, [
|
|
53
|
-
|
|
52
|
+
n.enum && n.enum.length ? (a(), s(F, {
|
|
54
53
|
key: 0,
|
|
55
|
-
canAddCustomValue:
|
|
56
|
-
modelValue:
|
|
57
|
-
value:
|
|
54
|
+
canAddCustomValue: n.canAddCustomEnumValue,
|
|
55
|
+
modelValue: n.modelValue,
|
|
56
|
+
value: n.enum,
|
|
58
57
|
"onUpdate:modelValue": l[0] || (l[0] = (o) => t("update:modelValue", o))
|
|
59
|
-
}, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (
|
|
60
|
-
r.value && e.type === "password" ? (
|
|
58
|
+
}, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (a(), i(h, { key: 1 }, [
|
|
59
|
+
r.value && e.type === "password" ? (a(), i("input", v({ key: 0 }, e.id ? { ...e.$attrs, id: e.id } : e.$attrs, {
|
|
61
60
|
autocomplete: "off",
|
|
62
61
|
class: ["text-c-1 disabled:text-c-2 peer w-full min-w-0 border-none px-2 py-1.25 -outline-offset-1", { "scalar-password-input": e.type === "password" }],
|
|
63
62
|
"data-1p-ignore": "",
|
|
@@ -69,7 +68,7 @@ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly
|
|
|
69
68
|
"update:modelValue",
|
|
70
69
|
o.target.value ?? ""
|
|
71
70
|
))
|
|
72
|
-
}), null, 16, P)) : (
|
|
71
|
+
}), null, 16, P)) : (a(), s(W, v({ key: 1 }, e.$attrs, {
|
|
73
72
|
id: e.id,
|
|
74
73
|
ref_key: "codeInput",
|
|
75
74
|
ref: f,
|
|
@@ -91,18 +90,17 @@ const T = ["for"], N = { class: "relative flex min-w-0 flex-1" }, P = ["readOnly
|
|
|
91
90
|
required: !!e.required,
|
|
92
91
|
spellcheck: "false",
|
|
93
92
|
type: y.value,
|
|
94
|
-
workspace: e.workspace,
|
|
95
93
|
onBlur: k,
|
|
96
94
|
onFocus: l[2] || (l[2] = (o) => t("inputFocus")),
|
|
97
95
|
"onUpdate:modelValue": l[3] || (l[3] = (o) => t("update:modelValue", o))
|
|
98
|
-
}), null, 16, ["id", "class", "description", "envVariables", "environment", "lineWrapping", "max", "min", "modelValue", "readOnly", "required", "type"
|
|
96
|
+
}), null, 16, ["id", "class", "description", "envVariables", "environment", "lineWrapping", "max", "min", "modelValue", "readOnly", "required", "type"]))
|
|
99
97
|
], 64))
|
|
100
98
|
]),
|
|
101
|
-
e.$slots.warning ? (
|
|
99
|
+
e.$slots.warning ? (a(), i("div", D, [
|
|
102
100
|
p(e.$slots, "warning", {}, void 0, !0)
|
|
103
101
|
])) : u("", !0),
|
|
104
102
|
p(e.$slots, "icon", {}, void 0, !0),
|
|
105
|
-
e.type === "password" ? (
|
|
103
|
+
e.type === "password" ? (a(), s(m(E), {
|
|
106
104
|
key: 2,
|
|
107
105
|
class: "-ml-.5 mr-1.25 h-6 w-6 self-center p-1.25",
|
|
108
106
|
icon: r.value ? m(S) : m(A),
|