@scalar/api-client 2.3.26 → 2.3.28
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 +41 -0
- package/dist/components/CodeInput/CodeInput.vue.d.ts +4 -1
- package/dist/components/CodeInput/CodeInput.vue.d.ts.map +1 -1
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +76 -72
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +48 -45
- package/dist/components/CodeInput/index.d.ts +2 -0
- package/dist/components/CodeInput/index.d.ts.map +1 -0
- package/dist/components/CodeInput/index.js +4 -0
- package/dist/components/DataTable/DataTableInput.vue.d.ts +8 -1
- package/dist/components/DataTable/DataTableInput.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableInput.vue.js +3 -3
- package/dist/components/DataTable/DataTableInput.vue2.js +46 -43
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -1
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +82 -92
- package/dist/components/Form/Form.vue.d.ts +2 -2
- package/dist/components/Form/Form.vue.d.ts.map +1 -1
- package/dist/components/Form/Form.vue.js +17 -14
- package/dist/components/ImportCollection/IntegrationLogo.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/IntegrationLogo.vue.js +2 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +30 -30
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts +16 -0
- package/dist/components/Sidebar/SidebarListElement.vue.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarListElement.vue.js +3 -2
- package/dist/components/Sidebar/SidebarListElement.vue2.js +76 -54
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts +2 -2
- package/dist/components/ViewLayout/ViewLayoutSection.vue.d.ts.map +1 -1
- package/dist/components/ViewLayout/ViewLayoutSection.vue.js +5 -4
- package/dist/components/ViewLayout/index.d.ts +2 -0
- package/dist/components/ViewLayout/index.d.ts.map +1 -0
- package/dist/components/ViewLayout/index.js +4 -0
- package/dist/hooks/useClientConfig.d.ts +6 -6
- package/dist/hooks/useClientConfig.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.d.ts +13 -13
- package/dist/layouts/Modal/create-api-client-modal.d.ts +26 -26
- package/dist/layouts/Web/create-api-client-web.d.ts +13 -13
- package/dist/libs/create-client.d.ts +13 -13
- package/dist/libs/env-helpers.d.ts +10 -2
- package/dist/libs/env-helpers.d.ts.map +1 -1
- package/dist/libs/env-helpers.js +4 -2
- package/dist/libs/environment-parser.d.ts +1 -1
- package/dist/libs/hot-keys.d.ts +1 -1
- package/dist/libs/send-request/create-request-operation.d.ts.map +1 -1
- package/dist/libs/send-request/create-request-operation.js +9 -9
- package/dist/libs/send-request/create-request-operation.test.d.ts.map +1 -1
- package/dist/libs/string-template.d.ts.map +1 -1
- package/dist/libs/string-template.js +35 -21
- package/dist/routes.d.ts +10 -10
- package/dist/store/active-entities.js +34 -34
- package/dist/store/environment.js +1 -1
- package/dist/store/security-schemes.d.ts +10 -10
- package/dist/store/store.d.ts +13 -13
- package/dist/store/workspace.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/views/Collection/CollectionCookies.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionEnvironment.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionOverview.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionScripts.vue.d.ts +1 -1
- package/dist/views/Collection/CollectionServerForm.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionServerForm.vue.js +39 -34
- package/dist/views/Collection/CollectionServers.vue.d.ts.map +1 -1
- package/dist/views/Collection/CollectionServers.vue2.js +58 -78
- package/dist/views/Collection/CollectionSync.vue.d.ts +1 -1
- package/dist/views/Cookies/CookieForm.vue.d.ts +1 -1
- package/dist/views/Cookies/CookieRaw.vue.d.ts +1 -1
- package/dist/views/Environment/Environment.vue.d.ts.map +1 -1
- package/dist/views/Environment/Environment.vue2.js +208 -188
- package/dist/views/Environment/EnvironmentColors.vue.js +5 -5
- package/dist/views/Environment/EnvironmentModal.vue.js +21 -21
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +9 -9
- package/dist/views/Environment/handle-drag.d.ts +13 -0
- package/dist/views/Environment/handle-drag.d.ts.map +1 -0
- package/dist/views/Environment/handle-drag.js +32 -0
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +23 -22
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +111 -88
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +1 -0
- package/dist/views/Request/RequestSection/RequestParams.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestParams.vue.js +62 -56
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestSection.vue.js +4 -4
- package/dist/views/Request/RequestSection/RequestSection.vue2.js +42 -47
- package/dist/views/Request/RequestSection/RequestTable.vue.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +2 -2
- package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +10 -10
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
- package/package.json +24 -14
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarTooltip as
|
|
3
|
-
import { requestExampleParametersSchema as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { useWorkspace as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as N, ref as h, computed as u, onMounted as z, nextTick as d, watch as A, openBlock as v, createBlock as f, withCtx as i, createTextVNode as P, toDisplayString as w, createElementVNode as r, unref as R, createVNode as V, withModifiers as B, createCommentVNode as C, normalizeClass as M } from "vue";
|
|
2
|
+
import { ScalarTooltip as W, ScalarButton as D } from "@scalar/components";
|
|
3
|
+
import { requestExampleParametersSchema as x } from "@scalar/oas-utils/entities/spec";
|
|
4
|
+
import G from "../../../components/ViewLayout/ViewLayoutCollapse.vue.js";
|
|
5
|
+
import K from "./RequestTable.vue.js";
|
|
6
|
+
import { useWorkspace as U } from "../../../store/store.js";
|
|
7
|
+
const j = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity-0 group-hover/params:opacity-100 has-[:focus-visible]:opacity-100" }, F = { class: "sr-only" }, _ = /* @__PURE__ */ N({
|
|
8
8
|
__name: "RequestParams",
|
|
9
9
|
props: {
|
|
10
10
|
example: {},
|
|
@@ -18,45 +18,49 @@ const U = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
|
|
|
18
18
|
invalidParams: {}
|
|
19
19
|
},
|
|
20
20
|
setup(t) {
|
|
21
|
-
const { requestExampleMutators: s } =
|
|
22
|
-
|
|
21
|
+
const { requestExampleMutators: s } = U(), y = h(!1), n = u(() => t.example.parameters[t.paramKey] ?? []);
|
|
22
|
+
z(() => {
|
|
23
|
+
d(() => {
|
|
24
|
+
y.value = !0, b();
|
|
25
|
+
});
|
|
26
|
+
});
|
|
23
27
|
const m = () => {
|
|
24
|
-
const e =
|
|
28
|
+
const e = x.parse({ enabled: !1 }), a = [...n.value, e];
|
|
25
29
|
s.edit(t.example.uid, `parameters.${t.paramKey}`, a);
|
|
26
|
-
}, c =
|
|
27
|
-
const p =
|
|
30
|
+
}, c = h(null), $ = (e, a, o) => {
|
|
31
|
+
const p = n.value;
|
|
28
32
|
if (p.length > e) {
|
|
29
|
-
const
|
|
30
|
-
if (!
|
|
33
|
+
const l = [...p];
|
|
34
|
+
if (!l[e])
|
|
31
35
|
return;
|
|
32
|
-
|
|
36
|
+
l[e] = { ...l[e], [a]: o }, (l[e].key !== "" || l[e].value !== "") && (l[e].enabled = !0), l[e].key === "" && l[e].value === "" && l.splice(e, 1), s.edit(
|
|
33
37
|
t.example.uid,
|
|
34
38
|
`parameters.${t.paramKey}`,
|
|
35
|
-
|
|
39
|
+
l
|
|
36
40
|
);
|
|
37
41
|
} else {
|
|
38
|
-
const
|
|
39
|
-
s.edit(t.example.uid, `parameters.${t.paramKey}`,
|
|
40
|
-
var
|
|
42
|
+
const l = [x.parse({ [a]: o })];
|
|
43
|
+
s.edit(t.example.uid, `parameters.${t.paramKey}`, l), d(() => {
|
|
44
|
+
var k;
|
|
41
45
|
if (!c.value)
|
|
42
46
|
return;
|
|
43
|
-
(
|
|
47
|
+
(k = c.value.querySelectorAll("input")[a === "key" ? 0 : 1]) == null || k.focus();
|
|
44
48
|
});
|
|
45
49
|
}
|
|
46
50
|
e === p.length - 1 && m();
|
|
47
|
-
},
|
|
51
|
+
}, q = (e, a) => s.edit(
|
|
48
52
|
t.example.uid,
|
|
49
53
|
`parameters.${t.paramKey}.${e}.enabled`,
|
|
50
54
|
a
|
|
51
|
-
),
|
|
52
|
-
const e =
|
|
55
|
+
), E = () => {
|
|
56
|
+
const e = n.value.filter((a) => a.required);
|
|
53
57
|
s.edit(
|
|
54
58
|
t.example.uid,
|
|
55
59
|
`parameters.${t.paramKey}`,
|
|
56
60
|
e
|
|
57
|
-
),
|
|
58
|
-
},
|
|
59
|
-
const a =
|
|
61
|
+
), d(() => m());
|
|
62
|
+
}, T = (e) => {
|
|
63
|
+
const a = n.value;
|
|
60
64
|
if (a.length > e) {
|
|
61
65
|
const o = [...a];
|
|
62
66
|
o.splice(e, 1), s.edit(
|
|
@@ -66,49 +70,51 @@ const U = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
|
|
|
66
70
|
);
|
|
67
71
|
}
|
|
68
72
|
};
|
|
69
|
-
function
|
|
70
|
-
if (
|
|
73
|
+
function b() {
|
|
74
|
+
if (n.value.length === 0)
|
|
71
75
|
m();
|
|
72
|
-
else if (
|
|
73
|
-
const e =
|
|
76
|
+
else if (n.value.length >= 1) {
|
|
77
|
+
const e = n.value[n.value.length - 1];
|
|
74
78
|
e && e.key !== "" && e.value !== "" && m();
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
|
-
const
|
|
78
|
-
() =>
|
|
79
|
-
),
|
|
80
|
-
|
|
81
|
+
const O = u(
|
|
82
|
+
() => n.value.filter((e) => e.key || e.value).length
|
|
83
|
+
), S = u(
|
|
84
|
+
() => y.value && n.value.length > 1
|
|
85
|
+
);
|
|
86
|
+
A(
|
|
81
87
|
() => t.example,
|
|
82
88
|
(e, a) => {
|
|
83
|
-
e !== a &&
|
|
89
|
+
e !== a && b();
|
|
84
90
|
},
|
|
85
91
|
{ immediate: !0 }
|
|
86
92
|
);
|
|
87
|
-
const
|
|
88
|
-
return (e, a) => (
|
|
93
|
+
const g = u(() => (t.readOnlyEntries ?? []).length > 0);
|
|
94
|
+
return (e, a) => (v(), f(G, {
|
|
89
95
|
class: "group/params",
|
|
90
|
-
itemCount:
|
|
96
|
+
itemCount: O.value
|
|
91
97
|
}, {
|
|
92
98
|
title: i(() => [
|
|
93
|
-
|
|
99
|
+
P(w(e.title), 1)
|
|
94
100
|
]),
|
|
95
101
|
actions: i(() => [
|
|
96
|
-
r("div",
|
|
97
|
-
|
|
102
|
+
r("div", j, [
|
|
103
|
+
S.value ? (v(), f(R(W), {
|
|
98
104
|
key: 0,
|
|
99
105
|
side: "left",
|
|
100
106
|
sideOffset: 6
|
|
101
107
|
}, {
|
|
102
108
|
trigger: i(() => [
|
|
103
|
-
|
|
109
|
+
V(R(D), {
|
|
104
110
|
class: "pr-0.75 pl-1 transition-none",
|
|
105
111
|
size: "sm",
|
|
106
112
|
variant: "ghost",
|
|
107
|
-
onClick:
|
|
113
|
+
onClick: B(E, ["stop"])
|
|
108
114
|
}, {
|
|
109
115
|
default: i(() => [
|
|
110
|
-
a[0] || (a[0] =
|
|
111
|
-
r("span",
|
|
116
|
+
a[0] || (a[0] = P(" Clear ")),
|
|
117
|
+
r("span", F, "All " + w(e.title), 1)
|
|
112
118
|
]),
|
|
113
119
|
_: 1
|
|
114
120
|
})
|
|
@@ -121,7 +127,7 @@ const U = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
|
|
|
121
127
|
], -1)
|
|
122
128
|
])),
|
|
123
129
|
_: 1
|
|
124
|
-
})) :
|
|
130
|
+
})) : C("", !0)
|
|
125
131
|
])
|
|
126
132
|
]),
|
|
127
133
|
default: i(() => [
|
|
@@ -129,10 +135,10 @@ const U = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
|
|
|
129
135
|
ref_key: "tableWrapperRef",
|
|
130
136
|
ref: c
|
|
131
137
|
}, [
|
|
132
|
-
|
|
138
|
+
g.value ? (v(), f(K, {
|
|
133
139
|
key: 0,
|
|
134
|
-
class:
|
|
135
|
-
"bg-mix-transparent bg-mix-amount-95 bg-c-3":
|
|
140
|
+
class: M(["flex-1", {
|
|
141
|
+
"bg-mix-transparent bg-mix-amount-95 bg-c-3": g.value
|
|
136
142
|
}]),
|
|
137
143
|
columns: ["32px", "", ""],
|
|
138
144
|
envVariables: e.envVariables,
|
|
@@ -143,19 +149,19 @@ const U = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
|
|
|
143
149
|
items: e.readOnlyEntries,
|
|
144
150
|
label: e.label,
|
|
145
151
|
workspace: e.workspace
|
|
146
|
-
}, null, 8, ["class", "envVariables", "environment", "invalidParams", "items", "label", "workspace"])) :
|
|
147
|
-
|
|
152
|
+
}, null, 8, ["class", "envVariables", "environment", "invalidParams", "items", "label", "workspace"])) : C("", !0),
|
|
153
|
+
V(K, {
|
|
148
154
|
class: "flex-1",
|
|
149
155
|
columns: ["32px", "", ""],
|
|
150
156
|
envVariables: e.envVariables,
|
|
151
157
|
environment: e.environment,
|
|
152
158
|
invalidParams: e.invalidParams,
|
|
153
|
-
items:
|
|
159
|
+
items: n.value,
|
|
154
160
|
label: e.label,
|
|
155
161
|
workspace: e.workspace,
|
|
156
|
-
onToggleRow:
|
|
157
|
-
onUpdateRow:
|
|
158
|
-
onDeleteRow:
|
|
162
|
+
onToggleRow: q,
|
|
163
|
+
onUpdateRow: $,
|
|
164
|
+
onDeleteRow: T
|
|
159
165
|
}, null, 8, ["envVariables", "environment", "invalidParams", "items", "label", "workspace"])
|
|
160
166
|
], 512)
|
|
161
167
|
]),
|
|
@@ -164,5 +170,5 @@ const U = { class: "text-c-2 request-meta-buttons flex whitespace-nowrap opacity
|
|
|
164
170
|
}
|
|
165
171
|
});
|
|
166
172
|
export {
|
|
167
|
-
|
|
173
|
+
_ as default
|
|
168
174
|
};
|
|
@@ -14,6 +14,6 @@ type __VLS_Props = {
|
|
|
14
14
|
server: Server | undefined;
|
|
15
15
|
workspace: Workspace;
|
|
16
16
|
};
|
|
17
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {},
|
|
17
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
export default _default;
|
|
19
19
|
//# sourceMappingURL=RequestSection.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSection.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestSection.vue"],"names":[],"mappings":"AAgUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,MAAM,EACP,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAA;AASrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAU1D,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,OAAO,EAAE,cAAc,CAAA;IACvB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;IACpB,0BAA0B,EAAE,0BAA0B,CAAA;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAC;;AAoVF,wBAOG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./RequestSection.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-2e516ee8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as H, computed as p, useId as
|
|
2
|
-
import { ScalarErrorBoundary as
|
|
3
|
-
import { canMethodHaveBody as
|
|
1
|
+
import { defineComponent as H, computed as p, useId as A, ref as N, watch as I, openBlock as i, createBlock as d, withCtx as v, createElementVNode as c, unref as n, createElementBlock as f, createCommentVNode as y, toDisplayString as U, createVNode as t, withDirectives as s, vShow as m } from "vue";
|
|
2
|
+
import { ScalarErrorBoundary as D } from "@scalar/components";
|
|
3
|
+
import { canMethodHaveBody as h, isDefined as K, REGEX as q } from "@scalar/oas-utils/helpers";
|
|
4
4
|
import Q from "../../../components/SectionFilter.vue.js";
|
|
5
5
|
import $ from "../../../components/ViewLayout/ViewLayoutSection.vue.js";
|
|
6
6
|
import { matchesDomain as L } from "../../../libs/send-request/set-request-cookies.js";
|
|
7
7
|
import j from "./RequestBody.vue.js";
|
|
8
|
-
import
|
|
8
|
+
import b from "./RequestParams.vue.js";
|
|
9
9
|
import F from "./RequestPathParams.vue.js";
|
|
10
10
|
import M from "./RequestAuth/RequestAuth.vue.js";
|
|
11
11
|
import T from "./RequestCodeExample.vue.js";
|
|
@@ -35,14 +35,14 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
35
35
|
"Headers",
|
|
36
36
|
"Query",
|
|
37
37
|
"Body"
|
|
38
|
-
], { requestMutators: S, cookies: g, securitySchemes: B } = W(), { layout: u } = z(),
|
|
38
|
+
], { requestMutators: S, cookies: g, securitySchemes: B } = W(), { layout: u } = z(), k = p(() => {
|
|
39
39
|
const e = /* @__PURE__ */ new Set(["All", ...P]);
|
|
40
|
-
return l.example.parameters.path.length || e.delete("Variables"),
|
|
40
|
+
return l.example.parameters.path.length || e.delete("Variables"), h(l.operation.method ?? "get") || e.delete("Body"), w.value && e.delete("Auth"), [...e];
|
|
41
41
|
}), r = p(
|
|
42
42
|
() => Object.fromEntries(
|
|
43
|
-
|
|
43
|
+
k.value.map((e) => [e, A()])
|
|
44
44
|
)
|
|
45
|
-
),
|
|
45
|
+
), w = p(
|
|
46
46
|
() => {
|
|
47
47
|
var e;
|
|
48
48
|
return u === "modal" && ((e = l.operation.security) == null ? void 0 : e.length) === 0;
|
|
@@ -51,14 +51,14 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
51
51
|
I(
|
|
52
52
|
() => l.operation,
|
|
53
53
|
(e) => {
|
|
54
|
-
a.value === "Body" && e && !
|
|
54
|
+
a.value === "Body" && e && !h(e.method) && (a.value = "All");
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
const C = (e) => {
|
|
58
58
|
const o = e.target;
|
|
59
59
|
S.edit(l.operation.uid, "summary", o.value);
|
|
60
60
|
}, R = p(
|
|
61
|
-
() => (l.workspace.cookies ?? []).map((e) => g[e]).filter(
|
|
61
|
+
() => (l.workspace.cookies ?? []).map((e) => g[e]).filter(K).filter((e) => e.name).filter(
|
|
62
62
|
(e) => {
|
|
63
63
|
var o;
|
|
64
64
|
return L(((o = l.server) == null ? void 0 : o.url) || l.operation.path, e.domain);
|
|
@@ -74,40 +74,40 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
74
74
|
},
|
|
75
75
|
enabled: !0
|
|
76
76
|
}))
|
|
77
|
-
), E = () => l.operation.summary ? l.operation.summary : l.operation.path.replace(q.PROTOCOL, "") ? l.operation.path.replace(q.PROTOCOL, "") : "Request Name",
|
|
78
|
-
return (e, o) => (
|
|
77
|
+
), E = () => l.operation.summary ? l.operation.summary : l.operation.path.replace(q.PROTOCOL, "") ? l.operation.path.replace(q.PROTOCOL, "") : "Request Name", V = A();
|
|
78
|
+
return (e, o) => (i(), d($, {
|
|
79
79
|
"aria-label": `Request: ${e.operation.summary}`
|
|
80
80
|
}, {
|
|
81
|
-
title:
|
|
82
|
-
|
|
83
|
-
n(u) !== "modal" ? (
|
|
81
|
+
title: v(() => [
|
|
82
|
+
c("div", G, [
|
|
83
|
+
n(u) !== "modal" ? (i(), f("label", {
|
|
84
84
|
key: 0,
|
|
85
85
|
class: "pointer-events-auto absolute left-0 top-0 h-full w-full cursor-text opacity-0",
|
|
86
|
-
for: n(
|
|
87
|
-
}, null, 8, X)) :
|
|
88
|
-
n(u) !== "modal" ? (
|
|
86
|
+
for: n(V)
|
|
87
|
+
}, null, 8, X)) : y("", !0),
|
|
88
|
+
n(u) !== "modal" ? (i(), f("input", {
|
|
89
89
|
key: 1,
|
|
90
|
-
id: n(
|
|
90
|
+
id: n(V),
|
|
91
91
|
class: "text-c-1 group-hover-input pl-1.25 md:-ml-1.25 pointer-events-auto relative z-10 -ml-0.5 h-8 w-full rounded has-[:focus-visible]:outline",
|
|
92
92
|
placeholder: E(),
|
|
93
93
|
value: e.operation.summary,
|
|
94
94
|
onInput: C
|
|
95
|
-
}, null, 40, J)) : (
|
|
95
|
+
}, null, 40, J)) : (i(), f("span", Y, U(e.operation.summary), 1))
|
|
96
96
|
]),
|
|
97
97
|
t(Q, {
|
|
98
98
|
modelValue: a.value,
|
|
99
99
|
"onUpdate:modelValue": o[0] || (o[0] = (O) => a.value = O),
|
|
100
100
|
filterIds: r.value,
|
|
101
|
-
filters:
|
|
101
|
+
filters: k.value
|
|
102
102
|
}, null, 8, ["modelValue", "filterIds", "filters"])
|
|
103
103
|
]),
|
|
104
|
-
default:
|
|
105
|
-
|
|
104
|
+
default: v(() => [
|
|
105
|
+
c("div", {
|
|
106
106
|
id: r.value.All,
|
|
107
107
|
class: "request-section-content custom-scroll relative flex flex-1 flex-col divide-y",
|
|
108
108
|
role: a.value === "All" ? "tabpanel" : "none"
|
|
109
109
|
}, [
|
|
110
|
-
e.collection && e.workspace && (n(u) !== "modal" || Object.keys(n(B) ?? {}).length) ?
|
|
110
|
+
e.collection && e.workspace && (n(u) !== "modal" || Object.keys(n(B) ?? {}).length) ? s((i(), d(M, {
|
|
111
111
|
key: 0,
|
|
112
112
|
id: r.value.Auth,
|
|
113
113
|
class: "request-section-content-auth border-b-0",
|
|
@@ -123,11 +123,11 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
123
123
|
workspace: e.workspace
|
|
124
124
|
}, null, 8, ["id", "collection", "envVariables", "environment", "operation", "role", "selectedSecuritySchemeUids", "server", "workspace"])), [
|
|
125
125
|
[
|
|
126
|
-
|
|
127
|
-
!
|
|
126
|
+
m,
|
|
127
|
+
!w.value && (a.value === "All" || a.value === "Auth")
|
|
128
128
|
]
|
|
129
|
-
]) :
|
|
130
|
-
|
|
129
|
+
]) : y("", !0),
|
|
130
|
+
s(t(F, {
|
|
131
131
|
id: r.value.Variables,
|
|
132
132
|
class: "request-section-content-path-params",
|
|
133
133
|
envVariables: e.envVariables,
|
|
@@ -141,11 +141,11 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
141
141
|
workspace: e.workspace
|
|
142
142
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
143
143
|
[
|
|
144
|
-
|
|
144
|
+
m,
|
|
145
145
|
(a.value === "All" || a.value === "Variables") && e.example.parameters.path.length
|
|
146
146
|
]
|
|
147
147
|
]),
|
|
148
|
-
|
|
148
|
+
s(t(b, {
|
|
149
149
|
id: r.value.Cookies,
|
|
150
150
|
class: "request-section-content-cookies",
|
|
151
151
|
envVariables: e.envVariables,
|
|
@@ -158,12 +158,11 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
158
158
|
readOnlyEntries: R.value,
|
|
159
159
|
role: a.value === "All" ? "none" : "tabpanel",
|
|
160
160
|
title: "Cookies",
|
|
161
|
-
workspace: e.workspace
|
|
162
|
-
workspaceParamKey: "cookies"
|
|
161
|
+
workspace: e.workspace
|
|
163
162
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "readOnlyEntries", "role", "workspace"]), [
|
|
164
|
-
[
|
|
163
|
+
[m, a.value === "All" || a.value === "Cookies"]
|
|
165
164
|
]),
|
|
166
|
-
|
|
165
|
+
s(t(b, {
|
|
167
166
|
id: r.value.Headers,
|
|
168
167
|
class: "request-section-content-headers",
|
|
169
168
|
envVariables: e.envVariables,
|
|
@@ -177,9 +176,9 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
177
176
|
title: "Headers",
|
|
178
177
|
workspace: e.workspace
|
|
179
178
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
180
|
-
[
|
|
179
|
+
[m, a.value === "All" || a.value === "Headers"]
|
|
181
180
|
]),
|
|
182
|
-
|
|
181
|
+
s(t(b, {
|
|
183
182
|
id: r.value.Query,
|
|
184
183
|
class: "request-section-content-query",
|
|
185
184
|
envVariables: e.envVariables,
|
|
@@ -193,9 +192,10 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
193
192
|
title: "Query Parameters",
|
|
194
193
|
workspace: e.workspace
|
|
195
194
|
}, null, 8, ["id", "envVariables", "environment", "example", "invalidParams", "operation", "role", "workspace"]), [
|
|
196
|
-
[
|
|
195
|
+
[m, a.value === "All" || a.value === "Query"]
|
|
197
196
|
]),
|
|
198
|
-
i(
|
|
197
|
+
e.operation.method && (a.value === "All" || a.value === "Body") && n(h)(e.operation.method) ? (i(), d(j, {
|
|
198
|
+
key: 1,
|
|
199
199
|
id: r.value.Body,
|
|
200
200
|
class: "request-section-content-body",
|
|
201
201
|
envVariables: e.envVariables,
|
|
@@ -205,15 +205,10 @@ const G = { class: "group pointer-events-none flex flex-1 items-center gap-1 lg:
|
|
|
205
205
|
role: a.value === "All" ? "none" : "tabpanel",
|
|
206
206
|
title: "Body",
|
|
207
207
|
workspace: e.workspace
|
|
208
|
-
}, null, 8, ["id", "envVariables", "environment", "example", "operation", "role", "workspace"]),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
]
|
|
213
|
-
]),
|
|
214
|
-
o[1] || (o[1] = v("div", { class: "-my-0.25 flex flex-grow" }, null, -1)),
|
|
215
|
-
t(n(U), null, {
|
|
216
|
-
default: d(() => [
|
|
208
|
+
}, null, 8, ["id", "envVariables", "environment", "example", "operation", "role", "workspace"])) : y("", !0),
|
|
209
|
+
o[1] || (o[1] = c("div", { class: "-my-0.25 flex flex-grow" }, null, -1)),
|
|
210
|
+
t(n(D), null, {
|
|
211
|
+
default: v(() => [
|
|
217
212
|
t(T, {
|
|
218
213
|
class: "request-section-content-code-example",
|
|
219
214
|
collection: e.collection,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestTable.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-9b558be3"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -34,7 +34,7 @@ const W = { class: "col-1 flex-center relative gap-6 p-2 capitalize" }, $ = {
|
|
|
34
34
|
}));
|
|
35
35
|
}, k = (o) => {
|
|
36
36
|
o != null && o.createNew && x.name === "request" && f();
|
|
37
|
-
}, w = "2.3.
|
|
37
|
+
}, w = "2.3.28";
|
|
38
38
|
return R(() => a.hotKeys.on(k)), v(() => a.hotKeys.off(k)), (o, e) => (l(), u("div", W, [
|
|
39
39
|
s("div", {
|
|
40
40
|
class: y(["flex h-[calc(100%_-_50px)] flex-col items-center justify-center", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseLoadingOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseLoadingOverlay.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ResponseLoadingOverlay.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseLoadingOverlay.vue"],"names":[],"mappings":";AA4LA,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ResponseLoadingOverlay.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const p = /* @__PURE__ */
|
|
3
|
+
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-62b8db3f"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { defineComponent as u, ref as c, openBlock as
|
|
1
|
+
import { defineComponent as u, ref as c, openBlock as l, createBlock as d, Transition as m, withCtx as r, unref as e, createElementBlock as f, createVNode as i, createTextVNode as p, createCommentVNode as g } from "vue";
|
|
2
2
|
import { useLoadingState as v, ScalarLoading as x, ScalarButton as _ } from "@scalar/components";
|
|
3
3
|
import { useWorkspace as k } from "../../../store/store.js";
|
|
4
4
|
const L = {
|
|
5
5
|
key: 0,
|
|
6
|
-
class: "bg-b-1 absolute inset-0 flex flex-col items-center justify-center gap-6"
|
|
7
|
-
},
|
|
6
|
+
class: "bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6"
|
|
7
|
+
}, b = /* @__PURE__ */ u({
|
|
8
8
|
__name: "ResponseLoadingOverlay",
|
|
9
9
|
setup(S) {
|
|
10
10
|
const { events: n } = k(), t = v(), a = c();
|
|
11
11
|
return n.requestStatus.on((s) => {
|
|
12
12
|
s === "start" ? a.value = setTimeout(() => t.startLoading(), 1e3) : (clearTimeout(a.value), a.value = void 0, t.stopLoading());
|
|
13
|
-
}), (s, o) => (
|
|
14
|
-
default:
|
|
15
|
-
e(t).isLoading ? (
|
|
16
|
-
|
|
13
|
+
}), (s, o) => (l(), d(m, null, {
|
|
14
|
+
default: r(() => [
|
|
15
|
+
e(t).isLoading ? (l(), f("div", L, [
|
|
16
|
+
i(e(x), {
|
|
17
17
|
class: "text-c-3",
|
|
18
18
|
loadingState: e(t),
|
|
19
19
|
size: "3xl"
|
|
20
20
|
}, null, 8, ["loadingState"]),
|
|
21
|
-
|
|
21
|
+
i(e(_), {
|
|
22
22
|
variant: "ghost",
|
|
23
23
|
onClick: o[0] || (o[0] = (C) => e(n).cancelRequest.emit())
|
|
24
24
|
}, {
|
|
25
|
-
default:
|
|
25
|
+
default: r(() => o[1] || (o[1] = [
|
|
26
26
|
p(" Cancel ")
|
|
27
27
|
])),
|
|
28
28
|
_: 1
|
|
@@ -34,5 +34,5 @@ const L = {
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
export {
|
|
37
|
-
|
|
37
|
+
b as default
|
|
38
38
|
};
|
|
@@ -9,6 +9,6 @@ type __VLS_Props = {
|
|
|
9
9
|
response: ResponseInstance | undefined;
|
|
10
10
|
requestResult: SendRequestResult | null | undefined;
|
|
11
11
|
};
|
|
12
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {},
|
|
12
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
export default _default;
|
|
14
14
|
//# sourceMappingURL=ResponseSection.vue.d.ts.map
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rest",
|
|
19
19
|
"testing"
|
|
20
20
|
],
|
|
21
|
-
"version": "2.3.
|
|
21
|
+
"version": "2.3.28",
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
@@ -45,6 +45,11 @@
|
|
|
45
45
|
"types": "./dist/components/AddressBar/index.d.ts",
|
|
46
46
|
"default": "./dist/components/AddressBar/index.js"
|
|
47
47
|
},
|
|
48
|
+
"./components/CodeInput": {
|
|
49
|
+
"import": "./dist/components/CodeInput/index.js",
|
|
50
|
+
"types": "./dist/components/CodeInput/index.d.ts",
|
|
51
|
+
"default": "./dist/components/CodeInput/index.js"
|
|
52
|
+
},
|
|
48
53
|
"./components/CommandPalette": {
|
|
49
54
|
"import": "./dist/components/CommandPalette/index.js",
|
|
50
55
|
"types": "./dist/components/CommandPalette/index.d.ts",
|
|
@@ -75,6 +80,11 @@
|
|
|
75
80
|
"types": "./dist/components/Sidebar/index.d.ts",
|
|
76
81
|
"default": "./dist/components/Sidebar/index.js"
|
|
77
82
|
},
|
|
83
|
+
"./components/ViewLayout": {
|
|
84
|
+
"import": "./dist/components/ViewLayout/index.js",
|
|
85
|
+
"types": "./dist/components/ViewLayout/index.d.ts",
|
|
86
|
+
"default": "./dist/components/ViewLayout/index.js"
|
|
87
|
+
},
|
|
78
88
|
"./css/*.css": {
|
|
79
89
|
"import": "./dist/css/*.css",
|
|
80
90
|
"require": "./dist/css/*.css",
|
|
@@ -188,21 +198,21 @@
|
|
|
188
198
|
"vue-router": "^4.3.0",
|
|
189
199
|
"whatwg-mimetype": "^4.0.0",
|
|
190
200
|
"yaml": "^2.4.5",
|
|
191
|
-
"zod": "
|
|
192
|
-
"@scalar/components": "0.13.
|
|
193
|
-
"@scalar/
|
|
194
|
-
"@scalar/
|
|
195
|
-
"@scalar/
|
|
196
|
-
"@scalar/
|
|
201
|
+
"zod": "3.24.1",
|
|
202
|
+
"@scalar/components": "0.13.54",
|
|
203
|
+
"@scalar/draggable": "0.1.11",
|
|
204
|
+
"@scalar/icons": "0.3.3",
|
|
205
|
+
"@scalar/import": "0.3.21",
|
|
206
|
+
"@scalar/oas-utils": "0.2.138",
|
|
197
207
|
"@scalar/openapi-parser": "0.10.16",
|
|
198
208
|
"@scalar/openapi-types": "0.2.1",
|
|
199
|
-
"@scalar/
|
|
200
|
-
"@scalar/themes": "0.10.3",
|
|
201
|
-
"@scalar/types": "0.1.11",
|
|
209
|
+
"@scalar/object-utils": "1.1.13",
|
|
202
210
|
"@scalar/snippetz": "0.2.19",
|
|
203
|
-
"@scalar/
|
|
204
|
-
"@scalar/
|
|
205
|
-
"@scalar/
|
|
211
|
+
"@scalar/postman-to-openapi": "0.2.11",
|
|
212
|
+
"@scalar/themes": "0.10.4",
|
|
213
|
+
"@scalar/types": "0.1.12",
|
|
214
|
+
"@scalar/use-codemirror": "0.11.99",
|
|
215
|
+
"@scalar/use-hooks": "0.1.46",
|
|
206
216
|
"@scalar/use-tooltip": "1.0.6",
|
|
207
217
|
"@scalar/use-toasts": "0.7.9"
|
|
208
218
|
},
|
|
@@ -220,7 +230,7 @@
|
|
|
220
230
|
"vite-svg-loader": "^5.1.0",
|
|
221
231
|
"vitest": "^1.6.0",
|
|
222
232
|
"@scalar/galaxy": "0.3.1",
|
|
223
|
-
"@scalar/build-tooling": "0.1.
|
|
233
|
+
"@scalar/build-tooling": "0.1.18"
|
|
224
234
|
},
|
|
225
235
|
"scripts": {
|
|
226
236
|
"build": "scalar-build-vite",
|