@scalar/api-client 2.7.0 → 2.8.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 +35 -0
- package/README.md +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInputSelect.vue.js +21 -22
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +4 -5
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +13 -14
- package/dist/components/Sidebar/SidebarButton.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarButton.vue.js +0 -1
- package/dist/hooks/useClientConfig.d.ts +30 -36
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/hooks/useResponseBody.js +6 -6
- package/dist/layouts/App/create-api-client-app.d.ts +16 -16
- package/dist/layouts/Modal/create-api-client-modal.d.ts +32 -32
- package/dist/layouts/Web/create-api-client-web.d.ts +16 -16
- package/dist/libs/create-client.d.ts +16 -16
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts +2 -2
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +19 -19
- package/dist/plugins/plugin-manager.d.ts +2 -2
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/store/active-entities.d.ts +1 -1
- package/dist/store/store.d.ts +16 -16
- package/dist/store/workspace.d.ts +12 -12
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +2 -3
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +1 -1
- package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +70 -71
- package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts.map +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +1 -1
- package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +31 -32
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts +39 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBlock.vue2.js +226 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts +66 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationBody.vue2.js +200 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts +51 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue.js +89 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationParams.vue2.js +4 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts +46 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTable.vue2.js +85 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts +43 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue.js +193 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableRow.vue2.js +4 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/components/OperationTableTooltip.vue2.js +62 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/file.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts +5 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/files.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/files.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts +8 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.js +9 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-content.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts +6 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.js +12 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-example.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts +6 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.js +6 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-parameter-schema.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts +3 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/get-request-body-example.js +5 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts +5 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.js +7 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/group-by.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts +11 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.js +32 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/helpers/validate-parameter.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-operation-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-operation-block/index.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts +20 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue.js +98 -0
- package/dist/v2/blocks/scalar-response-block/components/Headers.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts +47 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBlock.vue2.js +182 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts +12 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBody.vue2.js +88 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue.js +36 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyDownload.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts +13 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyInfo.vue.js +14 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts +10 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyPreview.vue2.js +64 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyRaw.vue2.js +41 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts +6 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue.js +74 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyStreaming.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts +10 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue.js +25 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyToggle.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts +11 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue.js +52 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseBodyVirtual.vue3.js +5 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts +9 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue.js +54 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseCookies.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts +23 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseEmpty.vue2.js +88 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts +8 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue.js +7 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseLoadingOverlay.vue2.js +41 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts +10 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue.js +61 -0
- package/dist/v2/blocks/scalar-response-block/components/ResponseMetaInformation.vue2.js +4 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts +5 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.js +18 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/extract-filename.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts +4 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.js +12 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/get-content-length.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts +20 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.js +127 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/media-types.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts +17 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.js +16 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/helpers/process-response-body.test.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/index.d.ts +2 -0
- package/dist/v2/blocks/scalar-response-block/index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-response-block/index.js +4 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +31 -32
- package/dist/views/Request/RequestSection/RequestBody.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestBody.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +13 -14
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.d.ts.map +1 -1
- package/dist/views/Request/components/WorkspaceDropdown.vue.js +5 -6
- package/package.json +17 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/ExamplePicker.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExamplePicker.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/ExamplePicker.vue"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAGnG,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;CACvC,CAAC;AAwBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,EAAE,MAAM,CAAC;CAClB,CAAC;;;;;;AAwGF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as u, mergeModels as c, useModel as p, computed as n, createBlock as f, openBlock as x, unref as l, withCtx as r, createVNode as i, createElementVNode as v, toDisplayString as w } from "vue";
|
|
2
2
|
import { ScalarListbox as V, ScalarButton as b } from "@scalar/components";
|
|
3
3
|
import { ScalarIconCaretDown as g } from "@scalar/icons";
|
|
4
|
-
const
|
|
4
|
+
const _ = { class: "min-w-0 flex-1 truncate" }, k = /* @__PURE__ */ u({
|
|
5
5
|
__name: "ExamplePicker",
|
|
6
6
|
props: /* @__PURE__ */ c({
|
|
7
7
|
examples: { default: () => ({}) }
|
|
@@ -33,11 +33,10 @@ const h = { class: "min-w-0 flex-1 truncate" }, k = /* @__PURE__ */ u({
|
|
|
33
33
|
i(l(b), {
|
|
34
34
|
class: "text-c-2 hover:text-c-1 flex h-full w-fit min-w-0 gap-1.5 px-1.5 py-0.75 text-base font-normal",
|
|
35
35
|
"data-testid": "example-picker",
|
|
36
|
-
fullWidth: "",
|
|
37
36
|
variant: "ghost"
|
|
38
37
|
}, {
|
|
39
38
|
default: r(() => [
|
|
40
|
-
v("div",
|
|
39
|
+
v("div", _, w(a.value?.label ?? "Select an example"), 1),
|
|
41
40
|
i(l(g), {
|
|
42
41
|
class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
|
|
43
42
|
weight: "bold"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationCodeSample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/OperationCodeSample.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OperationCodeSample.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/operation-code-sample/components/OperationCodeSample.vue"],"names":[],"mappings":"AA4eA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAAE,KAAK,gBAAgB,EAAiB,MAAM,kBAAkB,CAAA;AAGvE,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AASrE,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,yCAAyC,CAAA;AAKhD,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,aAAa,EAAE,iBAAiB,EAAE,CAAA;IAClC;;;;OAIG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACzC;;OAEG;IACH,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAA;IACzC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACxC;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,SAAS,EAAE,eAAe,CAAA;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAA;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;;;;;;GAQG;;YAkBO,MAAM,OAAO;YACb,MAAM,OAAO;;AAlBvB,wBA6jBC;AAOD,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 o from "./OperationCodeSample.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-549ec320"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as D, computed as n, ref as
|
|
2
|
-
import { ScalarCard as T, ScalarCardHeader as
|
|
3
|
-
import { freezeElement as
|
|
4
|
-
import { ScalarIconCaretDown as
|
|
5
|
-
import { emitCustomEvent as
|
|
6
|
-
import { getResolvedRef as
|
|
7
|
-
import { operationToHar as
|
|
8
|
-
import
|
|
1
|
+
import { defineComponent as D, computed as n, ref as C, watch as N, useId as R, createBlock as i, createCommentVNode as f, openBlock as s, unref as o, withCtx as r, createVNode as u, createSlots as z, createElementVNode as g, createElementBlock as S, renderSlot as y, createTextVNode as K, toDisplayString as M } from "vue";
|
|
2
|
+
import { ScalarCard as T, ScalarCardHeader as U, ScalarCombobox as A, ScalarButton as F, ScalarCardSection as q, ScalarCodeBlock as Z, ScalarVirtualText as G, ScalarCardFooter as J } from "@scalar/components";
|
|
3
|
+
import { freezeElement as P } from "@scalar/helpers/dom/freeze-element";
|
|
4
|
+
import { ScalarIconCaretDown as Q } from "@scalar/icons";
|
|
5
|
+
import { emitCustomEvent as V } from "@scalar/workspace-store/events";
|
|
6
|
+
import { getResolvedRef as X } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
7
|
+
import { operationToHar as Y } from "../helpers/operation-to-har/operation-to-har.js";
|
|
8
|
+
import E from "./HttpMethod.vue.js";
|
|
9
9
|
import { findClient as O } from "../helpers/find-client.js";
|
|
10
10
|
import { generateCustomId as $ } from "../helpers/generate-client-options.js";
|
|
11
|
-
import { generateCodeSnippet as
|
|
12
|
-
import { getSecrets as
|
|
13
|
-
import
|
|
14
|
-
const
|
|
11
|
+
import { generateCodeSnippet as _ } from "../helpers/generate-code-snippet.js";
|
|
12
|
+
import { getSecrets as ee } from "../helpers/get-secrets.js";
|
|
13
|
+
import te from "./ExamplePicker.vue.js";
|
|
14
|
+
const le = ["innerHTML"], oe = ["id"], ae = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "request-card-footer-addon"
|
|
17
|
-
}, ne = { class: "request-header" },
|
|
18
|
-
...
|
|
17
|
+
}, ne = { class: "request-header" }, re = {}, Ce = /* @__PURE__ */ D({
|
|
18
|
+
...re,
|
|
19
19
|
__name: "OperationCodeSample",
|
|
20
20
|
props: {
|
|
21
21
|
clientOptions: {},
|
|
@@ -33,42 +33,42 @@ const te = ["innerHTML"], le = { class: "text-base font-normal" }, oe = ["id"],
|
|
|
33
33
|
},
|
|
34
34
|
setup(l) {
|
|
35
35
|
const d = n(() => {
|
|
36
|
-
const e =
|
|
36
|
+
const e = X(l.operation.requestBody)?.content ?? {}, t = l.selectedContentType || Object.keys(e)[0];
|
|
37
37
|
return t ? e[t]?.examples ?? {} : {};
|
|
38
|
-
}), p =
|
|
38
|
+
}), p = C(
|
|
39
39
|
l.selectedExample ?? Object.keys(d.value)[0] ?? ""
|
|
40
|
-
),
|
|
40
|
+
), b = n(() => [
|
|
41
41
|
"x-custom-examples",
|
|
42
42
|
"x-codeSamples",
|
|
43
43
|
"x-code-samples"
|
|
44
|
-
].flatMap((t) => l.operation[t] ?? [])), h = n(() =>
|
|
44
|
+
].flatMap((t) => l.operation[t] ?? [])), h = n(() => b.value.length ? [
|
|
45
45
|
{
|
|
46
46
|
label: "Code Examples",
|
|
47
|
-
options:
|
|
48
|
-
const a = $(t),
|
|
47
|
+
options: b.value.map((t) => {
|
|
48
|
+
const a = $(t), k = t.label || t.lang || a;
|
|
49
49
|
return {
|
|
50
50
|
id: a,
|
|
51
51
|
lang: t.lang || "plaintext",
|
|
52
|
-
title:
|
|
53
|
-
label:
|
|
52
|
+
title: k,
|
|
53
|
+
label: k
|
|
54
54
|
};
|
|
55
55
|
})
|
|
56
56
|
},
|
|
57
57
|
...l.clientOptions
|
|
58
|
-
] : l.clientOptions), c =
|
|
58
|
+
] : l.clientOptions), c = C(
|
|
59
59
|
O(h.value, l.selectedClient)
|
|
60
60
|
);
|
|
61
|
-
|
|
61
|
+
N(
|
|
62
62
|
() => l.selectedClient,
|
|
63
63
|
(e) => {
|
|
64
64
|
const t = O(h.value, e);
|
|
65
65
|
t && (c.value = t);
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
|
-
const
|
|
68
|
+
const x = n(() => {
|
|
69
69
|
if (!l.isWebhook) return null;
|
|
70
70
|
try {
|
|
71
|
-
return
|
|
71
|
+
return Y({
|
|
72
72
|
operation: l.operation,
|
|
73
73
|
method: l.method,
|
|
74
74
|
path: l.path,
|
|
@@ -80,9 +80,9 @@ const te = ["innerHTML"], le = { class: "text-base font-normal" }, oe = ["id"],
|
|
|
80
80
|
}), v = n(() => {
|
|
81
81
|
try {
|
|
82
82
|
const e = c.value?.id;
|
|
83
|
-
return e ? e.startsWith("custom") ?
|
|
83
|
+
return e ? e.startsWith("custom") ? b.value.find(
|
|
84
84
|
(t) => $(t) === c.value?.id
|
|
85
|
-
)?.source ?? "Custom example not found" : l.isWebhook ?
|
|
85
|
+
)?.source ?? "Custom example not found" : l.isWebhook ? x.value?.postData?.text ?? "" : _({
|
|
86
86
|
clientId: e,
|
|
87
87
|
operation: l.operation,
|
|
88
88
|
method: l.method,
|
|
@@ -96,45 +96,45 @@ const te = ["innerHTML"], le = { class: "text-base font-normal" }, oe = ["id"],
|
|
|
96
96
|
return console.error("[generateSnippet]", e), "";
|
|
97
97
|
}
|
|
98
98
|
}), B = n(() => l.isWebhook ? j.value : c.value?.lang), j = n(() => {
|
|
99
|
-
if (!
|
|
100
|
-
const e =
|
|
99
|
+
if (!x.value?.postData) return "json";
|
|
100
|
+
const e = x.value.postData.mimeType;
|
|
101
101
|
return e?.includes("json") ? "json" : e?.includes("xml") ? "xml" : e?.includes("yaml") || e?.includes("yml") ? "yaml" : e?.includes("text/plain") ? "text" : "json";
|
|
102
|
-
}), w = n(() =>
|
|
102
|
+
}), w = n(() => ee(l.securitySchemes)), m = C(null), H = (e) => {
|
|
103
103
|
if (m.value) {
|
|
104
|
-
const t =
|
|
104
|
+
const t = P(m.value.$el);
|
|
105
105
|
setTimeout(() => {
|
|
106
106
|
t();
|
|
107
107
|
}, 300);
|
|
108
108
|
}
|
|
109
|
-
c.value = e, e.id.startsWith("custom") ||
|
|
110
|
-
}, L = 3e4,
|
|
111
|
-
return (e, t) => v.value ? (
|
|
109
|
+
c.value = e, e.id.startsWith("custom") || V(m.value?.$el, "scalar-update-selected-client", e.id);
|
|
110
|
+
}, L = 3e4, I = n(() => (v.value.length ?? 0) > L), W = R();
|
|
111
|
+
return (e, t) => v.value ? (s(), i(o(T), {
|
|
112
112
|
key: 0,
|
|
113
113
|
ref_key: "elem",
|
|
114
114
|
ref: m,
|
|
115
115
|
class: "request-card dark-mode"
|
|
116
116
|
}, {
|
|
117
|
-
default:
|
|
118
|
-
u(o(
|
|
119
|
-
default:
|
|
120
|
-
t[3] || (t[3] =
|
|
121
|
-
u(
|
|
117
|
+
default: r(() => [
|
|
118
|
+
u(o(U), { class: "pr-2.5" }, z({
|
|
119
|
+
default: r(() => [
|
|
120
|
+
t[3] || (t[3] = g("span", { class: "sr-only" }, "Request Example for", -1)),
|
|
121
|
+
u(E, {
|
|
122
122
|
as: "span",
|
|
123
123
|
class: "request-method",
|
|
124
124
|
method: e.method
|
|
125
125
|
}, null, 8, ["method"]),
|
|
126
|
-
e.generateLabel ? (
|
|
126
|
+
e.generateLabel ? (s(), S("span", {
|
|
127
127
|
key: 0,
|
|
128
128
|
innerHTML: e.generateLabel()
|
|
129
|
-
}, null, 8,
|
|
130
|
-
|
|
129
|
+
}, null, 8, le)) : f("", !0),
|
|
130
|
+
y(e.$slots, "header", {}, void 0, !0)
|
|
131
131
|
]),
|
|
132
132
|
_: 2
|
|
133
133
|
}, [
|
|
134
134
|
!e.isWebhook && h.value.length ? {
|
|
135
135
|
name: "actions",
|
|
136
|
-
fn:
|
|
137
|
-
u(o(
|
|
136
|
+
fn: r(() => [
|
|
137
|
+
u(o(A), {
|
|
138
138
|
class: "max-h-80",
|
|
139
139
|
modelValue: c.value,
|
|
140
140
|
options: h.value,
|
|
@@ -142,16 +142,15 @@ const te = ["innerHTML"], le = { class: "text-base font-normal" }, oe = ["id"],
|
|
|
142
142
|
teleport: "",
|
|
143
143
|
"onUpdate:modelValue": t[0] || (t[0] = (a) => H(a))
|
|
144
144
|
}, {
|
|
145
|
-
default:
|
|
146
|
-
u(o(
|
|
147
|
-
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5",
|
|
145
|
+
default: r(() => [
|
|
146
|
+
u(o(F), {
|
|
147
|
+
class: "text-c-2 hover:text-c-1 flex h-full w-fit gap-1.5 px-0.5 py-0 text-base font-normal",
|
|
148
148
|
"data-testid": "client-picker",
|
|
149
|
-
fullWidth: "",
|
|
150
149
|
variant: "ghost"
|
|
151
150
|
}, {
|
|
152
|
-
default:
|
|
153
|
-
|
|
154
|
-
u(o(
|
|
151
|
+
default: r(() => [
|
|
152
|
+
K(M(c.value?.title) + " ", 1),
|
|
153
|
+
u(o(Q), {
|
|
155
154
|
class: "ui-open:rotate-180 mt-0.25 size-3 transition-transform duration-100",
|
|
156
155
|
weight: "bold"
|
|
157
156
|
})
|
|
@@ -166,18 +165,18 @@ const te = ["innerHTML"], le = { class: "text-base font-normal" }, oe = ["id"],
|
|
|
166
165
|
} : void 0
|
|
167
166
|
]), 1024),
|
|
168
167
|
u(o(q), { class: "request-editor-section custom-scroll p-0" }, {
|
|
169
|
-
default:
|
|
170
|
-
|
|
171
|
-
id: `${o(
|
|
168
|
+
default: r(() => [
|
|
169
|
+
g("div", {
|
|
170
|
+
id: `${o(W)}-example`,
|
|
172
171
|
class: "code-snippet"
|
|
173
172
|
}, [
|
|
174
|
-
|
|
173
|
+
I.value ? (s(), i(o(G), {
|
|
175
174
|
key: 1,
|
|
176
175
|
containerClass: "custom-scroll scalar-code-block border rounded-b flex flex-1 max-h-screen",
|
|
177
176
|
contentClass: "language-plaintext whitespace-pre font-code text-base",
|
|
178
177
|
lineHeight: 20,
|
|
179
178
|
text: v.value
|
|
180
|
-
}, null, 8, ["text"])) : (
|
|
179
|
+
}, null, 8, ["text"])) : (s(), i(o(Z), {
|
|
181
180
|
key: 0,
|
|
182
181
|
class: "bg-b-2 !min-h-full -outline-offset-2",
|
|
183
182
|
content: v.value,
|
|
@@ -189,18 +188,18 @@ const te = ["innerHTML"], le = { class: "text-base font-normal" }, oe = ["id"],
|
|
|
189
188
|
]),
|
|
190
189
|
_: 1
|
|
191
190
|
}),
|
|
192
|
-
Object.keys(d.value).length > 1 || e.$slots.footer ? (
|
|
191
|
+
Object.keys(d.value).length > 1 || e.$slots.footer ? (s(), i(o(J), {
|
|
193
192
|
key: 0,
|
|
194
193
|
class: "request-card-footer bg-b-3"
|
|
195
194
|
}, {
|
|
196
|
-
default:
|
|
197
|
-
Object.keys(d.value).length > 1 ? (
|
|
198
|
-
Object.keys(d.value).length ? (
|
|
195
|
+
default: r(() => [
|
|
196
|
+
Object.keys(d.value).length > 1 ? (s(), S("div", ae, [
|
|
197
|
+
Object.keys(d.value).length ? (s(), i(te, {
|
|
199
198
|
key: 0,
|
|
200
199
|
modelValue: p.value,
|
|
201
200
|
"onUpdate:modelValue": [
|
|
202
201
|
t[1] || (t[1] = (a) => p.value = a),
|
|
203
|
-
t[2] || (t[2] = (a) => o(
|
|
202
|
+
t[2] || (t[2] = (a) => o(V)(
|
|
204
203
|
m.value?.$el,
|
|
205
204
|
"scalar-update-selected-example",
|
|
206
205
|
a
|
|
@@ -209,28 +208,28 @@ const te = ["innerHTML"], le = { class: "text-base font-normal" }, oe = ["id"],
|
|
|
209
208
|
examples: d.value
|
|
210
209
|
}, null, 8, ["modelValue", "examples"])) : f("", !0)
|
|
211
210
|
])) : f("", !0),
|
|
212
|
-
|
|
211
|
+
y(e.$slots, "footer", {}, void 0, !0)
|
|
213
212
|
]),
|
|
214
213
|
_: 3
|
|
215
214
|
})) : f("", !0)
|
|
216
215
|
]),
|
|
217
216
|
_: 3
|
|
218
|
-
}, 512)) : e.fallback ? (
|
|
217
|
+
}, 512)) : e.fallback ? (s(), i(o(T), {
|
|
219
218
|
key: 1,
|
|
220
219
|
class: "request-card dark-mode"
|
|
221
220
|
}, {
|
|
222
|
-
default:
|
|
221
|
+
default: r(() => [
|
|
223
222
|
u(o(q), { class: "request-card-simple" }, {
|
|
224
|
-
default:
|
|
225
|
-
|
|
226
|
-
u(
|
|
223
|
+
default: r(() => [
|
|
224
|
+
g("div", ne, [
|
|
225
|
+
u(E, {
|
|
227
226
|
as: "span",
|
|
228
227
|
class: "request-method",
|
|
229
228
|
method: e.method
|
|
230
229
|
}, null, 8, ["method"]),
|
|
231
|
-
|
|
230
|
+
y(e.$slots, "header", {}, void 0, !0)
|
|
232
231
|
]),
|
|
233
|
-
|
|
232
|
+
y(e.$slots, "footer", {}, void 0, !0)
|
|
234
233
|
]),
|
|
235
234
|
_: 3
|
|
236
235
|
})
|
|
@@ -240,5 +239,5 @@ const te = ["innerHTML"], le = { class: "text-base font-normal" }, oe = ["id"],
|
|
|
240
239
|
}
|
|
241
240
|
});
|
|
242
241
|
export {
|
|
243
|
-
|
|
242
|
+
Ce as default
|
|
244
243
|
};
|
|
@@ -75,7 +75,7 @@ const T = 10, j = 10, D = "propertyName*", A = (/* @__PURE__ */ new Date()).toIS
|
|
|
75
75
|
seen: a
|
|
76
76
|
}));
|
|
77
77
|
}
|
|
78
|
-
if ("additionalProperties" in e && e.additionalProperties
|
|
78
|
+
if ("additionalProperties" in e && e.additionalProperties) {
|
|
79
79
|
const o = m(e.additionalProperties), i = e.additionalProperties === !0 || typeof e.additionalProperties == "object" && Object.keys(e.additionalProperties).length === 0, t = typeof o == "object" && "x-additionalPropertiesName" in o && typeof o["x-additionalPropertiesName"] == "string" && o["x-additionalPropertiesName"].trim().length > 0 ? `${o["x-additionalPropertiesName"].trim()}*` : D;
|
|
80
80
|
n[t] = i ? "anything" : typeof o == "object" ? s(o, r, {
|
|
81
81
|
level: l + 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthSelector.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue"],"names":[],"mappings":"AAwWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAGzE,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAA;AACnG,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAIvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,gBAAgB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IAC7C,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,MAAM,EAAE,YAAY,GAAG,SAAS,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;;;;;;;;;YAiBiB,MAAM,EAAE;cAAQ,MAAM;gBAAU,MAAM,EAAE;;;;;eAK9C,WAAW,CAAC,eAAe,CAAC,4BAA4B,CAAC,CAAC;gBACzD,oBAAoB,EAAE;;;;YANjB,MAAM,EAAE;cAAQ,MAAM;gBAAU,MAAM,EAAE;;;;;eAK9C,WAAW,CAAC,eAAe,CAAC,4BAA4B,CAAC,CAAC;gBACzD,oBAAoB,EAAE;;;AA2epC,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AuthSelector.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9df56497"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as M, useId as N, ref as b, computed as S, createBlock as x, openBlock as r, unref as o, withCtx as u, createVNode as m, createCommentVNode as g, createElementVNode as i, createElementBlock as
|
|
2
|
-
import { useModal as z, ScalarComboboxMultiselect as E, ScalarButton as F, ScalarListboxCheckbox as P, ScalarIconButton as
|
|
3
|
-
import { ScalarIconCaretDown as
|
|
1
|
+
import { defineComponent as M, useId as N, ref as b, computed as S, createBlock as x, openBlock as r, unref as o, withCtx as u, createVNode as m, createCommentVNode as g, createElementVNode as i, createElementBlock as v, Fragment as k, createTextVNode as C, toDisplayString as h, withModifiers as U, normalizeClass as j } from "vue";
|
|
2
|
+
import { useModal as z, ScalarComboboxMultiselect as E, ScalarButton as F, ScalarListboxCheckbox as P, ScalarIconButton as G } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as H, ScalarIconTrash as J } from "@scalar/icons";
|
|
4
4
|
import { isDefined as B } from "@scalar/oas-utils/helpers";
|
|
5
|
-
import { getResolvedRef as
|
|
6
|
-
import
|
|
7
|
-
import { formatComplexScheme as
|
|
5
|
+
import { getResolvedRef as K } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
6
|
+
import Q from "./DeleteRequestAuthModal.vue.js";
|
|
7
|
+
import { formatComplexScheme as W, formatScheme as X, getSecuritySchemeOptions as Y } from "../helpers/security-scheme.js";
|
|
8
8
|
import Z from "./RequestAuthDataTable.vue.js";
|
|
9
9
|
import _ from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
10
10
|
import { useLayout as ee } from "../../../../hooks/useLayout.js";
|
|
@@ -22,7 +22,7 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["deleteOperationAuth", "update:securityScheme", "update:selectedScopes", "update:selectedSecurity"],
|
|
24
24
|
setup(n, { expose: I, emit: T }) {
|
|
25
|
-
const d = T, { layout: O } = ee(), V = N(),
|
|
25
|
+
const d = T, { layout: O } = ee(), V = N(), w = b(null), p = z(), a = b(null), A = b(!1), y = S(() => {
|
|
26
26
|
if (!n.security?.length)
|
|
27
27
|
return null;
|
|
28
28
|
const e = !n.security.some(
|
|
@@ -32,26 +32,26 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
|
|
|
32
32
|
}), s = S(() => n.selectedSecurity?.length ? n.selectedSecurity.map((t) => {
|
|
33
33
|
const e = Object.keys(t);
|
|
34
34
|
if (e.length > 1)
|
|
35
|
-
return
|
|
35
|
+
return W(t);
|
|
36
36
|
const l = e[0];
|
|
37
37
|
if (!l)
|
|
38
38
|
return;
|
|
39
|
-
const c =
|
|
39
|
+
const c = K(n.securitySchemes?.[l]);
|
|
40
40
|
if (c)
|
|
41
41
|
return X({ name: l, type: c.type, value: { [l]: [] } });
|
|
42
42
|
}).filter(B) : []);
|
|
43
|
-
function
|
|
43
|
+
function D({
|
|
44
44
|
label: t,
|
|
45
45
|
value: e
|
|
46
46
|
}) {
|
|
47
47
|
a.value = { label: t, payload: e }, p.show();
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const R = S(() => Y(
|
|
50
50
|
n.security ?? [],
|
|
51
51
|
n.securitySchemes ?? {},
|
|
52
52
|
O === "modal" || n.layout === "reference"
|
|
53
53
|
)), $ = (t) => {
|
|
54
|
-
|
|
54
|
+
A.value && t.stopPropagation(), w.value?.$el.click();
|
|
55
55
|
}, q = (t) => {
|
|
56
56
|
d("update:selectedSecurity", {
|
|
57
57
|
value: t.map((e) => e.value),
|
|
@@ -63,25 +63,25 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
|
|
|
63
63
|
return I({
|
|
64
64
|
authIndicator: y,
|
|
65
65
|
selectedSchemeOptions: s,
|
|
66
|
-
schemeOptions:
|
|
66
|
+
schemeOptions: R
|
|
67
67
|
}), (t, e) => (r(), x(o(_), {
|
|
68
68
|
class: "group/params relative",
|
|
69
69
|
itemCount: s.value.length,
|
|
70
70
|
layout: t.layout,
|
|
71
|
-
"onUpdate:modelValue": e[3] || (e[3] = (l) =>
|
|
71
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => A.value = l)
|
|
72
72
|
}, {
|
|
73
73
|
title: u(() => [
|
|
74
74
|
i("div", {
|
|
75
75
|
id: o(V),
|
|
76
76
|
class: "inline-flex items-center gap-0.5 leading-[20px]"
|
|
77
77
|
}, [
|
|
78
|
-
i("span", null,
|
|
79
|
-
y.value ? (r(),
|
|
78
|
+
i("span", null, h(t.title), 1),
|
|
79
|
+
y.value ? (r(), v("span", {
|
|
80
80
|
key: 0,
|
|
81
81
|
class: j(["text-c-3 hover:bg-b-3 hover:text-c-1 -mr-1 cursor-pointer rounded px-1 py-0.5 text-xs leading-[normal]", { "text-c-1": y.value.text === "Required" }]),
|
|
82
82
|
"data-testid": "auth-indicator",
|
|
83
83
|
onClick: $
|
|
84
|
-
},
|
|
84
|
+
}, h(y.value.text), 3)) : g("", !0)
|
|
85
85
|
], 8, te)
|
|
86
86
|
]),
|
|
87
87
|
actions: u(() => [
|
|
@@ -90,10 +90,10 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
|
|
|
90
90
|
class: "w-72 text-xs",
|
|
91
91
|
modelValue: s.value,
|
|
92
92
|
multiple: "",
|
|
93
|
-
options:
|
|
93
|
+
options: R.value,
|
|
94
94
|
placement: "bottom-end",
|
|
95
95
|
teleport: "",
|
|
96
|
-
onDelete:
|
|
96
|
+
onDelete: D,
|
|
97
97
|
"onUpdate:modelValue": q
|
|
98
98
|
}, {
|
|
99
99
|
option: u(({ option: l, selected: c }) => [
|
|
@@ -101,37 +101,36 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
|
|
|
101
101
|
multiselect: "",
|
|
102
102
|
selected: c
|
|
103
103
|
}, null, 8, ["selected"]),
|
|
104
|
-
i("div", oe,
|
|
105
|
-
l.isDeletable ?? (o(O) !== "modal" && t.layout !== "reference") ? (r(), x(o(
|
|
104
|
+
i("div", oe, h(l.label), 1),
|
|
105
|
+
l.isDeletable ?? (o(O) !== "modal" && t.layout !== "reference") ? (r(), x(o(G), {
|
|
106
106
|
key: 0,
|
|
107
107
|
class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
|
|
108
|
-
icon: o(
|
|
108
|
+
icon: o(J),
|
|
109
109
|
label: `Delete ${l.label}`,
|
|
110
110
|
size: "xs",
|
|
111
|
-
onClick: U((f) =>
|
|
111
|
+
onClick: U((f) => D(l), ["stop"])
|
|
112
112
|
}, null, 8, ["icon", "label", "onClick"])) : g("", !0)
|
|
113
113
|
]),
|
|
114
114
|
default: u(() => [
|
|
115
115
|
m(o(F), {
|
|
116
116
|
ref_key: "comboboxButtonRef",
|
|
117
|
-
ref:
|
|
117
|
+
ref: w,
|
|
118
118
|
"aria-describedby": o(V),
|
|
119
|
-
class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit items-center gap-1 px-0.75 py-0.25 text-base font-normal transition-transform",
|
|
120
|
-
fullWidth: "",
|
|
119
|
+
class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal transition-transform",
|
|
121
120
|
variant: "ghost"
|
|
122
121
|
}, {
|
|
123
122
|
default: u(() => [
|
|
124
|
-
s.value.length === 1 ? (r(),
|
|
123
|
+
s.value.length === 1 ? (r(), v(k, { key: 0 }, [
|
|
125
124
|
e[4] || (e[4] = i("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
|
|
126
|
-
C(" " +
|
|
127
|
-
], 64)) : s.value.length > 1 ? (r(),
|
|
125
|
+
C(" " + h(s.value[0]?.label), 1)
|
|
126
|
+
], 64)) : s.value.length > 1 ? (r(), v(k, { key: 1 }, [
|
|
128
127
|
e[5] || (e[5] = C(" Multiple ")),
|
|
129
128
|
e[6] || (e[6] = i("span", { class: "sr-only" }, "Auth Types Selected", -1))
|
|
130
|
-
], 64)) : (r(),
|
|
129
|
+
], 64)) : (r(), v(k, { key: 2 }, [
|
|
131
130
|
e[7] || (e[7] = i("span", { class: "sr-only" }, "Select", -1)),
|
|
132
131
|
e[8] || (e[8] = C(" Auth Type "))
|
|
133
132
|
], 64)),
|
|
134
|
-
m(o(
|
|
133
|
+
m(o(H), {
|
|
135
134
|
class: "size-3 shrink-0 transition-transform duration-100 group-aria-expanded/combobox-button:rotate-180",
|
|
136
135
|
weight: "bold"
|
|
137
136
|
})
|
|
@@ -154,7 +153,7 @@ const te = ["id"], le = { class: "flex flex-1" }, oe = { class: "min-w-0 flex-1
|
|
|
154
153
|
"onUpdate:securityScheme": e[0] || (e[0] = (l) => d("update:securityScheme", l)),
|
|
155
154
|
"onUpdate:selectedScopes": e[1] || (e[1] = (l) => d("update:selectedScopes", l))
|
|
156
155
|
}, null, 8, ["envVariables", "environment", "layout", "securitySchemes", "selectedSchemeOptions", "server"]),
|
|
157
|
-
a.value ? (r(), x(
|
|
156
|
+
a.value ? (r(), x(Q, {
|
|
158
157
|
key: 0,
|
|
159
158
|
label: a.value.label,
|
|
160
159
|
scheme: a.value,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationBlock.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBlock.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { HttpMethod } from '@scalar/helpers/http/http-methods';
|
|
2
|
+
import type { Environment } from '@scalar/oas-utils/entities/environment';
|
|
3
|
+
import type { OpenApiDocument, OperationObject, ServerObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
4
|
+
import type { ClientLayout } from '../../../../hooks/index.js';
|
|
5
|
+
import type { EnvVariable } from '../../../../store/index.js';
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
/** Operation method */
|
|
8
|
+
method: HttpMethod;
|
|
9
|
+
/** Operation path */
|
|
10
|
+
path: string;
|
|
11
|
+
/** Operation object */
|
|
12
|
+
operation: OperationObject;
|
|
13
|
+
/** Currently selected example key for the current operation */
|
|
14
|
+
exampleKey: string;
|
|
15
|
+
/** Currently selected content type for the current operation example */
|
|
16
|
+
selectedContentType?: string;
|
|
17
|
+
/** Document defined security schemes */
|
|
18
|
+
securitySchemes: NonNullable<OpenApiDocument['components']>['securitySchemes'];
|
|
19
|
+
/** Currently selected security for the current operation */
|
|
20
|
+
selectedSecurity: OpenApiDocument['x-scalar-selected-security'];
|
|
21
|
+
/** Required security for the operation/document */
|
|
22
|
+
security: OpenApiDocument['security'];
|
|
23
|
+
/** Currently selected server for the current operation/document/workspace */
|
|
24
|
+
server?: ServerObject;
|
|
25
|
+
/** Client layout */
|
|
26
|
+
layout: ClientLayout;
|
|
27
|
+
/** TODO: remove when we migrate */
|
|
28
|
+
environment: Environment;
|
|
29
|
+
envVariables: EnvVariable[];
|
|
30
|
+
};
|
|
31
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
+
[x: string]: any;
|
|
33
|
+
} & {
|
|
34
|
+
[x: string]: any;
|
|
35
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
36
|
+
[x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
export default _default;
|
|
39
|
+
//# sourceMappingURL=OperationBlock.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-operation-block/components/OperationBlock.vue"],"names":[],"mappings":"AAmcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAGzE,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAGf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAO1C,KAAK,WAAW,GAAG;IACjB,uBAAuB;IACvB,MAAM,EAAE,UAAU,CAAA;IAClB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,uBAAuB;IACvB,SAAS,EAAE,eAAe,CAAA;IAC1B,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,wCAAwC;IACxC,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,4DAA4D;IAC5D,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,mDAAmD;IACnD,QAAQ,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACrC,6EAA6E;IAC7E,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAA;IAEpB,mCAAmC;IACnC,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAC;;;;;;;;AAyoBF,wBAOG"}
|