@scalar/api-client 2.3.32 → 2.3.33
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 +32 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +1 -1
- package/dist/components/CodeInput/CodeInput.vue2.js +63 -61
- package/dist/components/DataTable/DataTable.vue.js +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +58 -48
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +2 -2
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +34 -32
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +6 -6
- package/dist/hooks/useClientConfig.d.ts +3 -0
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +64 -24
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +128 -48
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +64 -24
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +64 -24
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/index.js +26 -25
- package/dist/libs/local-storage.d.ts +8 -0
- package/dist/libs/local-storage.d.ts.map +1 -1
- package/dist/libs/local-storage.js +28 -24
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +8 -8
- package/dist/libs/send-request/create-request-operation.test.d.ts +2 -2
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/send-request/decode-buffer.js +4 -4
- package/dist/store/active-entities.d.ts +2 -2
- package/dist/store/active-entities.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +22 -22
- package/dist/store/request-example.d.ts.map +1 -1
- package/dist/store/security-schemes.d.ts +42 -2
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/store.d.ts +64 -24
- package/dist/store/store.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue.js +1 -1
- package/dist/views/Collection/CollectionAuthentication.vue2.js +32 -32
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionEnvironment.vue.js +3 -2
- package/dist/views/Collection/CollectionEnvironment.vue2.js +233 -9
- package/dist/views/Collection/CollectionNavigation.vue.js +36 -36
- package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionServers.vue2.js +6 -6
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +13 -0
- package/dist/views/Collection/components/EnvironmentForm.vue.d.ts.map +1 -0
- package/dist/views/Collection/components/EnvironmentForm.vue.js +7 -0
- package/dist/views/Collection/components/EnvironmentForm.vue2.js +274 -0
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.d.ts.map +1 -1
- package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +35 -34
- package/dist/views/Environment/EnvironmentModal.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentModal.vue.js +32 -28
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +67 -65
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +94 -97
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -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 +116 -99
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +27 -25
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -0
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +114 -73
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +15 -15
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +8 -0
- package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts.map +1 -0
- package/dist/views/Request/RequestSection/helpers/update-scheme.js +17 -0
- package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts +2 -0
- package/dist/views/Request/RequestSection/helpers/update-scheme.test.d.ts.map +1 -0
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +87 -84
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +21 -21
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +11 -11
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/consts/index.js +7 -5
- package/dist/views/Request/consts/mediaTypes.d.ts +4 -0
- package/dist/views/Request/consts/mediaTypes.d.ts.map +1 -1
- package/dist/views/Request/consts/mediaTypes.js +21 -4
- package/dist/views/Request/consts/mediaTypes.test.d.ts +2 -0
- package/dist/views/Request/consts/mediaTypes.test.d.ts.map +1 -0
- package/dist/views/Request/libs/oauth2.d.ts.map +1 -1
- package/dist/views/Request/libs/oauth2.js +53 -47
- package/package.json +11 -11
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useModal as
|
|
3
|
-
import { isDefined as
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as K, useId as L, ref as E, computed as p, createBlock as N, openBlock as d, withCtx as f, createVNode as y, unref as i, createElementVNode as a, createElementBlock as S, Fragment as k, createTextVNode as x, toDisplayString as A, createCommentVNode as j, normalizeClass as z } from "vue";
|
|
2
|
+
import { useModal as W, ScalarComboboxMultiselect as Y, ScalarButton as F, ScalarIcon as H } from "@scalar/components";
|
|
3
|
+
import { isDefined as J } from "@scalar/oas-utils/helpers";
|
|
4
|
+
import G from "../../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
5
5
|
import { useLayout as P } from "../../../../hooks/useLayout.js";
|
|
6
|
-
import {
|
|
7
|
-
import X from "
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
6
|
+
import { CLIENT_LS_KEYS as Q } from "../../../../libs/local-storage.js";
|
|
7
|
+
import { useWorkspace as X } from "../../../../store/store.js";
|
|
8
|
+
import Z from "./DeleteRequestAuthModal.vue.js";
|
|
9
|
+
import _ from "./RequestAuthDataTable.vue.js";
|
|
10
|
+
import { getSecurityRequirements as ee, formatComplexScheme as te, formatScheme as le, getSchemeOptions as oe } from "../../libs/auth.js";
|
|
11
|
+
const ne = ["id"], se = { class: "-mx-1 flex flex-1" }, re = { class: "text-c-1" }, Se = /* @__PURE__ */ K({
|
|
11
12
|
__name: "RequestAuth",
|
|
12
13
|
props: {
|
|
13
14
|
collection: {},
|
|
@@ -15,137 +16,152 @@ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1"
|
|
|
15
16
|
envVariables: {},
|
|
16
17
|
layout: {},
|
|
17
18
|
operation: {},
|
|
19
|
+
persistAuth: { type: Boolean, default: !1 },
|
|
18
20
|
selectedSecuritySchemeUids: {},
|
|
19
21
|
server: {},
|
|
20
22
|
title: {},
|
|
21
23
|
workspace: {}
|
|
22
24
|
},
|
|
23
25
|
setup(s) {
|
|
24
|
-
const { layout:
|
|
25
|
-
securitySchemes:
|
|
26
|
+
const { layout: C } = P(), {
|
|
27
|
+
securitySchemes: u,
|
|
26
28
|
securitySchemeMutators: O,
|
|
27
|
-
requestMutators:
|
|
28
|
-
collectionMutators:
|
|
29
|
-
} =
|
|
29
|
+
requestMutators: T,
|
|
30
|
+
collectionMutators: w
|
|
31
|
+
} = X(), q = L(), R = E(null), h = W(), v = E(
|
|
30
32
|
null
|
|
31
|
-
),
|
|
32
|
-
const e =
|
|
33
|
-
return { filteredRequirements: e.filter((
|
|
34
|
-
}),
|
|
35
|
-
const { filteredRequirements: e, requirements: t } =
|
|
33
|
+
), V = p(() => {
|
|
34
|
+
const e = ee(s.operation, s.collection);
|
|
35
|
+
return { filteredRequirements: e.filter((n) => Object.keys(n).length), requirements: e };
|
|
36
|
+
}), g = p(() => {
|
|
37
|
+
const { filteredRequirements: e, requirements: t } = V.value;
|
|
36
38
|
if (!t.length)
|
|
37
39
|
return null;
|
|
38
|
-
const
|
|
39
|
-
(
|
|
40
|
-
) && e.length < t.length, l =
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
})() : ""} ${
|
|
44
|
-
return { icon: l, text:
|
|
45
|
-
}),
|
|
40
|
+
const o = !t.some(
|
|
41
|
+
(m) => Object.keys(m).length > 1
|
|
42
|
+
) && e.length < t.length, l = o ? "Unlock" : "Lock", r = o ? "Optional" : "Required", $ = `${e.length === 1 ? (() => {
|
|
43
|
+
const m = Object.keys(e[0] || {});
|
|
44
|
+
return m.length > 1 ? m.join(" & ") : m[0] || "";
|
|
45
|
+
})() : ""} ${r}`;
|
|
46
|
+
return { icon: l, text: $ };
|
|
47
|
+
}), c = p(
|
|
46
48
|
() => s.selectedSecuritySchemeUids.map((e) => {
|
|
47
49
|
if (Array.isArray(e))
|
|
48
|
-
return
|
|
49
|
-
const t =
|
|
50
|
+
return te(e, u);
|
|
51
|
+
const t = u[e ?? ""];
|
|
50
52
|
if (t)
|
|
51
|
-
return
|
|
52
|
-
}).filter(
|
|
53
|
+
return le(t);
|
|
54
|
+
}).filter(J)
|
|
53
55
|
);
|
|
54
|
-
function
|
|
55
|
-
var
|
|
56
|
-
const t = e.find((l) => l.payload),
|
|
57
|
-
const
|
|
58
|
-
return
|
|
56
|
+
function M(e) {
|
|
57
|
+
var o;
|
|
58
|
+
const t = e.find((l) => l.payload), n = e.filter((l) => !l.payload).map(({ id: l }) => {
|
|
59
|
+
const r = l.split(",");
|
|
60
|
+
return r.length > 1 ? r : l;
|
|
59
61
|
});
|
|
60
62
|
if (t != null && t.payload) {
|
|
61
63
|
const l = O.add(
|
|
62
64
|
t.payload,
|
|
63
|
-
(
|
|
65
|
+
(o = s.collection) == null ? void 0 : o.uid
|
|
64
66
|
);
|
|
65
|
-
l &&
|
|
67
|
+
l && n.push(l.uid);
|
|
66
68
|
}
|
|
67
|
-
|
|
69
|
+
D(n);
|
|
68
70
|
}
|
|
69
|
-
const
|
|
71
|
+
const D = (e) => {
|
|
70
72
|
var t;
|
|
71
|
-
|
|
73
|
+
if (s.collection.useCollectionSecurity) {
|
|
74
|
+
if (w.edit(s.collection.uid, "selectedSecuritySchemeUids", e), !s.persistAuth)
|
|
75
|
+
return;
|
|
76
|
+
const n = e.map((o) => {
|
|
77
|
+
var l;
|
|
78
|
+
return Array.isArray(o) ? o.map((r) => {
|
|
79
|
+
var b;
|
|
80
|
+
return (b = u[r]) == null ? void 0 : b.nameKey;
|
|
81
|
+
}) : (l = u[o]) == null ? void 0 : l.nameKey;
|
|
82
|
+
});
|
|
83
|
+
localStorage.setItem(
|
|
84
|
+
Q.SELECTED_SECURITY_SCHEMES,
|
|
85
|
+
JSON.stringify(n)
|
|
86
|
+
);
|
|
87
|
+
} else (t = s.operation) != null && t.uid && T.edit(s.operation.uid, "selectedSecuritySchemeUids", e);
|
|
72
88
|
};
|
|
73
|
-
function
|
|
74
|
-
|
|
89
|
+
function U({ id: e, label: t }) {
|
|
90
|
+
v.value = { id: e, label: t }, h.show();
|
|
75
91
|
}
|
|
76
92
|
const B = (e) => {
|
|
77
|
-
var
|
|
93
|
+
var n;
|
|
78
94
|
if (!e)
|
|
79
95
|
return;
|
|
80
|
-
const t = s.selectedSecuritySchemeUids.filter((
|
|
96
|
+
const t = s.selectedSecuritySchemeUids.filter((o) => {
|
|
81
97
|
const l = e.split(",");
|
|
82
|
-
return l.length > 1 && Array.isArray(
|
|
98
|
+
return l.length > 1 && Array.isArray(o) && l.length === o.length ? o.every((r) => !l.includes(r)) : o !== e;
|
|
83
99
|
});
|
|
84
|
-
|
|
85
|
-
},
|
|
100
|
+
D(t), (n = R.value) == null || n.$el.focus(), h.hide();
|
|
101
|
+
}, I = p(
|
|
86
102
|
() => {
|
|
87
103
|
var e;
|
|
88
|
-
return
|
|
89
|
-
|
|
104
|
+
return oe(
|
|
105
|
+
V.value.filteredRequirements,
|
|
90
106
|
((e = s.collection) == null ? void 0 : e.securitySchemes) ?? [],
|
|
91
|
-
|
|
92
|
-
|
|
107
|
+
u,
|
|
108
|
+
C === "modal" || s.layout === "reference"
|
|
93
109
|
);
|
|
94
110
|
}
|
|
95
111
|
);
|
|
96
|
-
return (e, t) => (
|
|
112
|
+
return (e, t) => (d(), N(G, {
|
|
97
113
|
class: "group/params",
|
|
98
|
-
itemCount:
|
|
114
|
+
itemCount: c.value.length,
|
|
99
115
|
layout: e.layout
|
|
100
116
|
}, {
|
|
101
|
-
title:
|
|
102
|
-
|
|
103
|
-
id:
|
|
117
|
+
title: f(() => [
|
|
118
|
+
a("div", {
|
|
119
|
+
id: i(q),
|
|
104
120
|
class: "inline-flex items-center gap-1"
|
|
105
121
|
}, [
|
|
106
|
-
|
|
107
|
-
|
|
122
|
+
a("span", null, A(e.title), 1),
|
|
123
|
+
g.value ? (d(), S("span", {
|
|
108
124
|
key: 0,
|
|
109
|
-
class:
|
|
110
|
-
},
|
|
111
|
-
], 8,
|
|
125
|
+
class: z(["text-c-3 text-xs leading-[normal]", { "text-c-1": g.value.text === "Required" }])
|
|
126
|
+
}, A(g.value.text), 3)) : j("", !0)
|
|
127
|
+
], 8, ne)
|
|
112
128
|
]),
|
|
113
|
-
actions:
|
|
114
|
-
|
|
115
|
-
|
|
129
|
+
actions: f(() => [
|
|
130
|
+
a("div", se, [
|
|
131
|
+
y(i(Y), {
|
|
116
132
|
class: "w-72 text-xs",
|
|
117
|
-
isDeletable:
|
|
118
|
-
modelValue:
|
|
133
|
+
isDeletable: i(C) !== "modal" && e.layout !== "reference",
|
|
134
|
+
modelValue: c.value,
|
|
119
135
|
multiple: "",
|
|
120
|
-
options:
|
|
121
|
-
onDelete:
|
|
122
|
-
"onUpdate:modelValue":
|
|
136
|
+
options: I.value,
|
|
137
|
+
onDelete: U,
|
|
138
|
+
"onUpdate:modelValue": M
|
|
123
139
|
}, {
|
|
124
|
-
default:
|
|
125
|
-
|
|
140
|
+
default: f(() => [
|
|
141
|
+
y(i(F), {
|
|
126
142
|
ref_key: "comboboxButtonRef",
|
|
127
|
-
ref:
|
|
128
|
-
"aria-describedby":
|
|
143
|
+
ref: R,
|
|
144
|
+
"aria-describedby": i(q),
|
|
129
145
|
class: "hover:bg-b-3 text-c-1 hover:text-c-1 py-0.25 h-fit px-1.5 font-normal",
|
|
130
146
|
fullWidth: "",
|
|
131
147
|
variant: "ghost"
|
|
132
148
|
}, {
|
|
133
|
-
default:
|
|
134
|
-
var
|
|
149
|
+
default: f(() => {
|
|
150
|
+
var n;
|
|
135
151
|
return [
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
t[2] || (t[2] =
|
|
139
|
-
t[3] || (t[3] =
|
|
140
|
-
], 64)) :
|
|
141
|
-
t[4] || (t[4] =
|
|
142
|
-
|
|
143
|
-
], 64)) : (
|
|
144
|
-
t[5] || (t[5] =
|
|
145
|
-
t[6] || (t[6] =
|
|
152
|
+
a("div", re, [
|
|
153
|
+
c.value.length === 0 ? (d(), S(k, { key: 0 }, [
|
|
154
|
+
t[2] || (t[2] = a("span", { class: "sr-only" }, "Select", -1)),
|
|
155
|
+
t[3] || (t[3] = x(" Auth Type "))
|
|
156
|
+
], 64)) : c.value.length === 1 ? (d(), S(k, { key: 1 }, [
|
|
157
|
+
t[4] || (t[4] = a("span", { class: "sr-only" }, "Selected Auth Type:", -1)),
|
|
158
|
+
x(" " + A((n = c.value[0]) == null ? void 0 : n.label), 1)
|
|
159
|
+
], 64)) : (d(), S(k, { key: 2 }, [
|
|
160
|
+
t[5] || (t[5] = x(" Multiple ")),
|
|
161
|
+
t[6] || (t[6] = a("span", { class: "sr-only" }, "Auth Types Selected", -1))
|
|
146
162
|
], 64))
|
|
147
163
|
]),
|
|
148
|
-
|
|
164
|
+
y(i(H), {
|
|
149
165
|
class: "ml-1 shrink-0",
|
|
150
166
|
icon: "ChevronDown",
|
|
151
167
|
size: "sm"
|
|
@@ -159,23 +175,24 @@ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1"
|
|
|
159
175
|
}, 8, ["isDeletable", "modelValue", "options"])
|
|
160
176
|
])
|
|
161
177
|
]),
|
|
162
|
-
default:
|
|
163
|
-
|
|
178
|
+
default: f(() => [
|
|
179
|
+
y(_, {
|
|
164
180
|
collection: e.collection,
|
|
165
181
|
envVariables: e.envVariables,
|
|
166
182
|
environment: e.environment,
|
|
167
183
|
layout: e.layout,
|
|
168
|
-
|
|
184
|
+
persistAuth: e.persistAuth,
|
|
185
|
+
selectedSchemeOptions: c.value,
|
|
169
186
|
server: e.server,
|
|
170
187
|
workspace: e.workspace
|
|
171
|
-
}, null, 8, ["collection", "envVariables", "environment", "layout", "selectedSchemeOptions", "server", "workspace"]),
|
|
172
|
-
|
|
173
|
-
scheme:
|
|
174
|
-
state:
|
|
175
|
-
onClose: t[0] || (t[0] = (
|
|
176
|
-
onDelete: t[1] || (t[1] = (
|
|
177
|
-
var
|
|
178
|
-
return B((
|
|
188
|
+
}, null, 8, ["collection", "envVariables", "environment", "layout", "persistAuth", "selectedSchemeOptions", "server", "workspace"]),
|
|
189
|
+
y(Z, {
|
|
190
|
+
scheme: v.value,
|
|
191
|
+
state: i(h),
|
|
192
|
+
onClose: t[0] || (t[0] = (n) => i(h).hide()),
|
|
193
|
+
onDelete: t[1] || (t[1] = (n) => {
|
|
194
|
+
var o;
|
|
195
|
+
return B((o = v.value) == null ? void 0 : o.id);
|
|
179
196
|
})
|
|
180
197
|
}, null, 8, ["scheme", "state"])
|
|
181
198
|
]),
|
|
@@ -184,5 +201,5 @@ const le = ["id"], oe = { class: "-mx-1 flex flex-1" }, ne = { class: "text-c-1"
|
|
|
184
201
|
}
|
|
185
202
|
});
|
|
186
203
|
export {
|
|
187
|
-
|
|
204
|
+
Se as default
|
|
188
205
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuthDataTable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue"],"names":[],"mappings":"AAmNA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EAEV,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAIrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAO1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,WAAW,EAAE,OAAO,CAAA;IACpB,qBAAqB,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAkNF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestAuthDataTable.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-6e4f51b7"]]);
|
|
5
5
|
export {
|
|
6
6
|
f as default
|
|
7
7
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as b, ref as
|
|
2
|
-
import { useModal as
|
|
1
|
+
import { defineComponent as b, ref as d, computed as y, watch as k, createElementBlock as o, openBlock as s, withModifiers as w, createCommentVNode as m, createBlock as x, createVNode as p, Fragment as S, renderList as g, normalizeClass as h, createElementVNode as v, toDisplayString as A, unref as a, withCtx as C } from "vue";
|
|
2
|
+
import { useModal as V } from "@scalar/components";
|
|
3
3
|
import O from "./DeleteRequestAuthModal.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
4
|
+
import _ from "./RequestAuthTab.vue.js";
|
|
5
|
+
import z from "../../../../components/DataTable/DataTable.vue.js";
|
|
6
|
+
const B = {
|
|
7
7
|
key: 0,
|
|
8
|
-
class: "box-content flex h-8 flex-wrap gap-x-2.5 overflow-hidden border-
|
|
9
|
-
},
|
|
8
|
+
class: "box-content flex h-8 flex-wrap gap-x-2.5 overflow-hidden border border-b-0 px-3"
|
|
9
|
+
}, M = ["onClick"], N = { class: "relative z-10 whitespace-nowrap font-medium" }, $ = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "z-1 absolute inset-x-1 bottom-[var(--scalar-border-width)] left-1/2 h-px w-full -translate-x-1/2 bg-current"
|
|
12
12
|
}, q = {
|
|
@@ -19,14 +19,15 @@ const N = {
|
|
|
19
19
|
environment: {},
|
|
20
20
|
envVariables: {},
|
|
21
21
|
layout: { default: "client" },
|
|
22
|
+
persistAuth: { type: Boolean, default: !1 },
|
|
22
23
|
selectedSchemeOptions: { default: () => [] },
|
|
23
24
|
server: {},
|
|
24
25
|
workspace: {}
|
|
25
26
|
},
|
|
26
27
|
setup(i) {
|
|
27
|
-
const c =
|
|
28
|
+
const c = V(), f = d(
|
|
28
29
|
null
|
|
29
|
-
), t =
|
|
30
|
+
), t = d(0), u = y(() => {
|
|
30
31
|
const e = i.selectedSchemeOptions[t.value];
|
|
31
32
|
if (!e)
|
|
32
33
|
return [];
|
|
@@ -38,45 +39,46 @@ const N = {
|
|
|
38
39
|
(e) => {
|
|
39
40
|
e[t.value] || (t.value = Math.max(0, t.value - 1));
|
|
40
41
|
}
|
|
41
|
-
), (e, r) => (
|
|
42
|
+
), (e, r) => (s(), o("form", {
|
|
42
43
|
onSubmit: r[1] || (r[1] = w(() => {
|
|
43
44
|
}, ["prevent"]))
|
|
44
45
|
}, [
|
|
45
|
-
e.selectedSchemeOptions.length > 1 ? (
|
|
46
|
-
(
|
|
46
|
+
e.selectedSchemeOptions.length > 1 ? (s(), o("div", B, [
|
|
47
|
+
(s(!0), o(S, null, g(e.selectedSchemeOptions, (l, n) => (s(), o("div", {
|
|
47
48
|
key: l.id,
|
|
48
|
-
class:
|
|
49
|
+
class: h(["z-1 relative -mb-[var(--scalar-border-width)] flex h-8 cursor-pointer", [t.value === n ? "text-c-1" : "text-c-3"]])
|
|
49
50
|
}, [
|
|
50
|
-
|
|
51
|
+
v("button", {
|
|
51
52
|
class: "floating-bg relative cursor-pointer border-b-[1px] border-transparent py-1 text-sm font-medium",
|
|
52
53
|
type: "button",
|
|
53
54
|
onClick: (D) => t.value = n
|
|
54
55
|
}, [
|
|
55
|
-
|
|
56
|
-
], 8,
|
|
57
|
-
t.value === n ? (
|
|
56
|
+
v("span", N, A(l.label), 1)
|
|
57
|
+
], 8, M),
|
|
58
|
+
t.value === n ? (s(), o("div", $)) : m("", !0)
|
|
58
59
|
], 2))), 128))
|
|
59
|
-
])) :
|
|
60
|
-
u.value.length ? (
|
|
60
|
+
])) : m("", !0),
|
|
61
|
+
u.value.length ? (s(), x(a(z), {
|
|
61
62
|
key: 1,
|
|
62
|
-
class:
|
|
63
|
+
class: h(["flex-1", e.layout === "reference" && "rounded-b-lg border border-t-0"]),
|
|
63
64
|
columns: [""],
|
|
64
65
|
presentational: ""
|
|
65
66
|
}, {
|
|
66
|
-
default:
|
|
67
|
-
|
|
67
|
+
default: C(() => [
|
|
68
|
+
p(_, {
|
|
68
69
|
collection: e.collection,
|
|
69
70
|
envVariables: e.envVariables,
|
|
70
71
|
environment: e.environment,
|
|
71
72
|
layout: e.layout,
|
|
73
|
+
persistAuth: e.persistAuth,
|
|
72
74
|
securitySchemeUids: u.value,
|
|
73
75
|
server: e.server,
|
|
74
76
|
workspace: e.workspace
|
|
75
|
-
}, null, 8, ["collection", "envVariables", "environment", "layout", "securitySchemeUids", "server", "workspace"])
|
|
77
|
+
}, null, 8, ["collection", "envVariables", "environment", "layout", "persistAuth", "securitySchemeUids", "server", "workspace"])
|
|
76
78
|
]),
|
|
77
79
|
_: 1
|
|
78
|
-
}, 8, ["class"])) : (
|
|
79
|
-
|
|
80
|
+
}, 8, ["class"])) : (s(), o("div", q, " No authentication selected ")),
|
|
81
|
+
p(O, {
|
|
80
82
|
scheme: f.value,
|
|
81
83
|
state: a(c),
|
|
82
84
|
onClose: r[0] || (r[0] = (l) => a(c).hide())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestAuthTab.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue"],"names":[],"mappings":"AA6UA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EACV,UAAU,EAEV,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AAQrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAY1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC9B,WAAW,EAAE,OAAO,CAAA;IACpB,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AA+fF,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./RequestAuthTab.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import a from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ a(t, [["__scopeId", "data-v-abdabad2"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|