@scalar/api-client 2.0.60 → 2.0.62
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 +34 -0
- package/dist/components/CodeInput/CodeInput.vue.js +2 -2
- package/dist/components/CodeInput/CodeInput.vue2.js +16 -15
- package/dist/components/CodeInput/codeVariableWidget.d.ts.map +1 -1
- package/dist/components/CodeInput/codeVariableWidget.js +35 -30
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts +3 -0
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.d.ts.map +1 -0
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +114 -0
- package/dist/components/EnvironmentSelector/EnvironmentSelector.vue2.js +4 -0
- package/dist/layouts/App/create-api-client-app.d.ts +153 -129
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +306 -258
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +153 -129
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/event-busses/hot-keys-bus.d.ts +1 -1
- package/dist/libs/local-storage.js +1 -1
- package/dist/libs/normalizeHeaders.d.ts +1 -2
- package/dist/libs/normalizeHeaders.d.ts.map +1 -1
- package/dist/libs/sendRequest.d.ts +4 -5
- package/dist/libs/sendRequest.d.ts.map +1 -1
- package/dist/libs/sendRequest.js +104 -86
- package/dist/store/workspace.d.ts +302 -257
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +219 -216
- package/dist/style.css +1 -1
- package/dist/views/Environment/Environment.vue2.js +12 -12
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts.map +1 -1
- package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +54 -52
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +4 -4
- package/dist/views/Request/Request.vue2.js +91 -89
- package/dist/views/Request/RequestSection/RequestTable.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestTable.vue.js +2 -2
- package/dist/views/Request/RequestSection/RequestTable.vue2.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +2 -2
- package/dist/views/Request/RequestSidebarItem.vue2.js +82 -80
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts +2 -2
- package/dist/views/Request/ResponseSection/ResponseBody.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseBody.vue.js +20 -20
- package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseSection.vue.js +47 -42
- package/package.json +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, ref as c, onMounted as C, openBlock as r, createBlock as f, withCtx as o, createVNode as a, createElementVNode as _, createElementBlock as d, Fragment as V, renderList as S, unref as u, createTextVNode as $, createSlots as h, createCommentVNode as I, toDisplayString as L, withKeys as B, nextTick as R } from "vue";
|
|
2
2
|
import A from "../../components/CodeInput/CodeInput.vue.js";
|
|
3
3
|
import K from "../../components/Sidebar/Sidebar.vue.js";
|
|
4
4
|
/* empty css */
|
|
@@ -13,7 +13,7 @@ import { useWorkspace as W } from "../../store/workspace.js";
|
|
|
13
13
|
import { nanoid as j } from "nanoid";
|
|
14
14
|
import { useRouter as q } from "vue-router";
|
|
15
15
|
import z from "./EnvironmentColors.vue.js";
|
|
16
|
-
const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, de = /* @__PURE__ */
|
|
16
|
+
const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, de = /* @__PURE__ */ b({
|
|
17
17
|
__name: "Environment",
|
|
18
18
|
setup(X) {
|
|
19
19
|
const v = q(), { environments: l, environmentMutators: s } = W(), e = c(null), p = c(null), m = c(!1);
|
|
@@ -35,18 +35,18 @@ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
|
|
|
35
35
|
s.delete(t), e.value === t && (e.value = null);
|
|
36
36
|
}, g = (t) => {
|
|
37
37
|
e.value && (l[e.value].color = t);
|
|
38
|
-
}, b = () => {
|
|
39
|
-
v.currentRoute.value.params.environment === "default" && (e.value = l.default.uid);
|
|
40
38
|
}, x = () => {
|
|
39
|
+
v.currentRoute.value.params.environment === "default" && (e.value = l.default.uid);
|
|
40
|
+
}, w = () => {
|
|
41
41
|
e.value && !l[e.value].isDefault && (m.value = !0, R(() => {
|
|
42
42
|
var t;
|
|
43
43
|
(t = p.value) == null || t.focus();
|
|
44
44
|
}));
|
|
45
|
-
},
|
|
45
|
+
}, D = (t) => {
|
|
46
46
|
const n = t.target.value;
|
|
47
47
|
e.value && !l[e.value].isDefault && s.edit(e.value, "name", n);
|
|
48
48
|
};
|
|
49
|
-
return
|
|
49
|
+
return C(x), (t, i) => (r(), f(F, null, {
|
|
50
50
|
default: o(() => [
|
|
51
51
|
a(H, null, {
|
|
52
52
|
default: o(() => [
|
|
@@ -55,7 +55,7 @@ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
|
|
|
55
55
|
_("div", G, [
|
|
56
56
|
a(T, null, {
|
|
57
57
|
default: o(() => [
|
|
58
|
-
(r(!0), d(
|
|
58
|
+
(r(!0), d(V, null, S(u(l), (n) => (r(), f(U, {
|
|
59
59
|
key: n.uid,
|
|
60
60
|
class: "text-xs",
|
|
61
61
|
variable: {
|
|
@@ -65,8 +65,8 @@ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
|
|
|
65
65
|
isDefault: n.isDefault
|
|
66
66
|
},
|
|
67
67
|
warningMessage: "Are you sure you want to delete this environment?",
|
|
68
|
-
onClick: (
|
|
69
|
-
onDelete: (
|
|
68
|
+
onClick: (N) => e.value = n.uid,
|
|
69
|
+
onDelete: (N) => k(n.uid)
|
|
70
70
|
}, null, 8, ["variable", "onClick", "onDelete"]))), 128))
|
|
71
71
|
]),
|
|
72
72
|
_: 1
|
|
@@ -76,7 +76,7 @@ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
|
|
|
76
76
|
button: o(() => [
|
|
77
77
|
a(M, { click: y }, {
|
|
78
78
|
title: o(() => [
|
|
79
|
-
$("Add Environment
|
|
79
|
+
$("Add Environment")
|
|
80
80
|
]),
|
|
81
81
|
_: 1
|
|
82
82
|
})
|
|
@@ -102,7 +102,7 @@ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
|
|
|
102
102
|
fn: o(() => [
|
|
103
103
|
!m.value || u(l)[e.value].isDefault ? (r(), d("span", {
|
|
104
104
|
key: 0,
|
|
105
|
-
onDblclick:
|
|
105
|
+
onDblclick: w
|
|
106
106
|
}, L(u(l)[e.value].name), 33)) : (r(), d("input", {
|
|
107
107
|
key: 1,
|
|
108
108
|
ref_key: "nameInputRef",
|
|
@@ -112,7 +112,7 @@ const G = { class: "flex-1" }, P = ["value"], Q = { class: "colors ml-auto" }, d
|
|
|
112
112
|
type: "text",
|
|
113
113
|
value: u(l)[e.value].name,
|
|
114
114
|
onBlur: i[0] || (i[0] = (n) => m.value = !1),
|
|
115
|
-
onInput:
|
|
115
|
+
onInput: D,
|
|
116
116
|
onKeyup: i[1] || (i[1] = B((n) => m.value = !1, ["enter"]))
|
|
117
117
|
}, null, 40, P)),
|
|
118
118
|
_("div", Q, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EnvironmentVariableDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Environment/EnvironmentVariableDropdown.vue"],"names":[],"mappings":"AAuHA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAQvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;;WAK/B,MAAM;8BACa,cAAc,CAAC,0BAA0B,CAAC;kBACtD,cAAc,CAAC,cAAc,CAAC;YACpC,MAAM;;;;WAHP,MAAM;8BACa,cAAc,CAAC,0BAA0B,CAAC;kBACtD,cAAc,CAAC,cAAc,CAAC;YACpC,MAAM;;;;AAqOhB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as b, ref as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as b, ref as E, computed as C, openBlock as n, createBlock as u, unref as s, withCtx as d, createElementBlock as a, Fragment as V, renderList as I, createElementVNode as c, normalizeClass as D, createTextVNode as p, toDisplayString as v, createVNode as S } from "vue";
|
|
2
|
+
import { ScalarDropdown as z, ScalarDropdownItem as B, ScalarIcon as N } from "@scalar/components";
|
|
3
|
+
import P from "fuse.js";
|
|
4
|
+
const $ = { key: 0 }, j = ["onClick"], q = { class: "flex items-center gap-1.5 whitespace-nowrap" }, A = { class: "w-20 overflow-hidden text-ellipsis text-right" }, Q = /* @__PURE__ */ b({
|
|
5
5
|
__name: "EnvironmentVariableDropdown",
|
|
6
6
|
props: {
|
|
7
7
|
query: {},
|
|
@@ -10,60 +10,62 @@ const j = ["open"], q = { key: 0 }, A = ["onClick"], D = { class: "flex items-ce
|
|
|
10
10
|
router: {}
|
|
11
11
|
},
|
|
12
12
|
emits: ["select"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
const e =
|
|
16
|
-
|
|
17
|
-
}, { push:
|
|
13
|
+
setup(m, { emit: f }) {
|
|
14
|
+
const r = m, h = f, l = E(!0), w = () => {
|
|
15
|
+
const e = k.value.params.workspace;
|
|
16
|
+
_(`/workspace/${e}/environment/default`), l.value = !1;
|
|
17
|
+
}, { push: _, currentRoute: k } = r.router, g = new P(r.activeParsedEnvironments.value, {
|
|
18
18
|
keys: ["key", "value"]
|
|
19
|
-
}),
|
|
20
|
-
const e =
|
|
19
|
+
}), i = C(() => {
|
|
20
|
+
const e = r.query;
|
|
21
21
|
if (!e)
|
|
22
|
-
return
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
}),
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
return (e,
|
|
22
|
+
return r.activeParsedEnvironments.value.slice(-4);
|
|
23
|
+
const o = g.search(e);
|
|
24
|
+
return o.length > 0 ? o.map((t) => t.item) : [];
|
|
25
|
+
}), x = (e) => {
|
|
26
|
+
h("select", e);
|
|
27
|
+
}, y = (e) => "_scalarEnvId" in e ? `bg-${r.environments[e._scalarEnvId].color}` : "bg-grey";
|
|
28
|
+
return (e, o) => (n(), u(s(z), {
|
|
29
29
|
id: "env-dialog",
|
|
30
30
|
class: "z-10 w-60 rounded border bg-b-1 p-1",
|
|
31
|
-
open:
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
open: l.value,
|
|
32
|
+
static: ""
|
|
33
|
+
}, {
|
|
34
|
+
items: d(() => [
|
|
35
|
+
i.value.length ? (n(), a("ul", $, [
|
|
36
|
+
(n(!0), a(V, null, I(i.value, (t) => (n(), a("li", {
|
|
37
|
+
key: t.key,
|
|
38
|
+
class: "h-8 font-code text-3xs hover:bg-b-2 flex cursor-pointer items-center justify-between gap-1.5 rounded p-1.5 transition-colors duration-150",
|
|
39
|
+
onClick: (F) => x(t.key)
|
|
40
|
+
}, [
|
|
41
|
+
c("div", q, [
|
|
42
|
+
c("span", {
|
|
43
|
+
class: D(["h-2.5 w-2.5 min-w-2.5 rounded-full", y(t)])
|
|
44
|
+
}, null, 2),
|
|
45
|
+
p(" " + v(t.key), 1)
|
|
46
|
+
]),
|
|
47
|
+
c("span", A, v(t.value), 1)
|
|
48
|
+
], 8, j))), 128))
|
|
49
|
+
])) : (n(), u(s(B), {
|
|
50
|
+
key: 1,
|
|
51
|
+
class: "font-code !text-3xs hover:bg-b-2 flex h-8 w-full justify-start gap-2 !px-1.5 transition-colors duration-150",
|
|
52
|
+
onClick: w
|
|
53
|
+
}, {
|
|
54
|
+
default: d(() => [
|
|
55
|
+
S(s(N), {
|
|
56
|
+
class: "w-2",
|
|
57
|
+
icon: "Add",
|
|
58
|
+
size: "xs"
|
|
59
|
+
}),
|
|
60
|
+
p(" Add variable ")
|
|
45
61
|
]),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
])
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
variant: "secondary",
|
|
52
|
-
onClick: f
|
|
53
|
-
}, {
|
|
54
|
-
default: z(() => [
|
|
55
|
-
N(d(S), {
|
|
56
|
-
class: "w-2",
|
|
57
|
-
icon: "Add",
|
|
58
|
-
size: "xs"
|
|
59
|
-
}),
|
|
60
|
-
i(" Add variable ")
|
|
61
|
-
]),
|
|
62
|
-
_: 1
|
|
63
|
-
}))
|
|
64
|
-
], 8, j));
|
|
62
|
+
_: 1
|
|
63
|
+
}))
|
|
64
|
+
]),
|
|
65
|
+
_: 1
|
|
66
|
+
}, 8, ["open"]));
|
|
65
67
|
}
|
|
66
68
|
});
|
|
67
69
|
export {
|
|
68
|
-
|
|
70
|
+
Q as default
|
|
69
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Request.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/Request.vue"],"names":[],"mappings":";;cA2hB8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AAkzBjD,wBAMG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./Request.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fa353420"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { defineComponent as Re, ref as z, watch as A, onMounted as Se, onBeforeUnmount as we, openBlock as
|
|
1
|
+
import { defineComponent as Re, ref as z, watch as A, onMounted as Se, onBeforeUnmount as we, openBlock as m, createElementBlock as _, normalizeClass as b, unref as o, createElementVNode as v, createVNode as d, createBlock as x, createCommentVNode as k, withCtx as f, withDirectives as ye, createSlots as _e, isRef as ke, withModifiers as L, Fragment as j, renderList as H, createTextVNode as K, toDisplayString as Ue, vShow as Ce, pushScopeId as qe, popScopeId as De } from "vue";
|
|
2
2
|
import Ie from "../../components/AddressBar/AddressBar.vue.js";
|
|
3
|
-
import Be from "../../components/
|
|
3
|
+
import Be from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
|
|
4
|
+
import Oe from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
4
5
|
import { useSearch as Ve } from "../../components/Search/useSearch.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import $e from "../../components/Sidebar/SidebarButton.vue.js";
|
|
7
|
+
import Ee from "../../components/Sidebar/SidebarToggle.vue.js";
|
|
8
|
+
import Me from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
8
9
|
import Fe from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
9
|
-
import { useWorkspace as
|
|
10
|
-
import
|
|
10
|
+
import { useWorkspace as Pe } from "../../store/workspace.js";
|
|
11
|
+
import Te from "./RequestSection/RequestSection.vue.js";
|
|
11
12
|
/* empty css */
|
|
12
|
-
import
|
|
13
|
-
import { ScalarIcon as D, ScalarSearchInput as
|
|
14
|
-
import { useToasts as
|
|
15
|
-
import { useMediaQuery as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
13
|
+
import Ne from "./ResponseSection/ResponseSection.vue.js";
|
|
14
|
+
import { ScalarIcon as D, ScalarSearchInput as We, ScalarSearchResultList as ze, ScalarSearchResultItem as Ae } from "@scalar/components";
|
|
15
|
+
import { useToasts as Le } from "@scalar/use-toasts";
|
|
16
|
+
import { useMediaQuery as je } from "@vueuse/core";
|
|
17
|
+
import He from "./RequestSidebarItem.vue.js";
|
|
18
|
+
import Ke from "../../components/Sidebar/Sidebar.vue.js";
|
|
18
19
|
/* empty css */
|
|
19
|
-
import
|
|
20
|
-
import { useSidebar as
|
|
21
|
-
import { sendRequest as
|
|
20
|
+
import Je from "./components/WorkspaceDropdown.vue.js";
|
|
21
|
+
import { useSidebar as Qe } from "../../hooks/useSidebar.js";
|
|
22
|
+
import { sendRequest as Ge } from "../../libs/sendRequest.js";
|
|
22
23
|
import { executeRequestBus as J } from "../../libs/event-busses/execute-request-bus.js";
|
|
23
|
-
import { cancelRequestBus as
|
|
24
|
+
import { cancelRequestBus as Xe } from "../../libs/event-busses/cancel-request-bus.js";
|
|
24
25
|
import { hotKeyBus as Q } from "../../libs/event-busses/hot-keys-bus.js";
|
|
25
26
|
import { commandPaletteBus as G } from "../../libs/event-busses/command-palette-bus.js";
|
|
26
|
-
import { requestStatusBus as
|
|
27
|
-
const
|
|
27
|
+
import { requestStatusBus as U } from "../../libs/event-busses/request-status-bus.js";
|
|
28
|
+
const Ye = (S) => (qe("data-v-fa353420"), S = S(), De(), S), Ze = { class: "lg:min-h-header flex items-center w-full justify-center p-1 flex-wrap t-app__top-container border-b-1/2" }, et = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, tt = /* @__PURE__ */ Ye(() => /* @__PURE__ */ v("a", {
|
|
28
29
|
class: "text-c-2 text-sm font-medium gitbook-show ml-.5 hover:text-c-1 border p-1 rounded hover:bg-b-3",
|
|
29
30
|
href: "https://scalar.com/",
|
|
30
31
|
target: "_blank"
|
|
31
|
-
}, " Powered by Scalar.com ", -1)),
|
|
32
|
+
}, " Powered by Scalar.com ", -1)), ot = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, st = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-50" }, Bt = /* @__PURE__ */ Re({
|
|
32
33
|
__name: "Request",
|
|
33
34
|
emits: ["newTab"],
|
|
34
35
|
setup(S, { emit: X }) {
|
|
@@ -40,28 +41,28 @@ const Xe = (S) => (qe("data-v-e8d1eeb0"), S = S(), De(), S), Ye = { class: "lg:m
|
|
|
40
41
|
activeWorkspace: c,
|
|
41
42
|
activeWorkspaceCollections: ee,
|
|
42
43
|
activeWorkspaceServers: te,
|
|
43
|
-
activeWorkspaceRequests:
|
|
44
|
+
activeWorkspaceRequests: oe,
|
|
44
45
|
collectionMutators: I,
|
|
45
46
|
collections: p,
|
|
46
|
-
cookies:
|
|
47
|
+
cookies: se,
|
|
47
48
|
environments: re,
|
|
48
49
|
findRequestFolders: ae,
|
|
49
|
-
folders:
|
|
50
|
+
folders: g,
|
|
50
51
|
folderMutators: B,
|
|
51
52
|
modalState: ie,
|
|
52
53
|
requestMutators: le,
|
|
53
|
-
workspaceMutators:
|
|
54
|
-
} =
|
|
54
|
+
workspaceMutators: O
|
|
55
|
+
} = Pe(), { collapsedSidebarFolders: ne, setCollapsedSidebarFolder: ce } = Qe(), { toast: V } = Le(), {
|
|
55
56
|
searchText: y,
|
|
56
57
|
searchResultsWithPlaceholderResults: $,
|
|
57
58
|
selectedSearchResult: E,
|
|
58
59
|
onSearchResultClick: de,
|
|
59
60
|
fuseSearch: ue,
|
|
60
|
-
searchInputRef:
|
|
61
|
+
searchInputRef: M,
|
|
61
62
|
searchResultRefs: me,
|
|
62
|
-
navigateSearchResults:
|
|
63
|
+
navigateSearchResults: F,
|
|
63
64
|
selectSearchResult: fe
|
|
64
|
-
} = Ve(), pe =
|
|
65
|
+
} = Ve(), pe = je("(max-width: 780px)"), u = z(!((W = c.value) != null && W.isReadOnly)), C = z();
|
|
65
66
|
A(pe, (e) => u.value = !e), A(
|
|
66
67
|
h,
|
|
67
68
|
(e) => {
|
|
@@ -71,7 +72,7 @@ const Xe = (S) => (qe("data-v-e8d1eeb0"), S = S(), De(), S), Ye = { class: "lg:m
|
|
|
71
72
|
},
|
|
72
73
|
{ immediate: !0 }
|
|
73
74
|
);
|
|
74
|
-
const
|
|
75
|
+
const P = async () => {
|
|
75
76
|
var r, a;
|
|
76
77
|
if (!h.value || !w.value) {
|
|
77
78
|
console.warn(
|
|
@@ -93,17 +94,17 @@ const Xe = (S) => (qe("data-v-e8d1eeb0"), S = S(), De(), S), Ye = { class: "lg:m
|
|
|
93
94
|
e = e.replace(t, (l, n) => (te.value.forEach((i) => {
|
|
94
95
|
if (i.url === n)
|
|
95
96
|
return n;
|
|
96
|
-
}), s[n] || n)),
|
|
97
|
+
}), s[n] || n)), U.emit("start");
|
|
97
98
|
try {
|
|
98
|
-
|
|
99
|
-
const { request: l, response: n, error: i } = await
|
|
99
|
+
C.value = new AbortController();
|
|
100
|
+
const { request: l, response: n, error: i } = await Ge(
|
|
100
101
|
h.value,
|
|
101
102
|
w.value,
|
|
102
103
|
e,
|
|
103
104
|
Z.value,
|
|
104
105
|
(r = c.value) == null ? void 0 : r.proxyUrl,
|
|
105
|
-
|
|
106
|
-
(a =
|
|
106
|
+
se,
|
|
107
|
+
(a = C.value) == null ? void 0 : a.signal
|
|
107
108
|
);
|
|
108
109
|
l && n ? (le.edit(h.value.uid, "history", [
|
|
109
110
|
...h.value.history,
|
|
@@ -112,25 +113,25 @@ const Xe = (S) => (qe("data-v-e8d1eeb0"), S = S(), De(), S), Ye = { class: "lg:m
|
|
|
112
113
|
response: n,
|
|
113
114
|
timestamp: Date.now()
|
|
114
115
|
}
|
|
115
|
-
]),
|
|
116
|
+
]), U.emit("stop")) : (i instanceof DOMException && i.name == "AbortError" || V((i == null ? void 0 : i.message) ?? "Send Request Failed", "error"), U.emit("abort"));
|
|
116
117
|
} catch (l) {
|
|
117
|
-
console.error(l),
|
|
118
|
-
${l}`, "error"),
|
|
118
|
+
console.error(l), V(`Oops!
|
|
119
|
+
${l}`, "error"), U.emit("abort");
|
|
119
120
|
}
|
|
120
|
-
},
|
|
121
|
+
}, T = (e) => {
|
|
121
122
|
var s;
|
|
122
|
-
e.toggleSidebar && (u.value = !u.value), e.openCommandPalette && (e.openCommandPalette.preventDefault(), G.emit()), e.focusRequestSearch && ((s =
|
|
123
|
+
e.toggleSidebar && (u.value = !u.value), e.openCommandPalette && (e.openCommandPalette.preventDefault(), G.emit()), e.focusRequestSearch && ((s = M.value) == null || s.focus()), e.navigateSearchResultsUp && F("up"), e.navigateSearchResultsDown && F("down"), e.selectSearchResult && fe();
|
|
123
124
|
}, he = async () => {
|
|
124
125
|
var e;
|
|
125
|
-
return (e =
|
|
126
|
+
return (e = C.value) == null ? void 0 : e.abort();
|
|
126
127
|
};
|
|
127
128
|
Se(() => {
|
|
128
|
-
J.on(
|
|
129
|
+
J.on(P), Xe.on(he), Q.on(T);
|
|
129
130
|
}), we(() => {
|
|
130
|
-
J.off(
|
|
131
|
+
J.off(P), Q.off(T);
|
|
131
132
|
});
|
|
132
|
-
const
|
|
133
|
-
p[e] ? I.edit(e, "childUids", s) :
|
|
133
|
+
const N = (e, s) => {
|
|
134
|
+
p[e] ? I.edit(e, "childUids", s) : g[e] && B.edit(e, "childUids", s);
|
|
134
135
|
}, ve = (e, s) => {
|
|
135
136
|
if (!e || !s) return;
|
|
136
137
|
const { id: t, parentId: r } = e, { id: a, parentId: l, offset: n } = s;
|
|
@@ -140,23 +141,23 @@ ${l}`, "error"), k.emit("abort");
|
|
|
140
141
|
p[r].childUids.filter(
|
|
141
142
|
(i) => i !== t
|
|
142
143
|
)
|
|
143
|
-
) :
|
|
144
|
+
) : g[r] && B.edit(
|
|
144
145
|
r,
|
|
145
146
|
"childUids",
|
|
146
|
-
|
|
147
|
-
) :
|
|
147
|
+
g[r].childUids.filter((i) => i !== t)
|
|
148
|
+
) : O.edit(
|
|
148
149
|
c.value.uid,
|
|
149
150
|
"collectionUids",
|
|
150
151
|
c.value.collectionUids.filter((i) => i !== t)
|
|
151
152
|
), n === 2) {
|
|
152
|
-
const i = p[a] ||
|
|
153
|
-
|
|
153
|
+
const i = p[a] || g[a];
|
|
154
|
+
N(a, [...i.childUids, t]);
|
|
154
155
|
} else if (l) {
|
|
155
|
-
const
|
|
156
|
-
|
|
156
|
+
const R = [...(p[l] || g[l]).childUids], q = R.findIndex((ge) => a === ge) ?? 0;
|
|
157
|
+
R.splice(q + n, 0, t), N(l, R);
|
|
157
158
|
} else {
|
|
158
|
-
const i = [...c.value.collectionUids],
|
|
159
|
-
i.splice(
|
|
159
|
+
const i = [...c.value.collectionUids], R = i.findIndex((q) => a === q) ?? 0;
|
|
160
|
+
i.splice(R + n, 0, t), O.edit(
|
|
160
161
|
c.value.uid,
|
|
161
162
|
"collectionUids",
|
|
162
163
|
i
|
|
@@ -168,24 +169,25 @@ ${l}`, "error"), k.emit("abort");
|
|
|
168
169
|
}, xe = (e, s) => {
|
|
169
170
|
Y("newTab", { name: e, uid: s });
|
|
170
171
|
};
|
|
171
|
-
return (e, s) => (
|
|
172
|
+
return (e, s) => (m(), _("div", {
|
|
172
173
|
class: b(["flex flex-1 flex-col rounded pt-0 h-full bg-b-1 relative border-1/2 rounded mr-1.5 mb-1.5 overflow-hidden", {
|
|
173
174
|
"!mr-0 !mb-0 !border-0": o(c).isReadOnly
|
|
174
175
|
}])
|
|
175
176
|
}, [
|
|
176
|
-
v("div",
|
|
177
|
-
v("div",
|
|
178
|
-
d(
|
|
177
|
+
v("div", Ze, [
|
|
178
|
+
v("div", et, [
|
|
179
|
+
d(Ee, {
|
|
179
180
|
modelValue: u.value,
|
|
180
181
|
"onUpdate:modelValue": s[0] || (s[0] = (t) => u.value = t),
|
|
181
182
|
class: "gitbook-hidden"
|
|
182
183
|
}, null, 8, ["modelValue"]),
|
|
183
|
-
|
|
184
|
+
tt
|
|
184
185
|
]),
|
|
185
186
|
d(Ie),
|
|
186
|
-
v("div",
|
|
187
|
-
o(c).isReadOnly ? (
|
|
188
|
-
|
|
187
|
+
v("div", ot, [
|
|
188
|
+
o(c).isReadOnly ? k("", !0) : (m(), x(Be, { key: 0 })),
|
|
189
|
+
o(c).isReadOnly ? (m(), _("button", {
|
|
190
|
+
key: 1,
|
|
189
191
|
class: "text-c-3 hover:bg-b-2 active:text-c-1 p-2 rounded",
|
|
190
192
|
type: "button",
|
|
191
193
|
onClick: s[1] || (s[1] = (t) => o(ie).hide())
|
|
@@ -195,21 +197,21 @@ ${l}`, "error"), k.emit("abort");
|
|
|
195
197
|
size: "lg",
|
|
196
198
|
thickness: "1.75"
|
|
197
199
|
})
|
|
198
|
-
])) :
|
|
200
|
+
])) : k("", !0)
|
|
199
201
|
])
|
|
200
202
|
]),
|
|
201
|
-
d(
|
|
202
|
-
default:
|
|
203
|
-
ye(d(o(
|
|
203
|
+
d(Me, null, {
|
|
204
|
+
default: f(() => [
|
|
205
|
+
ye(d(o(Ke), {
|
|
204
206
|
class: b([u.value ? "sidebar-active-width" : ""]),
|
|
205
207
|
showSideBar: u.value,
|
|
206
208
|
"onUpdate:showSideBar": s[5] || (s[5] = (t) => u.value = t)
|
|
207
209
|
}, _e({
|
|
208
|
-
content:
|
|
210
|
+
content: f(() => [
|
|
209
211
|
v("div", st, [
|
|
210
|
-
d(o(
|
|
212
|
+
d(o(We), {
|
|
211
213
|
ref_key: "searchInputRef",
|
|
212
|
-
ref:
|
|
214
|
+
ref: M,
|
|
213
215
|
modelValue: o(y),
|
|
214
216
|
"onUpdate:modelValue": s[2] || (s[2] = (t) => ke(y) ? y.value = t : null),
|
|
215
217
|
sidebar: "",
|
|
@@ -225,13 +227,13 @@ ${l}`, "error"), k.emit("abort");
|
|
|
225
227
|
onDragover: s[4] || (s[4] = L(() => {
|
|
226
228
|
}, ["prevent"]))
|
|
227
229
|
}, [
|
|
228
|
-
o(y) ? (
|
|
230
|
+
o(y) ? (m(), x(o(ze), {
|
|
229
231
|
key: 0,
|
|
230
232
|
class: "gap-px custom-scroll",
|
|
231
233
|
noResults: !o($).length
|
|
232
234
|
}, {
|
|
233
|
-
default:
|
|
234
|
-
(
|
|
235
|
+
default: f(() => [
|
|
236
|
+
(m(!0), _(j, null, H(o($), (t, r) => (m(), x(o(Ae), {
|
|
235
237
|
id: `#search-input-${t.item.id}`,
|
|
236
238
|
key: t.refIndex,
|
|
237
239
|
ref_for: !0,
|
|
@@ -241,22 +243,22 @@ ${l}`, "error"), k.emit("abort");
|
|
|
241
243
|
onClick: (a) => o(de)(t),
|
|
242
244
|
onFocus: (a) => E.value = r
|
|
243
245
|
}, {
|
|
244
|
-
addon:
|
|
245
|
-
d(
|
|
246
|
+
addon: f(() => [
|
|
247
|
+
d(Oe, {
|
|
246
248
|
class: "font-bold",
|
|
247
249
|
method: t.item.httpVerb ?? "get"
|
|
248
250
|
}, null, 8, ["method"])
|
|
249
251
|
]),
|
|
250
|
-
default:
|
|
252
|
+
default: f(() => [
|
|
251
253
|
K(Ue(t.item.title) + " ", 1)
|
|
252
254
|
]),
|
|
253
255
|
_: 2
|
|
254
256
|
}, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
|
|
255
257
|
]),
|
|
256
258
|
_: 1
|
|
257
|
-
}, 8, ["noResults"])) : (
|
|
259
|
+
}, 8, ["noResults"])) : (m(!0), _(j, { key: 1 }, H(o(ee), (t) => {
|
|
258
260
|
var r, a;
|
|
259
|
-
return
|
|
261
|
+
return m(), x(He, {
|
|
260
262
|
key: t.uid,
|
|
261
263
|
isDraggable: !o(c).isReadOnly && ((a = (r = t.spec) == null ? void 0 : r.info) == null ? void 0 : a.title) !== "Drafts",
|
|
262
264
|
isDroppable: be,
|
|
@@ -265,7 +267,7 @@ ${l}`, "error"), k.emit("abort");
|
|
|
265
267
|
onNewTab: xe,
|
|
266
268
|
onOnDragEnd: ve
|
|
267
269
|
}, {
|
|
268
|
-
leftIcon:
|
|
270
|
+
leftIcon: f(() => [
|
|
269
271
|
d(o(D), {
|
|
270
272
|
class: "text-sidebar-c-2 text-sm group-hover:hidden",
|
|
271
273
|
icon: "CodeFolder",
|
|
@@ -289,15 +291,15 @@ ${l}`, "error"), k.emit("abort");
|
|
|
289
291
|
}), 128))
|
|
290
292
|
], 34)
|
|
291
293
|
]),
|
|
292
|
-
button:
|
|
293
|
-
o(c).isReadOnly ?
|
|
294
|
+
button: f(() => [
|
|
295
|
+
o(c).isReadOnly ? k("", !0) : (m(), x($e, {
|
|
294
296
|
key: 0,
|
|
295
297
|
class: b({
|
|
296
|
-
"empty-sidebar-item": o(
|
|
298
|
+
"empty-sidebar-item": o(oe).length === 1
|
|
297
299
|
}),
|
|
298
300
|
click: o(G).emit
|
|
299
301
|
}, {
|
|
300
|
-
title:
|
|
302
|
+
title: f(() => [
|
|
301
303
|
K("Add Item")
|
|
302
304
|
]),
|
|
303
305
|
_: 1
|
|
@@ -307,29 +309,29 @@ ${l}`, "error"), k.emit("abort");
|
|
|
307
309
|
}, [
|
|
308
310
|
o(c).isReadOnly ? void 0 : {
|
|
309
311
|
name: "header",
|
|
310
|
-
fn:
|
|
311
|
-
d(o(
|
|
312
|
+
fn: f(() => [
|
|
313
|
+
d(o(Je))
|
|
312
314
|
]),
|
|
313
315
|
key: "0"
|
|
314
316
|
}
|
|
315
317
|
]), 1032, ["class", "showSideBar"]), [
|
|
316
318
|
[Ce, u.value]
|
|
317
319
|
]),
|
|
318
|
-
o(w) ? (
|
|
320
|
+
o(w) ? (m(), x(Fe, {
|
|
319
321
|
key: 0,
|
|
320
322
|
class: b(["flex-1", [u.value ? "sidebar-active-hide-layout" : ""]])
|
|
321
323
|
}, {
|
|
322
|
-
default:
|
|
324
|
+
default: f(() => {
|
|
323
325
|
var t, r, a, l, n;
|
|
324
326
|
return [
|
|
325
|
-
d(
|
|
326
|
-
d(
|
|
327
|
+
d(Te),
|
|
328
|
+
d(Ne, {
|
|
327
329
|
response: (n = (l = (t = o(h)) == null ? void 0 : t.history) == null ? void 0 : l[((a = (r = o(h)) == null ? void 0 : r.history) == null ? void 0 : a.length) - 1]) == null ? void 0 : n.response
|
|
328
330
|
}, null, 8, ["response"])
|
|
329
331
|
];
|
|
330
332
|
}),
|
|
331
333
|
_: 1
|
|
332
|
-
}, 8, ["class"])) :
|
|
334
|
+
}, 8, ["class"])) : k("", !0)
|
|
333
335
|
]),
|
|
334
336
|
_: 1
|
|
335
337
|
})
|
|
@@ -337,5 +339,5 @@ ${l}`, "error"), k.emit("abort");
|
|
|
337
339
|
}
|
|
338
340
|
});
|
|
339
341
|
export {
|
|
340
|
-
|
|
342
|
+
Bt as default
|
|
341
343
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/RequestSection/RequestTable.vue"],"names":[],"mappings":"AAwMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;;YAQ5E,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;YAHlB,uBAAuB,EAAE;IACjC,8BAA8B;sBACZ,OAAO;uBACN,OAAO;;;;;;;;;;;;;;qBADR,OAAO;sBACN,OAAO;;AAqd9B,wBAOG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
|
@@ -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
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-61c6e031"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -6,7 +6,7 @@ import z from "../../../components/DataTable/DataTableCheckbox.vue.js";
|
|
|
6
6
|
import D from "../../../components/DataTable/DataTableRow.vue.js";
|
|
7
7
|
import { ScalarButton as H, ScalarIcon as A } from "@scalar/components";
|
|
8
8
|
import M from "./RequestTableTooltip.vue.js";
|
|
9
|
-
const O = (s) => (T("data-v-
|
|
9
|
+
const O = (s) => (T("data-v-61c6e031"), s = s(), N(), s), j = { class: "text-c-2 max-w-[100%] overflow-hidden filemask flex items-end justify-end" }, K = ["onClick"], L = /* @__PURE__ */ O(() => /* @__PURE__ */ p("span", null, "File", -1)), ee = /* @__PURE__ */ F({
|
|
10
10
|
__name: "RequestTable",
|
|
11
11
|
props: {
|
|
12
12
|
items: {},
|