@scalar/api-client 2.1.25 → 2.1.27
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 +26 -0
- package/dist/components/CommandPalette/CommandPaletteImport.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/CommandPaletteImport.vue.js +150 -90
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +4 -4
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +42 -42
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +7 -9
- package/dist/layouts/App/create-api-client-app.d.ts +77 -20
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/App/create-api-client-app.js +14 -12
- package/dist/layouts/Modal/create-api-client-modal.d.ts +154 -40
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.js +23 -26
- package/dist/layouts/Web/create-api-client-web.d.ts +77 -20
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.js +12 -10
- package/dist/libs/create-client.d.ts +77 -20
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/create-client.js +60 -58
- package/dist/store/collections.d.ts +34 -4
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts +43 -4
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/import-spec.js +60 -36
- package/dist/store/requests.d.ts +4 -1
- package/dist/store/requests.d.ts.map +1 -1
- package/dist/store/requests.js +76 -76
- package/dist/store/security-schemes.d.ts +2 -2
- package/dist/store/security-schemes.d.ts.map +1 -1
- package/dist/store/security-schemes.js +35 -37
- package/dist/store/servers.d.ts +10 -10
- package/dist/store/servers.d.ts.map +1 -1
- package/dist/store/store.d.ts +154 -40
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +74 -72
- package/dist/store/workspace.d.ts.map +1 -1
- package/dist/store/workspace.js +23 -18
- package/dist/style.css +1 -1
- package/dist/views/Request/Request.vue.d.ts.map +1 -1
- package/dist/views/Request/Request.vue.js +1 -1
- package/dist/views/Request/Request.vue2.js +39 -38
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +12 -12
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +4 -4
- package/dist/views/Request/RequestSidebar.vue2.js +107 -102
- package/dist/views/Request/RequestSidebarItem.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +165 -135
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebarItemMenu.vue.js +4 -4
- package/dist/views/Request/RequestSidebarItemMenu.vue2.js +96 -71
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts +9 -0
- package/dist/views/Request/hooks/useOpenApiWatcher.d.ts.map +1 -0
- package/dist/views/Request/hooks/useOpenApiWatcher.js +86 -0
- package/dist/views/Request/libs/live-sync.d.ts +59 -0
- package/dist/views/Request/libs/live-sync.d.ts.map +1 -0
- package/dist/views/Request/libs/live-sync.js +289 -0
- package/dist/views/Request/types/sidebar-item.d.ts +2 -0
- package/dist/views/Request/types/sidebar-item.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue2.js +15 -45
- package/dist/views/Settings/SettingsGeneral.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneral.vue.js +135 -102
- package/dist/views/Settings/SettingsGeneralMode.vue.d.ts.map +1 -1
- package/dist/views/Settings/SettingsGeneralMode.vue.js +76 -68
- package/package.json +8 -6
|
@@ -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":";;cA8lB8B,MAAM;aAAO,MAAM;;;;cAAnB,MAAM;aAAO,MAAM;;;AANjD,wBAQG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Request.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-e56f92be"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -8,49 +8,50 @@ import se from "./RequestSection/RequestSection.vue.js";
|
|
|
8
8
|
/* empty css */
|
|
9
9
|
import ue from "./RequestSubpageHeader.vue.js";
|
|
10
10
|
import le from "./ResponseSection/ResponseSection.vue.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import de from "
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
|
|
11
|
+
import { useOpenApiWatcher as ne } from "./hooks/useOpenApiWatcher.js";
|
|
12
|
+
import { safeJSON as ie } from "@scalar/object-utils/parse";
|
|
13
|
+
import { useToasts as me } from "@scalar/use-toasts";
|
|
14
|
+
import { useMediaQuery as ve } from "@vueuse/core";
|
|
15
|
+
import { useRouter as de } from "vue-router";
|
|
16
|
+
import ce from "./RequestSidebar.vue.js";
|
|
17
|
+
import { ERRORS as pe } from "../../libs/errors.js";
|
|
18
|
+
import { useWorkspace as fe } from "../../store/store.js";
|
|
19
|
+
const Ue = /* @__PURE__ */ z({
|
|
19
20
|
__name: "Request",
|
|
20
21
|
emits: ["newTab"],
|
|
21
|
-
setup(
|
|
22
|
+
setup(Re) {
|
|
22
23
|
var O;
|
|
23
|
-
const I =
|
|
24
|
+
const I = fe(), { toast: b } = me(), {
|
|
24
25
|
activeCollection: x,
|
|
25
26
|
activeExample: d,
|
|
26
27
|
activeEnvironment: M,
|
|
27
|
-
activeRequest:
|
|
28
|
+
activeRequest: h,
|
|
28
29
|
activeWorkspace: a,
|
|
29
30
|
activeServer: T,
|
|
30
31
|
cookies: U,
|
|
31
32
|
modalState: l,
|
|
32
|
-
requestHistory:
|
|
33
|
+
requestHistory: S,
|
|
33
34
|
securitySchemes: $,
|
|
34
|
-
requestMutators:
|
|
35
|
-
serverMutators:
|
|
36
|
-
servers:
|
|
35
|
+
requestMutators: A,
|
|
36
|
+
serverMutators: H,
|
|
37
|
+
servers: L,
|
|
37
38
|
events: c
|
|
38
|
-
} = I, u = y(!((O = a.value) != null && O.isReadOnly)), k = y(), e = y(), q = y(""),
|
|
39
|
-
() =>
|
|
39
|
+
} = I, u = y(!((O = a.value) != null && O.isReadOnly)), k = y(), e = y(), q = y(""), _ = de(), W = J(
|
|
40
|
+
() => S.findLast((o) => {
|
|
40
41
|
var t;
|
|
41
42
|
return o.request.uid === ((t = d.value) == null ? void 0 : t.uid);
|
|
42
43
|
})
|
|
43
|
-
),
|
|
44
|
-
G(
|
|
44
|
+
), j = ve("(max-width: 800px)");
|
|
45
|
+
G(j, (o) => u.value = !o);
|
|
45
46
|
const E = async () => {
|
|
46
47
|
var f;
|
|
47
|
-
if (!
|
|
48
|
+
if (!h.value || !d.value || !x.value)
|
|
48
49
|
return;
|
|
49
|
-
const o =
|
|
50
|
+
const o = ie.parse(((f = M.value) == null ? void 0 : f.value) || "{}");
|
|
50
51
|
o.error && console.error("INVALID ENVIRONMENT!");
|
|
51
52
|
const t = o.error || typeof o.data != "object" ? {} : o.data ?? {}, r = a.value.cookies.map((R) => U[R]), [n, i] = ae({
|
|
52
53
|
auth: x.value.auth,
|
|
53
|
-
request:
|
|
54
|
+
request: h.value,
|
|
54
55
|
example: d.value,
|
|
55
56
|
proxy: a.value.proxyUrl ?? "",
|
|
56
57
|
environment: t,
|
|
@@ -65,30 +66,30 @@ const Me = /* @__PURE__ */ z({
|
|
|
65
66
|
}
|
|
66
67
|
k.value = i.controller;
|
|
67
68
|
const [m, p] = await i.sendRequest();
|
|
68
|
-
m ? b(m.message, "error") :
|
|
69
|
-
},
|
|
69
|
+
m ? b(m.message, "error") : S.push(p);
|
|
70
|
+
}, D = async () => {
|
|
70
71
|
var o;
|
|
71
|
-
return (o = k.value) == null ? void 0 : o.abort(
|
|
72
|
+
return (o = k.value) == null ? void 0 : o.abort(pe.REQUEST_ABORTED);
|
|
72
73
|
};
|
|
73
74
|
K(() => {
|
|
74
|
-
c.executeRequest.on(E), c.cancelRequest.on(
|
|
75
|
-
}), P(() => c.executeRequest.off(E));
|
|
76
|
-
function
|
|
75
|
+
c.executeRequest.on(E), c.cancelRequest.on(D);
|
|
76
|
+
}), ne(), P(() => c.executeRequest.off(E));
|
|
77
|
+
function F({ requestName: o }) {
|
|
77
78
|
var r, n, i, m;
|
|
78
79
|
if (!e.value) return;
|
|
79
80
|
if (e.value.servers) {
|
|
80
|
-
const p = Object.values(
|
|
81
|
+
const p = Object.values(L).find(
|
|
81
82
|
(f) => {
|
|
82
83
|
var R, C;
|
|
83
84
|
return f.url === ((C = (R = e == null ? void 0 : e.value) == null ? void 0 : R.servers) == null ? void 0 : C[0]);
|
|
84
85
|
}
|
|
85
86
|
);
|
|
86
|
-
p ? q.value = p.uid : q.value =
|
|
87
|
+
p ? q.value = p.uid : q.value = H.add(
|
|
87
88
|
{ url: e.value.servers[0] },
|
|
88
89
|
a.value.collections[0]
|
|
89
90
|
).uid;
|
|
90
91
|
}
|
|
91
|
-
const t =
|
|
92
|
+
const t = A.add(
|
|
92
93
|
{
|
|
93
94
|
summary: o,
|
|
94
95
|
path: (r = e == null ? void 0 : e.value) == null ? void 0 : r.path,
|
|
@@ -99,11 +100,11 @@ const Me = /* @__PURE__ */ z({
|
|
|
99
100
|
},
|
|
100
101
|
a.value.collections[0]
|
|
101
102
|
);
|
|
102
|
-
t &&
|
|
103
|
+
t && _.push(
|
|
103
104
|
`/workspace/${a.value.uid}/request/${t.uid}`
|
|
104
105
|
), l.hide();
|
|
105
106
|
}
|
|
106
|
-
function
|
|
107
|
+
function Q(o) {
|
|
107
108
|
e.value = re(o), l.show();
|
|
108
109
|
}
|
|
109
110
|
return (o, t) => (w(), X(Y, null, [
|
|
@@ -117,11 +118,11 @@ const Me = /* @__PURE__ */ z({
|
|
|
117
118
|
"onUpdate:modelValue": t[0] || (t[0] = (r) => u.value = r),
|
|
118
119
|
isReadonly: s(a).isReadOnly,
|
|
119
120
|
onHideModal: t[1] || (t[1] = () => s(l).hide()),
|
|
120
|
-
onImportCurl:
|
|
121
|
+
onImportCurl: Q
|
|
121
122
|
}, null, 8, ["modelValue", "isReadonly"]),
|
|
122
123
|
v(te, null, {
|
|
123
124
|
default: V(() => [
|
|
124
|
-
v(
|
|
125
|
+
v(ce, {
|
|
125
126
|
isReadonly: s(a).isReadOnly,
|
|
126
127
|
showSidebar: u.value,
|
|
127
128
|
onNewTab: t[2] || (t[2] = (r) => o.$emit("newTab", r)),
|
|
@@ -136,7 +137,7 @@ const Me = /* @__PURE__ */ z({
|
|
|
136
137
|
return [
|
|
137
138
|
v(se),
|
|
138
139
|
v(le, {
|
|
139
|
-
response: (r =
|
|
140
|
+
response: (r = W.value) == null ? void 0 : r.response
|
|
140
141
|
}, null, 8, ["response"])
|
|
141
142
|
];
|
|
142
143
|
}),
|
|
@@ -151,11 +152,11 @@ const Me = /* @__PURE__ */ z({
|
|
|
151
152
|
parsedCurl: e.value,
|
|
152
153
|
state: s(l),
|
|
153
154
|
onClose: t[4] || (t[4] = (r) => s(l).hide()),
|
|
154
|
-
onImportCurl:
|
|
155
|
+
onImportCurl: F
|
|
155
156
|
}, null, 8, ["parsedCurl", "state"])) : g("", !0)
|
|
156
157
|
], 64));
|
|
157
158
|
}
|
|
158
159
|
});
|
|
159
160
|
export {
|
|
160
|
-
|
|
161
|
+
Ue as default
|
|
161
162
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteRequestAuthModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DeleteRequestAuthModal.vue.d.ts","sourceRoot":"","sources":["../../../../../src/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue"],"names":[],"mappings":";WAsDS;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAE;YACpD;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;;;;WAD1C;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,IAAI,CAAA;KAAE;YACpD;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;;;;AAmKnD,wBASG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ScalarModal as
|
|
3
|
-
import { useWorkspace as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as b, openBlock as y, createBlock as S, unref as s, withCtx as n, createElementVNode as r, toDisplayString as i, createVNode as m, createTextVNode as u } from "vue";
|
|
2
|
+
import { ScalarModal as _, ScalarButton as d } from "@scalar/components";
|
|
3
|
+
import { useWorkspace as g } from "../../../../store/store.js";
|
|
4
|
+
const k = { class: "mb-4 leading-normal text-c-2 text-sm" }, C = { class: "flex justify-between gap-2" }, B = /* @__PURE__ */ b({
|
|
5
5
|
__name: "DeleteRequestAuthModal",
|
|
6
6
|
props: {
|
|
7
7
|
state: {},
|
|
@@ -9,11 +9,11 @@ const C = { class: "mb-4 leading-normal text-c-2 text-sm" }, w = { class: "flex
|
|
|
9
9
|
},
|
|
10
10
|
emits: ["close"],
|
|
11
11
|
setup(p, { emit: f }) {
|
|
12
|
-
const
|
|
12
|
+
const l = p, c = f, { securitySchemeMutators: h } = g(), x = () => {
|
|
13
13
|
var e;
|
|
14
|
-
(e =
|
|
14
|
+
(e = l.scheme) != null && e.id && h.delete(l.scheme.id), c("close");
|
|
15
15
|
};
|
|
16
|
-
return (e, t) => (
|
|
16
|
+
return (e, t) => (y(), S(s(_), {
|
|
17
17
|
size: "xxs",
|
|
18
18
|
state: e.state,
|
|
19
19
|
title: "Delete Security Scheme"
|
|
@@ -21,13 +21,13 @@ const C = { class: "mb-4 leading-normal text-c-2 text-sm" }, w = { class: "flex
|
|
|
21
21
|
default: n(() => {
|
|
22
22
|
var a;
|
|
23
23
|
return [
|
|
24
|
-
r("p",
|
|
25
|
-
r("div",
|
|
24
|
+
r("p", k, " This cannot be undone. You’re about to delete the " + i((a = e.scheme) == null ? void 0 : a.label) + " security scheme from the collection. ", 1),
|
|
25
|
+
r("div", C, [
|
|
26
26
|
m(s(d), {
|
|
27
27
|
class: "gap-1.5 px-3 h-8 shadow-none focus:outline-none flex items-center cursor-pointer",
|
|
28
28
|
type: "button",
|
|
29
29
|
variant: "outlined",
|
|
30
|
-
onClick: t[0] || (t[0] = (o) =>
|
|
30
|
+
onClick: t[0] || (t[0] = (o) => c("close"))
|
|
31
31
|
}, {
|
|
32
32
|
default: n(() => t[1] || (t[1] = [
|
|
33
33
|
u(" Cancel ")
|
|
@@ -37,7 +37,7 @@ const C = { class: "mb-4 leading-normal text-c-2 text-sm" }, w = { class: "flex
|
|
|
37
37
|
m(s(d), {
|
|
38
38
|
class: "gap-1.5 px-3 h-8 shadow-none focus:outline-none flex items-center cursor-pointer",
|
|
39
39
|
type: "submit",
|
|
40
|
-
onClick:
|
|
40
|
+
onClick: x
|
|
41
41
|
}, {
|
|
42
42
|
default: n(() => {
|
|
43
43
|
var o;
|
|
@@ -55,5 +55,5 @@ const C = { class: "mb-4 leading-normal text-c-2 text-sm" }, w = { class: "flex
|
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
export {
|
|
58
|
-
|
|
58
|
+
B as default
|
|
59
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RequestSidebar.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebar.vue"],"names":[],"mappings":";iBA6Ve,OAAO;gBACR,OAAO;;;cAynBkB,MAAM;aAAO,MAAM;;;;iBA1nB3C,OAAO;gBACR,OAAO;;;cAynBkB,MAAM;aAAO,MAAM;;;;AAR1D,wBAUG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./RequestSidebar.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-7cb3d69f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as Q, reactive as X, watch as Y, onMounted as Z, onBeforeUnmount as _, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as ee, createVNode as u, unref as t, normalizeClass as b, createSlots as te, withCtx as i, createElementVNode as n, isRef as oe, withKeys as v, withModifiers as p, createBlock as l, renderList as x, createTextVNode as D, toDisplayString as se, createCommentVNode as F, vShow as re } from "vue";
|
|
2
|
+
import ae from "../../assets/rabbit.ascii.js";
|
|
3
|
+
import ne from "../../assets/rabbitjump.ascii.js";
|
|
4
4
|
import ie from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import { useSearch as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { dragHandlerFactory as
|
|
10
|
-
import { ScalarSearchInput as
|
|
11
|
-
import { LibraryIcon as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { useSidebar as
|
|
15
|
-
import { useWorkspace as
|
|
16
|
-
const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" },
|
|
5
|
+
import $ from "../../components/ScalarAsciiArt.vue.js";
|
|
6
|
+
import { useSearch as le } from "../../components/Search/useSearch.js";
|
|
7
|
+
import de from "../../components/Sidebar/SidebarButton.vue.js";
|
|
8
|
+
import ue from "./RequestSidebarItemMenu.vue.js";
|
|
9
|
+
import { dragHandlerFactory as me } from "./handle-drag.js";
|
|
10
|
+
import { ScalarSearchInput as pe, ScalarSearchResultList as ce, ScalarSearchResultItem as fe, ScalarIcon as V } from "@scalar/components";
|
|
11
|
+
import { LibraryIcon as be } from "@scalar/icons";
|
|
12
|
+
import he from "./RequestSidebarItem.vue.js";
|
|
13
|
+
import Se from "../../components/Sidebar/Sidebar.vue.js";
|
|
14
|
+
import { useSidebar as ve } from "../../hooks/useSidebar.js";
|
|
15
|
+
import { useWorkspace as ge } from "../../store/store.js";
|
|
16
|
+
const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, we = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, ke = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, We = /* @__PURE__ */ Q({
|
|
17
17
|
__name: "RequestSidebar",
|
|
18
18
|
props: {
|
|
19
19
|
showSidebar: { type: Boolean },
|
|
20
20
|
isReadonly: { type: Boolean }
|
|
21
21
|
},
|
|
22
22
|
emits: ["update:showSidebar", "newTab"],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
activeWorkspaceCollections:
|
|
26
|
-
activeRequest:
|
|
27
|
-
activeWorkspaceRequests:
|
|
28
|
-
findRequestParents:
|
|
29
|
-
isReadOnly:
|
|
23
|
+
setup(q, { emit: P }) {
|
|
24
|
+
const T = q, g = P, R = ge(), {
|
|
25
|
+
activeWorkspaceCollections: B,
|
|
26
|
+
activeRequest: E,
|
|
27
|
+
activeWorkspaceRequests: M,
|
|
28
|
+
findRequestParents: O,
|
|
29
|
+
isReadOnly: W,
|
|
30
30
|
events: c
|
|
31
|
-
} =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
(
|
|
35
|
-
|
|
36
|
-
(e) =>
|
|
31
|
+
} = R, { handleDragEnd: K, isDroppable: N } = me(R), { collapsedSidebarFolders: U, setCollapsedSidebarFolder: z } = ve(), m = X({ open: !1 });
|
|
32
|
+
Y(
|
|
33
|
+
E,
|
|
34
|
+
(o) => {
|
|
35
|
+
o && O(o).forEach(
|
|
36
|
+
(e) => z(e, !0)
|
|
37
37
|
);
|
|
38
38
|
},
|
|
39
39
|
{ immediate: !0 }
|
|
@@ -41,111 +41,115 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, ke = {
|
|
|
41
41
|
const {
|
|
42
42
|
searchText: f,
|
|
43
43
|
searchResultsWithPlaceholderResults: w,
|
|
44
|
-
selectedSearchResult:
|
|
45
|
-
onSearchResultClick:
|
|
46
|
-
fuseSearch:
|
|
47
|
-
searchInputRef:
|
|
44
|
+
selectedSearchResult: k,
|
|
45
|
+
onSearchResultClick: A,
|
|
46
|
+
fuseSearch: L,
|
|
47
|
+
searchInputRef: y,
|
|
48
48
|
searchResultRefs: H,
|
|
49
|
-
navigateSearchResults:
|
|
49
|
+
navigateSearchResults: C,
|
|
50
50
|
selectSearchResult: j
|
|
51
|
-
} =
|
|
51
|
+
} = le(), I = (o) => {
|
|
52
52
|
var e;
|
|
53
|
-
|
|
53
|
+
o && (o.toggleSidebar && g("update:showSidebar", T.showSidebar), o.openCommandPalette && (o.openCommandPalette.preventDefault(), c.commandPalette.emit()), o.focusRequestSearch && ((e = y.value) == null || e.focus()));
|
|
54
54
|
};
|
|
55
|
-
|
|
56
|
-
c.hotKeys.off(
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
Z(() => c.hotKeys.on(I)), _(() => {
|
|
56
|
+
c.hotKeys.off(I);
|
|
57
|
+
});
|
|
58
|
+
const G = (o) => {
|
|
59
|
+
o != null && o.documentUrl && (o.watchForChanges = !o.watchForChanges);
|
|
60
|
+
};
|
|
61
|
+
return (o, e) => (a(), h(S, null, [
|
|
62
|
+
ee(u(t(Se), {
|
|
63
|
+
class: b([o.showSidebar ? "sidebar-active-width" : ""]),
|
|
64
|
+
showSidebar: o.showSidebar,
|
|
65
|
+
"onUpdate:showSidebar": e[8] || (e[8] = (s) => o.$emit("update:showSidebar", s))
|
|
66
|
+
}, te({
|
|
67
|
+
content: i(() => [
|
|
68
|
+
n("div", Re, [
|
|
69
|
+
u(t(pe), {
|
|
66
70
|
ref_key: "searchInputRef",
|
|
67
|
-
ref:
|
|
71
|
+
ref: y,
|
|
68
72
|
modelValue: t(f),
|
|
69
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
73
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => oe(f) ? f.value = s : null),
|
|
70
74
|
sidebar: "",
|
|
71
|
-
onInput: t(
|
|
75
|
+
onInput: t(L),
|
|
72
76
|
onKeydown: [
|
|
73
|
-
e[1] || (e[1] = v(p((
|
|
74
|
-
e[2] || (e[2] = v(p((
|
|
75
|
-
e[3] || (e[3] = v(p((
|
|
77
|
+
e[1] || (e[1] = v(p((s) => t(C)("down"), ["stop"]), ["down"])),
|
|
78
|
+
e[2] || (e[2] = v(p((s) => t(j)(), ["stop"]), ["enter"])),
|
|
79
|
+
e[3] || (e[3] = v(p((s) => t(C)("up"), ["stop"]), ["up"]))
|
|
76
80
|
]
|
|
77
81
|
}, null, 8, ["modelValue", "onInput"])
|
|
78
82
|
]),
|
|
79
|
-
|
|
83
|
+
n("div", {
|
|
80
84
|
class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
|
|
81
|
-
"pb-14": !
|
|
85
|
+
"pb-14": !o.isReadonly
|
|
82
86
|
}]),
|
|
83
87
|
onDragenter: e[6] || (e[6] = p(() => {
|
|
84
88
|
}, ["prevent"])),
|
|
85
89
|
onDragover: e[7] || (e[7] = p(() => {
|
|
86
90
|
}, ["prevent"]))
|
|
87
91
|
}, [
|
|
88
|
-
t(f) ? (a(), l(t(
|
|
92
|
+
t(f) ? (a(), l(t(ce), {
|
|
89
93
|
key: 0,
|
|
90
94
|
class: "gap-px custom-scroll",
|
|
91
95
|
noResults: !t(w).length
|
|
92
96
|
}, {
|
|
93
|
-
default:
|
|
94
|
-
(a(!0), h(S, null,
|
|
95
|
-
id: `#search-input-${
|
|
96
|
-
key:
|
|
97
|
+
default: i(() => [
|
|
98
|
+
(a(!0), h(S, null, x(t(w), (s, d) => (a(), l(t(fe), {
|
|
99
|
+
id: `#search-input-${s.item.id}`,
|
|
100
|
+
key: s.refIndex,
|
|
97
101
|
ref_for: !0,
|
|
98
102
|
ref: (r) => t(H)[d] = r,
|
|
99
|
-
active: t(
|
|
103
|
+
active: t(k) === d,
|
|
100
104
|
class: "px-2",
|
|
101
|
-
onClick: (r) => t(
|
|
102
|
-
onFocus: (r) =>
|
|
105
|
+
onClick: (r) => t(A)(s),
|
|
106
|
+
onFocus: (r) => k.value = d
|
|
103
107
|
}, {
|
|
104
|
-
addon:
|
|
108
|
+
addon: i(() => [
|
|
105
109
|
u(ie, {
|
|
106
110
|
class: "font-bold",
|
|
107
|
-
method:
|
|
111
|
+
method: s.item.httpVerb ?? "get"
|
|
108
112
|
}, null, 8, ["method"])
|
|
109
113
|
]),
|
|
110
|
-
default:
|
|
111
|
-
D(
|
|
114
|
+
default: i(() => [
|
|
115
|
+
D(se(s.item.title) + " ", 1)
|
|
112
116
|
]),
|
|
113
117
|
_: 2
|
|
114
118
|
}, 1032, ["id", "active", "onClick", "onFocus"]))), 128))
|
|
115
119
|
]),
|
|
116
120
|
_: 1
|
|
117
|
-
}, 8, ["noResults"])) : (a(!0), h(S, { key: 1 },
|
|
121
|
+
}, 8, ["noResults"])) : (a(!0), h(S, { key: 1 }, x(t(B), (s) => {
|
|
118
122
|
var d;
|
|
119
|
-
return a(), l(
|
|
120
|
-
key:
|
|
121
|
-
isDraggable: !
|
|
122
|
-
isDroppable: t(
|
|
123
|
+
return a(), l(he, {
|
|
124
|
+
key: s.uid,
|
|
125
|
+
isDraggable: !o.isReadonly && ((d = s.info) == null ? void 0 : d.title) !== "Drafts",
|
|
126
|
+
isDroppable: t(N),
|
|
123
127
|
menuItem: m,
|
|
124
128
|
parentUids: [],
|
|
125
|
-
uid:
|
|
126
|
-
onNewTab: e[4] || (e[4] = (r,
|
|
127
|
-
onOnDragEnd: t(
|
|
129
|
+
uid: s.uid,
|
|
130
|
+
onNewTab: e[4] || (e[4] = (r, J) => g("newTab", { name: r, uid: J })),
|
|
131
|
+
onOnDragEnd: t(K),
|
|
128
132
|
onOpenMenu: e[5] || (e[5] = (r) => Object.assign(m, r))
|
|
129
133
|
}, {
|
|
130
|
-
leftIcon:
|
|
134
|
+
leftIcon: i(() => {
|
|
131
135
|
var r;
|
|
132
136
|
return [
|
|
133
|
-
((r =
|
|
137
|
+
((r = s.info) == null ? void 0 : r.title) === "Drafts" ? (a(), l(t(V), {
|
|
134
138
|
key: 0,
|
|
135
139
|
class: "text-sidebar-c-2 group-hover:hidden",
|
|
136
140
|
icon: "Scribble",
|
|
137
141
|
thickness: "2.25"
|
|
138
|
-
})) : (a(), l(t(
|
|
142
|
+
})) : (a(), l(t(be), {
|
|
139
143
|
key: 1,
|
|
140
144
|
class: "text-sidebar-c-2 size-3.5 stroke-[2.25] group-hover:hidden",
|
|
141
|
-
src:
|
|
145
|
+
src: s["x-scalar-icon"] || "interface-content-folder"
|
|
142
146
|
}, null, 8, ["src"])),
|
|
143
|
-
|
|
147
|
+
n("div", {
|
|
144
148
|
class: b({
|
|
145
|
-
"rotate-90": t(
|
|
149
|
+
"rotate-90": t(U)[s.uid]
|
|
146
150
|
})
|
|
147
151
|
}, [
|
|
148
|
-
u(t(
|
|
152
|
+
u(t(V), {
|
|
149
153
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
150
154
|
icon: "ChevronRight",
|
|
151
155
|
size: "sm",
|
|
@@ -159,33 +163,33 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, ke = {
|
|
|
159
163
|
}), 128))
|
|
160
164
|
], 34)
|
|
161
165
|
]),
|
|
162
|
-
button:
|
|
163
|
-
|
|
166
|
+
button: i(() => [
|
|
167
|
+
n("div", {
|
|
164
168
|
class: b({
|
|
165
|
-
"empty-sidebar-item": t(
|
|
169
|
+
"empty-sidebar-item": t(M).length <= 1
|
|
166
170
|
})
|
|
167
171
|
}, [
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
u(
|
|
171
|
-
art: t(
|
|
172
|
+
n("div", we, [
|
|
173
|
+
n("div", ke, [
|
|
174
|
+
u($, {
|
|
175
|
+
art: t(ae),
|
|
172
176
|
class: "font-bold rabbitsit"
|
|
173
177
|
}, null, 8, ["art"]),
|
|
174
|
-
u(
|
|
175
|
-
art: t(
|
|
178
|
+
u($, {
|
|
179
|
+
art: t(ne),
|
|
176
180
|
class: "font-bold absolute top-0 left-0 rabbitjump"
|
|
177
181
|
}, null, 8, ["art"])
|
|
178
182
|
]),
|
|
179
|
-
e[10] || (e[10] =
|
|
180
|
-
|
|
181
|
-
|
|
183
|
+
e[10] || (e[10] = n("div", { class: "text-center text-balance text-sm mb-2 mt-2" }, [
|
|
184
|
+
n("b", { class: "font-medium" }, "Let's Get Started"),
|
|
185
|
+
n("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
|
|
182
186
|
], -1))
|
|
183
187
|
]),
|
|
184
|
-
|
|
188
|
+
o.isReadonly ? F("", !0) : (a(), l(de, {
|
|
185
189
|
key: 0,
|
|
186
190
|
click: t(c).commandPalette.emit
|
|
187
191
|
}, {
|
|
188
|
-
title:
|
|
192
|
+
title: i(() => e[11] || (e[11] = [
|
|
189
193
|
D("Add Item")
|
|
190
194
|
])),
|
|
191
195
|
_: 1
|
|
@@ -194,22 +198,23 @@ const Re = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, ke = {
|
|
|
194
198
|
]),
|
|
195
199
|
_: 2
|
|
196
200
|
}, [
|
|
197
|
-
|
|
201
|
+
o.isReadonly ? void 0 : {
|
|
198
202
|
name: "header",
|
|
199
|
-
fn:
|
|
203
|
+
fn: i(() => []),
|
|
200
204
|
key: "0"
|
|
201
205
|
}
|
|
202
206
|
]), 1032, ["class", "showSidebar"]), [
|
|
203
|
-
[
|
|
207
|
+
[re, o.showSidebar]
|
|
204
208
|
]),
|
|
205
|
-
!t(
|
|
209
|
+
!t(W) && m ? (a(), l(ue, {
|
|
206
210
|
key: 0,
|
|
207
211
|
menuItem: m,
|
|
208
|
-
onCloseMenu: e[9] || (e[9] = (
|
|
209
|
-
|
|
212
|
+
onCloseMenu: e[9] || (e[9] = (s) => m.open = !1),
|
|
213
|
+
onToggleWatchForChanges: G
|
|
214
|
+
}, null, 8, ["menuItem"])) : F("", !0)
|
|
210
215
|
], 64));
|
|
211
216
|
}
|
|
212
217
|
});
|
|
213
218
|
export {
|
|
214
|
-
|
|
219
|
+
We as default
|
|
215
220
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestSidebarItem.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSidebarItem.vue"],"names":[],"mappings":"AA8dA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEzE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAyP1B,iBAAS,cAAc;gBAlNT,IAAI;;gBAAJ,IAAI;EAo1BjB;AACD,QAAA,MAAM,eAAe;IAp3BjB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,oEAAoE;gBACxD,MAAM,EAAE;IACpB,0DAA0D;SACrD,MAAM;IACX,2CAA2C;cACjC,eAAe;;;;;;IAjBzB;;;;OAIG;kBACW,OAAO;IACrB;;;;OAIG;kBACW,cAAc,CAAC,aAAa,CAAC;IAC3C,oEAAoE;gBACxD,MAAM,EAAE;IACpB,0DAA0D;SACrD,MAAM;IACX,2CAA2C;cACjC,eAAe;;;;;;;iBAZX,OAAO;6EA23BvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAexG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -2,7 +2,7 @@ import t from "./RequestSidebarItem.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
5
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-0eb4db04"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|