@scalar/api-client 2.18.0 → 2.18.1
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 +24 -0
- package/dist/hooks/useClientConfig.js +1 -1
- package/dist/hooks/useLayout.js +1 -1
- package/dist/hooks/useSidebar.js +1 -1
- package/dist/plugins/hooks/usePluginManager.js +1 -1
- package/dist/store/active-entities.js +1 -1
- package/dist/style.css +1 -1
- package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
- package/dist/v2/blocks/operation-block/helpers/get-delimiter.js +0 -2
- package/dist/v2/blocks/request-block/helpers/get-request-body-example.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 +36 -35
- 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 +17 -17
- package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +2 -2
- 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 +130 -122
- package/dist/v2/features/app/helpers/routes.d.ts +5 -1
- package/dist/v2/features/app/helpers/routes.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
- package/dist/v2/features/modal/Modal.vue.d.ts.map +1 -1
- package/dist/v2/features/modal/Modal.vue.js +1 -1
- package/dist/v2/features/modal/Modal.vue2.js +26 -25
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +3 -3
- package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.d.ts +5 -1
- package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
- package/dist/v2/features/operation/Operation.vue.js +22 -20
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OperationBlock.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/blocks/operation-block/OperationBlock.vue"],"names":[],"mappings":"AA0SA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mCAAmC,CAAA;AAErF,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAA;AACxG,OAAO,KAAK,EACV,eAAe,EACf,YAAY,EACb,MAAM,8DAA8D,CAAA;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAA;AAK5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAS3C,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,sCAAsC,CAAA;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kEAAkE,CAAA;AAK7G,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAKxD;;;;;;;;;;;;GAYG;;IAGD,gBAAgB;cACN,iBAAiB;IAC3B,gCAAgC;sBACd,eAAe,CAAC,UAAU,CAAC;IAC7C,iCAAiC;8BACP,eAAe,CAAC,4BAA4B,CAAC;IACvE,0BAA0B;gBACd,MAAM;IAClB,iCAAiC;mBAClB,aAAa,EAAE;IAC9B,2BAA2B;UACrB,MAAM;IACZ,6BAA6B;YACrB,cAAc;IACtB,mBAAmB;iBACN,gBAAgB;IAC7B,oBAAoB;YACZ,YAAY;IACpB,gCAAgC;YACxB,YAAY,GAAG,IAAI;IAC3B,gCAAgC;oBAChB,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC;IACtE,mDAAmD;aAC1C,YAAY,EAAE;IACvB,8BAA8B;aACrB,OAAO,EAAE;IAClB,yCAAyC;4BACjB,MAAM;IAC9B,4CAA4C;uBACzB,OAAO;IAC1B,0BAA0B;kBACZ,MAAM,GAAG,IAAI;IAC3B,mEAAmE;kBACrD,MAAM;IACpB,oBAAoB;aACX,SAAS,GAAG,eAAe;IACpC,uBAAuB;eACZ,eAAe;IAC1B,qDAAqD;0BAC/B,OAAO;IAC7B,+DAA+D;gBACnD,MAAM;IAClB,2CAA2C;cACjC,QAAQ;IAClB,wCAAwC;qBACvB,qBAAqB;IACtC,qBAAqB;aACZ,YAAY,EAAE;IACvB,8CAA8C;iBACjC,kBAAkB;IAC/B,yCAAyC;cAC/B,MAAM;;;;IAnDhB,gBAAgB;cACN,iBAAiB;IAC3B,gCAAgC;sBACd,eAAe,CAAC,UAAU,CAAC;IAC7C,iCAAiC;8BACP,eAAe,CAAC,4BAA4B,CAAC;IACvE,0BAA0B;gBACd,MAAM;IAClB,iCAAiC;mBAClB,aAAa,EAAE;IAC9B,2BAA2B;UACrB,MAAM;IACZ,6BAA6B;YACrB,cAAc;IACtB,mBAAmB;iBACN,gBAAgB;IAC7B,oBAAoB;YACZ,YAAY;IACpB,gCAAgC;YACxB,YAAY,GAAG,IAAI;IAC3B,gCAAgC;oBAChB,cAAc,CAAC,WAAW,CAAC,CAAC,yBAAyB,CAAC;IACtE,mDAAmD;aAC1C,YAAY,EAAE;IACvB,8BAA8B;aACrB,OAAO,EAAE;IAClB,yCAAyC;4BACjB,MAAM;IAC9B,4CAA4C;uBACzB,OAAO;IAC1B,0BAA0B;kBACZ,MAAM,GAAG,IAAI;IAC3B,mEAAmE;kBACrD,MAAM;IACpB,oBAAoB;aACX,SAAS,GAAG,eAAe;IACpC,uBAAuB;eACZ,eAAe;IAC1B,qDAAqD;0BAC/B,OAAO;IAC7B,+DAA+D;gBACnD,MAAM;IAClB,2CAA2C;cACjC,QAAQ;IAClB,wCAAwC;qBACvB,qBAAqB;IACtC,qBAAqB;aACZ,YAAY,EAAE;IACvB,8CAA8C;iBACjC,kBAAkB;IAC/B,yCAAyC;cAC/B,MAAM;;;;AArDlB,wBAwYC"}
|
|
@@ -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":"AAkTA,OAAO,EAML,KAAK,IAAI,EAEV,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAGvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,eAAe,EAEf,YAAY,EACb,MAAM,8DAA8D,CAAA;AAKrE,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,gEAAgE,CAAA;AAKvE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,QAAQ,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACjD,eAAe,EAAE,WAAW,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAA;IAC9E,gBAAgB,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAA;IAC/D,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;;;cA+BqC,IAAI;cAAQ,MAAM;;;;;AA6bzD,wBAOG"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as U, useId as $, ref as f, computed as S, createBlock as b, openBlock as r, unref as a, withCtx as c, createVNode as m, createCommentVNode as x, createElementBlock as h, Fragment as g, createElementVNode as u, createTextVNode as k, toDisplayString as
|
|
2
|
-
import { useModal as N, ScalarComboboxMultiselect as T, ScalarButton as
|
|
3
|
-
import { ScalarIconCaretDown as L, ScalarIconTrash as
|
|
4
|
-
import { getResolvedRef as
|
|
5
|
-
import G from "
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import W from "
|
|
9
|
-
import X from "
|
|
10
|
-
|
|
1
|
+
import { defineComponent as U, useId as $, ref as f, computed as S, createBlock as b, openBlock as r, unref as a, withCtx as c, createVNode as m, createCommentVNode as x, createElementBlock as h, Fragment as g, createElementVNode as u, createTextVNode as k, toDisplayString as y, withModifiers as q, normalizeClass as M } from "vue";
|
|
2
|
+
import { useModal as N, ScalarComboboxMultiselect as T, ScalarButton as j, ScalarListboxCheckbox as z, ScalarIconButton as E } from "@scalar/components";
|
|
3
|
+
import { ScalarIconCaretDown as L, ScalarIconTrash as P } from "@scalar/icons";
|
|
4
|
+
import { getResolvedRef as F } from "@scalar/workspace-store/helpers/get-resolved-ref";
|
|
5
|
+
import { unpackProxyObject as G } from "@scalar/workspace-store/helpers/unpack-proxy";
|
|
6
|
+
import H from "./DeleteRequestAuthModal.vue.js";
|
|
7
|
+
import { isAuthOptional as J } from "../helpers/is-auth-optional.js";
|
|
8
|
+
import { getSecuritySchemeOptions as K, formatComplexScheme as Q, formatScheme as W } from "../helpers/security-scheme.js";
|
|
9
|
+
import X from "./RequestAuthDataTable.vue.js";
|
|
10
|
+
import Y from "../../../components/layout/CollapsibleSection.vue.js";
|
|
11
|
+
const Z = ["id"], _ = { class: "min-w-0 flex-1 truncate" }, ue = /* @__PURE__ */ U({
|
|
11
12
|
__name: "AuthSelector",
|
|
12
13
|
props: {
|
|
13
14
|
environment: {},
|
|
@@ -23,16 +24,16 @@ const Y = ["id"], Z = { class: "min-w-0 flex-1 truncate" }, re = /* @__PURE__ */
|
|
|
23
24
|
title: {}
|
|
24
25
|
},
|
|
25
26
|
setup(n, { expose: I }) {
|
|
26
|
-
const
|
|
27
|
+
const O = $(), C = f(null), B = f(!1), d = N(), o = f(null), p = S(() => {
|
|
27
28
|
if (!n.securityRequirements?.length)
|
|
28
29
|
return null;
|
|
29
|
-
const e =
|
|
30
|
+
const e = J(n.securityRequirements);
|
|
30
31
|
return {
|
|
31
32
|
icon: e ? "Unlock" : "Lock",
|
|
32
33
|
text: e ? "Optional" : "Required"
|
|
33
34
|
};
|
|
34
35
|
}), R = S(
|
|
35
|
-
() =>
|
|
36
|
+
() => K(
|
|
36
37
|
n.securityRequirements ?? [],
|
|
37
38
|
n.securitySchemes ?? {},
|
|
38
39
|
n.isReadOnly
|
|
@@ -44,21 +45,21 @@ const Y = ["id"], Z = { class: "min-w-0 flex-1 truncate" }, re = /* @__PURE__ */
|
|
|
44
45
|
if (s.length === 0)
|
|
45
46
|
return [];
|
|
46
47
|
if (s.length > 1)
|
|
47
|
-
return
|
|
48
|
+
return Q(t);
|
|
48
49
|
const l = s[0];
|
|
49
50
|
if (!l)
|
|
50
51
|
return [];
|
|
51
|
-
const
|
|
52
|
-
return
|
|
52
|
+
const v = F(n.securitySchemes?.[l]);
|
|
53
|
+
return v ? W({
|
|
53
54
|
name: l,
|
|
54
|
-
type:
|
|
55
|
+
type: v.type,
|
|
55
56
|
value: t
|
|
56
57
|
}) : [];
|
|
57
58
|
}) : [];
|
|
58
59
|
}), w = (e) => {
|
|
59
|
-
B.value && e.stopPropagation(),
|
|
60
|
+
B.value && e.stopPropagation(), C.value?.$el.click();
|
|
60
61
|
}, A = (e) => {
|
|
61
|
-
const t = e.filter((l) => l.payload === void 0).map((l) => l.value), s = e.filter((l) => l.payload !== void 0).map((l) => ({
|
|
62
|
+
const t = e.filter((l) => l.payload === void 0).map((l) => G(l.value, { depth: 2 })), s = e.filter((l) => l.payload !== void 0).map((l) => ({
|
|
62
63
|
name: l.label,
|
|
63
64
|
scheme: l.payload
|
|
64
65
|
}));
|
|
@@ -78,7 +79,7 @@ const Y = ["id"], Z = { class: "min-w-0 flex-1 truncate" }, re = /* @__PURE__ */
|
|
|
78
79
|
authIndicator: p,
|
|
79
80
|
selectedSchemeOptions: i,
|
|
80
81
|
schemeOptions: R
|
|
81
|
-
}), (e, t) => (r(), b(a(
|
|
82
|
+
}), (e, t) => (r(), b(a(Y), {
|
|
82
83
|
class: "group/params relative",
|
|
83
84
|
isStatic: e.isStatic,
|
|
84
85
|
itemCount: i.value.length,
|
|
@@ -86,17 +87,17 @@ const Y = ["id"], Z = { class: "min-w-0 flex-1 truncate" }, re = /* @__PURE__ */
|
|
|
86
87
|
}, {
|
|
87
88
|
title: c(() => [
|
|
88
89
|
u("div", {
|
|
89
|
-
id: a(
|
|
90
|
+
id: a(O),
|
|
90
91
|
class: "inline-flex items-center gap-0.5 leading-[20px]"
|
|
91
92
|
}, [
|
|
92
|
-
u("span", null,
|
|
93
|
+
u("span", null, y(e.title), 1),
|
|
93
94
|
p.value ? (r(), h("span", {
|
|
94
95
|
key: 0,
|
|
95
96
|
class: M(["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": p.value.text === "Required" }]),
|
|
96
97
|
"data-testid": "auth-indicator",
|
|
97
98
|
onClick: w
|
|
98
|
-
},
|
|
99
|
-
], 8,
|
|
99
|
+
}, y(p.value.text), 3)) : x("", !0)
|
|
100
|
+
], 8, Z)
|
|
100
101
|
]),
|
|
101
102
|
actions: c(() => [
|
|
102
103
|
m(a(T), {
|
|
@@ -110,32 +111,32 @@ const Y = ["id"], Z = { class: "min-w-0 flex-1 truncate" }, re = /* @__PURE__ */
|
|
|
110
111
|
"onUpdate:modelValue": A
|
|
111
112
|
}, {
|
|
112
113
|
option: c(({ option: s, selected: l }) => [
|
|
113
|
-
m(a(
|
|
114
|
+
m(a(z), {
|
|
114
115
|
multiselect: "",
|
|
115
116
|
selected: l
|
|
116
117
|
}, null, 8, ["selected"]),
|
|
117
|
-
u("div",
|
|
118
|
+
u("div", _, y(s.label), 1),
|
|
118
119
|
s.isDeletable ?? !e.isReadOnly ? (r(), b(a(E), {
|
|
119
120
|
key: 0,
|
|
120
121
|
class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
|
|
121
|
-
icon: a(
|
|
122
|
+
icon: a(P),
|
|
122
123
|
label: `Delete ${s.label}`,
|
|
123
124
|
size: "xs",
|
|
124
|
-
onClick: q((
|
|
125
|
+
onClick: q((v) => D(s), ["stop"])
|
|
125
126
|
}, null, 8, ["icon", "label", "onClick"])) : x("", !0)
|
|
126
127
|
]),
|
|
127
128
|
default: c(() => [
|
|
128
|
-
m(a(
|
|
129
|
+
m(a(j), {
|
|
129
130
|
ref_key: "comboboxButtonRef",
|
|
130
|
-
ref:
|
|
131
|
-
"aria-describedby": a(
|
|
131
|
+
ref: C,
|
|
132
|
+
"aria-describedby": a(O),
|
|
132
133
|
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",
|
|
133
134
|
variant: "ghost"
|
|
134
135
|
}, {
|
|
135
136
|
default: c(() => [
|
|
136
137
|
i.value.length === 1 ? (r(), h(g, { key: 0 }, [
|
|
137
138
|
t[2] || (t[2] = u("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
|
|
138
|
-
k(" " +
|
|
139
|
+
k(" " + y(i.value[0]?.label), 1)
|
|
139
140
|
], 64)) : i.value.length > 1 ? (r(), h(g, { key: 1 }, [
|
|
140
141
|
t[3] || (t[3] = k(" Multiple ", -1)),
|
|
141
142
|
t[4] || (t[4] = u("span", { class: "sr-only" }, "Auth Types Selected", -1))
|
|
@@ -155,7 +156,7 @@ const Y = ["id"], Z = { class: "min-w-0 flex-1 truncate" }, re = /* @__PURE__ */
|
|
|
155
156
|
}, 8, ["modelValue", "options"])
|
|
156
157
|
]),
|
|
157
158
|
default: c(() => [
|
|
158
|
-
m(
|
|
159
|
+
m(X, {
|
|
159
160
|
activeAuthIndex: e.selectedSecurity?.selectedIndex ?? 0,
|
|
160
161
|
environment: e.environment,
|
|
161
162
|
eventBus: e.eventBus,
|
|
@@ -166,7 +167,7 @@ const Y = ["id"], Z = { class: "min-w-0 flex-1 truncate" }, re = /* @__PURE__ */
|
|
|
166
167
|
selectedSchemeOptions: i.value,
|
|
167
168
|
server: e.server
|
|
168
169
|
}, null, 8, ["activeAuthIndex", "environment", "eventBus", "isStatic", "meta", "proxyUrl", "securitySchemes", "selectedSchemeOptions", "server"]),
|
|
169
|
-
o.value ? (r(), b(
|
|
170
|
+
o.value ? (r(), b(H, {
|
|
170
171
|
key: 0,
|
|
171
172
|
label: o.value.label,
|
|
172
173
|
scheme: o.value,
|
|
@@ -180,5 +181,5 @@ const Y = ["id"], Z = { class: "min-w-0 flex-1 truncate" }, re = /* @__PURE__ */
|
|
|
180
181
|
}
|
|
181
182
|
});
|
|
182
183
|
export {
|
|
183
|
-
|
|
184
|
+
ue as default
|
|
184
185
|
};
|
package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuthDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue"],"names":[],"mappings":"AAwJA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAGrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gEAAgE,CAAA;AAK1G,KAAK,WAAW,GAAG;IACjB,4CAA4C;IAC5C,WAAW,EAAE,kBAAkB,CAAA;IAC/B,mEAAmE;IACnE,QAAQ,EAAE,OAAO,CAAA;IACjB,8CAA8C;IAC9C,qBAAqB,EAAE,oBAAoB,EAAE,CAAA;IAC7C,uDAAuD;IACvD,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,0CAA0C;IAC1C,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IACpD,mCAAmC;IACnC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;IAC3B,2CAA2C;IAC3C,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,0CAA0C;IAC1C,IAAI,EAAE,QAAQ,CAAA;CACf,CAAC;;;;AA2OF,wBAOG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as f, computed as d, createElementBlock as
|
|
1
|
+
import { defineComponent as f, computed as d, createElementBlock as r, openBlock as s, withModifiers as y, createCommentVNode as m, createBlock as x, normalizeClass as n, Fragment as g, renderList as k, createElementVNode as u, toDisplayString as w, unref as B, withCtx as U, createVNode as C } from "vue";
|
|
2
2
|
import A from "./RequestAuthTab.vue.js";
|
|
3
3
|
import z from "../../../components/data-table/DataTable.vue.js";
|
|
4
4
|
const N = ["onClick"], O = { class: "relative z-10 font-medium whitespace-nowrap" }, T = {
|
|
@@ -18,44 +18,44 @@ const N = ["onClick"], O = { class: "relative z-10 font-medium whitespace-nowrap
|
|
|
18
18
|
meta: {}
|
|
19
19
|
},
|
|
20
20
|
setup(t, { expose: h }) {
|
|
21
|
-
const
|
|
21
|
+
const i = d(
|
|
22
22
|
() => t.selectedSchemeOptions[t.activeAuthIndex]
|
|
23
|
-
),
|
|
23
|
+
), b = d(() => t.selectedSchemeOptions.length > 1), v = (e) => t.eventBus.emit("auth:update:active-index", {
|
|
24
24
|
index: e,
|
|
25
25
|
meta: t.meta
|
|
26
|
-
}), p = (e) => t.eventBus.emit("auth:update:security-scheme", {
|
|
26
|
+
}), p = (e, a) => t.eventBus.emit("auth:update:security-scheme", {
|
|
27
27
|
payload: e,
|
|
28
|
-
name:
|
|
28
|
+
name: a
|
|
29
29
|
}), S = (e) => t.eventBus.emit("auth:update:selected-scopes", {
|
|
30
30
|
...e,
|
|
31
31
|
meta: t.meta
|
|
32
|
-
}),
|
|
32
|
+
}), o = (e) => t.activeAuthIndex === e;
|
|
33
33
|
return h({
|
|
34
|
-
activeScheme:
|
|
35
|
-
}), (e,
|
|
36
|
-
onSubmit:
|
|
34
|
+
activeScheme: i
|
|
35
|
+
}), (e, a) => (s(), r("form", {
|
|
36
|
+
onSubmit: a[0] || (a[0] = y(() => {
|
|
37
37
|
}, ["prevent"]))
|
|
38
38
|
}, [
|
|
39
|
-
|
|
39
|
+
b.value ? (s(), r("div", {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: n(["box-content flex flex-wrap gap-x-2.5 overflow-hidden border border-b-0 px-3", { "border-x-0": !e.isStatic }]),
|
|
42
42
|
"data-testid": "auth-tabs"
|
|
43
43
|
}, [
|
|
44
|
-
(
|
|
44
|
+
(s(!0), r(g, null, k(e.selectedSchemeOptions, (l, c) => (s(), r("div", {
|
|
45
45
|
key: l.id,
|
|
46
46
|
class: "relative z-1 -mb-[var(--scalar-border-width)] flex h-8"
|
|
47
47
|
}, [
|
|
48
48
|
u("button", {
|
|
49
|
-
class: n(["floating-bg relative cursor-pointer border-b border-transparent py-1 text-sm font-medium transition-colors", c
|
|
49
|
+
class: n(["floating-bg relative cursor-pointer border-b border-transparent py-1 text-sm font-medium transition-colors", o(c) ? "text-c-1" : "text-c-3"]),
|
|
50
50
|
type: "button",
|
|
51
|
-
onClick: (I) =>
|
|
51
|
+
onClick: (I) => v(c)
|
|
52
52
|
}, [
|
|
53
53
|
u("span", O, w(l.label), 1)
|
|
54
54
|
], 10, N),
|
|
55
|
-
c
|
|
55
|
+
o(c) ? (s(), r("div", T)) : m("", !0)
|
|
56
56
|
]))), 128))
|
|
57
57
|
], 2)) : m("", !0),
|
|
58
|
-
|
|
58
|
+
i.value ? (s(), x(B(z), {
|
|
59
59
|
key: 1,
|
|
60
60
|
class: n(["flex-1", { "bg-b-1 rounded-b-lg border border-t-0": e.isStatic }]),
|
|
61
61
|
columns: [""],
|
|
@@ -67,14 +67,14 @@ const N = ["onClick"], O = { class: "relative z-10 font-medium whitespace-nowrap
|
|
|
67
67
|
isStatic: e.isStatic,
|
|
68
68
|
proxyUrl: e.proxyUrl,
|
|
69
69
|
securitySchemes: e.securitySchemes,
|
|
70
|
-
selectedSecuritySchemas:
|
|
70
|
+
selectedSecuritySchemas: i.value.value,
|
|
71
71
|
server: e.server,
|
|
72
72
|
"onUpdate:securityScheme": p,
|
|
73
73
|
"onUpdate:selectedScopes": S
|
|
74
74
|
}, null, 8, ["environment", "isStatic", "proxyUrl", "securitySchemes", "selectedSecuritySchemas", "server"])
|
|
75
75
|
]),
|
|
76
76
|
_: 1
|
|
77
|
-
}, 8, ["class"])) : (
|
|
77
|
+
}, 8, ["class"])) : (s(), r("div", {
|
|
78
78
|
key: 2,
|
|
79
79
|
class: n(["bg-b-1 text-c-3 flex min-h-16 items-center justify-center border-t px-4 text-sm", { "min-h-[calc(4rem+0.5px)] rounded-b-lg border": e.isStatic }])
|
|
80
80
|
}, " No authentication selected ", 2))
|
|
@@ -108,7 +108,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
108
108
|
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
109
109
|
} | undefined;
|
|
110
110
|
} | undefined;
|
|
111
|
-
})) => any;
|
|
111
|
+
}), name: string) => any;
|
|
112
112
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
113
113
|
"onUpdate:selectedScopes"?: ((payload: Omit<{
|
|
114
114
|
id: string[];
|
|
@@ -208,7 +208,7 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
208
208
|
'x-scalar-credentials-location'?: "header" | "body" | undefined;
|
|
209
209
|
} | undefined;
|
|
210
210
|
} | undefined;
|
|
211
|
-
})) => any) | undefined;
|
|
211
|
+
}), name: string) => any) | undefined;
|
|
212
212
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
213
213
|
export default _default;
|
|
214
214
|
//# sourceMappingURL=RequestAuthTab.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue"],"names":[],"mappings":"AA8TA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2EAA2E,CAAA;AACnH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,yBAAyB,EAEzB,YAAY,EACb,MAAM,8DAA8D,CAAA;AAcrE,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,kBAAkB,CAAA;IAC/B,yFAAyF;IACzF,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,uBAAuB,EAAE,yBAAyB,CAAA;IAClD,eAAe,EAAE,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAA;IACjE,MAAM,EAAE,YAAY,GAAG,IAAI,CAAA;CAC5B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8iBF,wBAOG"}
|