@scalar/api-client 2.1.22 → 2.1.23
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 +25 -0
- package/README.md +22 -0
- package/dist/components/CommandPalette/TheCommandPalette.vue.d.ts.map +1 -1
- package/dist/components/CommandPalette/TheCommandPalette.vue.js +2 -2
- package/dist/components/CommandPalette/TheCommandPalette.vue2.js +163 -154
- package/dist/components/DataTable/DataTableCell.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableCell.vue.js +5 -5
- package/dist/components/DataTable/DataTableText.vue.d.ts +12 -3
- package/dist/components/DataTable/DataTableText.vue.d.ts.map +1 -1
- package/dist/components/DataTable/DataTableText.vue.js +13 -9
- package/dist/components/ImportCollection/ImportCollectionModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportCollectionModal.vue.js +84 -63
- package/dist/components/ImportCollection/ImportNowButton.vue.d.ts.map +1 -1
- package/dist/components/ImportCollection/ImportNowButton.vue.js +36 -40
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts +3 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue.d.ts.map +1 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue.js +125 -0
- package/dist/components/ImportCollection/WorkspaceSelector.vue2.js +4 -0
- package/dist/components/ImportCurl/ImportCurlModal.vue.d.ts.map +1 -1
- package/dist/components/ImportCurl/ImportCurlModal.vue.js +2 -2
- package/dist/components/ImportCurl/ImportCurlModal.vue2.js +28 -27
- package/dist/components/SideNav/SideHelp.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue.d.ts.map +1 -1
- package/dist/components/SideNav/SideNav.vue.js +1 -1
- package/dist/components/SideNav/SideNav.vue2.js +8 -8
- package/dist/data/httpHeaders.d.ts +6 -0
- package/dist/data/httpHeaders.d.ts.map +1 -0
- package/dist/data/httpHeaders.js +537 -0
- package/dist/layouts/App/create-api-client-app.d.ts +8 -8
- package/dist/layouts/App/create-api-client-app.d.ts.map +1 -1
- package/dist/layouts/Modal/create-api-client-modal.d.ts +16 -16
- package/dist/layouts/Modal/create-api-client-modal.d.ts.map +1 -1
- package/dist/layouts/Web/create-api-client-web.d.ts +8 -8
- package/dist/layouts/Web/create-api-client-web.d.ts.map +1 -1
- package/dist/libs/create-client.d.ts +8 -8
- package/dist/libs/create-client.d.ts.map +1 -1
- package/dist/libs/importers/curl.d.ts +25 -1
- package/dist/libs/importers/curl.d.ts.map +1 -1
- package/dist/libs/importers/curl.js +40 -38
- package/dist/libs/parse-curl.d.ts +3 -4
- package/dist/libs/parse-curl.d.ts.map +1 -1
- package/dist/libs/parse-curl.js +58 -55
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/import-spec.d.ts.map +1 -1
- package/dist/store/request-example.d.ts +4 -4
- package/dist/store/requests.d.ts +4 -4
- package/dist/store/store.d.ts +16 -16
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/tags.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/views/Cookies/Cookies.vue.d.ts.map +1 -1
- package/dist/views/Cookies/Cookies.vue2.js +21 -21
- package/dist/views/Request/RequestSidebar.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSidebar.vue.js +1 -1
- package/dist/views/Request/RequestSidebar.vue2.js +35 -34
- package/dist/views/Request/RequestSidebarItem.vue.js +1 -1
- package/dist/views/Request/RequestSidebarItem.vue2.js +43 -43
- package/dist/views/Request/RequestSubpageHeader.vue.d.ts.map +1 -1
- package/dist/views/Request/RequestSubpageHeader.vue.js +4 -4
- package/dist/views/Request/RequestSubpageHeader.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.d.ts.map +1 -1
- package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +43 -22
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Cookies.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Cookies/Cookies.vue"],"names":[],"mappings":";AA0gBA,wBAKG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as L, computed as V, onMounted as D, openBlock as l, createBlock as y, withCtx as a, createVNode as s, unref as n, createElementVNode as f, createElementBlock as m, Fragment as _, renderList as v, normalizeClass as w, createTextVNode as x, toDisplayString as S, withDirectives as O, vShow as $ } from "vue";
|
|
2
|
+
import M from "../../components/Sidebar/SidebarButton.vue.js";
|
|
3
|
+
import N from "../../components/Sidebar/SidebarList.vue.js";
|
|
4
4
|
import B from "../../components/Sidebar/SidebarListElement.vue.js";
|
|
5
5
|
import F from "../../components/ViewLayout/ViewLayout.vue.js";
|
|
6
6
|
import I from "../../components/ViewLayout/ViewLayoutContent.vue.js";
|
|
@@ -12,7 +12,7 @@ import P from "./CookieRaw.vue.js";
|
|
|
12
12
|
import { useSidebar as T } from "../../hooks/useSidebar.js";
|
|
13
13
|
import { useWorkspace as W } from "../../store/store.js";
|
|
14
14
|
import q from "../../components/Sidebar/Sidebar.vue.js";
|
|
15
|
-
const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-
|
|
15
|
+
const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, Q = ["onClick"], U = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1.75rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, de = /* @__PURE__ */ L({
|
|
16
16
|
__name: "Cookies",
|
|
17
17
|
setup(X) {
|
|
18
18
|
const { cookies: p, cookieMutators: g } = W(), { collapsedSidebarFolders: i, toggleSidebarFolder: k } = T(), b = A(), E = () => {
|
|
@@ -26,7 +26,7 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
|
|
|
26
26
|
sameSite: "None"
|
|
27
27
|
});
|
|
28
28
|
g.add(e), b.push(e.uid);
|
|
29
|
-
},
|
|
29
|
+
}, z = (t) => {
|
|
30
30
|
g.delete(t);
|
|
31
31
|
const e = Object.values(p).filter(
|
|
32
32
|
(o) => o.uid !== t
|
|
@@ -35,13 +35,13 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
|
|
|
35
35
|
const o = e[e.length - 1];
|
|
36
36
|
b.push(o.uid);
|
|
37
37
|
} else e.length === 1 && e[0].uid === "default" && b.push("default");
|
|
38
|
-
}, h =
|
|
38
|
+
}, h = V(() => {
|
|
39
39
|
const t = {};
|
|
40
40
|
return Object.values(p).forEach((e) => {
|
|
41
41
|
e.domain && e.path && (t[e.domain] || (t[e.domain] = {}), t[e.domain][e.path] || (t[e.domain][e.path] = []), t[e.domain][e.path].push(e));
|
|
42
42
|
}), t;
|
|
43
43
|
}), C = (t) => i[t];
|
|
44
|
-
return
|
|
44
|
+
return D(() => {
|
|
45
45
|
const t = Object.keys(h.value), e = Object.entries(h.value).flatMap(
|
|
46
46
|
([o, r]) => Object.keys(r).map((d) => o + d)
|
|
47
47
|
);
|
|
@@ -54,11 +54,11 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
|
|
|
54
54
|
default: a(() => [
|
|
55
55
|
s(n(q), { title: "Cookies" }, {
|
|
56
56
|
content: a(() => [
|
|
57
|
-
|
|
58
|
-
s(
|
|
57
|
+
f("div", G, [
|
|
58
|
+
s(N, null, {
|
|
59
59
|
default: a(() => [
|
|
60
|
-
(l(!0),
|
|
61
|
-
|
|
60
|
+
(l(!0), m(_, null, v(h.value, (o, r) => (l(), m("div", { key: r }, [
|
|
61
|
+
f("button", {
|
|
62
62
|
class: "flex font-medium gap-1.5 items-center px-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
|
|
63
63
|
type: "button",
|
|
64
64
|
onClick: (d) => n(k)(r)
|
|
@@ -71,11 +71,11 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
|
|
|
71
71
|
size: "sm",
|
|
72
72
|
thickness: "2.5"
|
|
73
73
|
}, null, 8, ["class"]),
|
|
74
|
-
|
|
74
|
+
x(" " + S(r), 1)
|
|
75
75
|
], 8, J),
|
|
76
|
-
O(
|
|
77
|
-
(l(!0),
|
|
78
|
-
|
|
76
|
+
O(f("div", K, [
|
|
77
|
+
(l(!0), m(_, null, v(o, (d, c) => (l(), m("div", { key: c }, [
|
|
78
|
+
f("button", {
|
|
79
79
|
class: "flex font-medium gap-1.5 items-center pl-5 pr-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
|
|
80
80
|
type: "button",
|
|
81
81
|
onClick: (u) => n(k)(r + c)
|
|
@@ -88,15 +88,15 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
|
|
|
88
88
|
size: "sm",
|
|
89
89
|
thickness: "2.5"
|
|
90
90
|
}, null, 8, ["class"]),
|
|
91
|
-
|
|
91
|
+
x(" " + S(c), 1)
|
|
92
92
|
], 8, Q),
|
|
93
|
-
O(
|
|
94
|
-
(l(!0),
|
|
93
|
+
O(f("div", U, [
|
|
94
|
+
(l(!0), m(_, null, v(d, (u) => (l(), y(B, {
|
|
95
95
|
key: u.uid,
|
|
96
96
|
class: "cookie text-xs",
|
|
97
97
|
variable: { name: u.name, uid: u.uid },
|
|
98
98
|
warningMessage: "Are you sure you want to delete this cookie?",
|
|
99
|
-
onDelete: (Y) =>
|
|
99
|
+
onDelete: (Y) => z(u.uid)
|
|
100
100
|
}, null, 8, ["variable", "onDelete"]))), 128))
|
|
101
101
|
], 512), [
|
|
102
102
|
[$, C(r + c)]
|
|
@@ -112,9 +112,9 @@ const G = { class: "flex-1" }, J = ["onClick"], K = { class: "before:bg-b-3 befo
|
|
|
112
112
|
])
|
|
113
113
|
]),
|
|
114
114
|
button: a(() => [
|
|
115
|
-
s(
|
|
115
|
+
s(M, { click: E }, {
|
|
116
116
|
title: a(() => e[0] || (e[0] = [
|
|
117
|
-
|
|
117
|
+
x("Add Item")
|
|
118
118
|
])),
|
|
119
119
|
_: 1
|
|
120
120
|
})
|
|
@@ -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":";iBAwVe,OAAO;gBACR,OAAO;;;cAwnBkB,MAAM;aAAO,MAAM;;;;iBAznB3C,OAAO;gBACR,OAAO;;;cAwnBkB,MAAM;aAAO,MAAM;;;;AAR1D,wBAUG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./RequestSidebar.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-0c6b59b7"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as J, reactive as Q, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as _, createVNode as l, unref as t, normalizeClass as b, createSlots as ee, withCtx as n, createElementVNode as i, isRef as te, withKeys as v, withModifiers as p, createBlock as d, renderList as C, createTextVNode as D, toDisplayString as oe, createCommentVNode as $, vShow as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as J, reactive as Q, watch as X, onMounted as Y, onBeforeUnmount as Z, openBlock as a, createElementBlock as h, Fragment as S, withDirectives as _, createVNode as l, unref as t, normalizeClass as b, createSlots as ee, withCtx as n, createElementVNode as i, isRef as te, withKeys as v, withModifiers as p, createBlock as d, renderList as C, createTextVNode as D, toDisplayString as oe, createCommentVNode as $, vShow as se } from "vue";
|
|
2
|
+
import re from "../../assets/rabbit.ascii.js";
|
|
3
3
|
import ae from "../../assets/rabbitjump.ascii.js";
|
|
4
4
|
import ie from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
5
5
|
import V from "../../components/ScalarAsciiArt.vue.js";
|
|
@@ -14,7 +14,7 @@ import he from "../../components/Sidebar/Sidebar.vue.js";
|
|
|
14
14
|
import Se from "./components/WorkspaceDropdown.vue.js";
|
|
15
15
|
import { useSidebar as ve } from "../../hooks/useSidebar.js";
|
|
16
16
|
import { useWorkspace as Re } from "../../store/store.js";
|
|
17
|
-
const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-
|
|
17
|
+
const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-10" }, ke = { class: "empty-sidebar-item-content px-2.5 py-2.5" }, we = { class: "w-[60px] h-[68px] m-auto rabbit-ascii mt-2 relative" }, Te = /* @__PURE__ */ J({
|
|
18
18
|
__name: "RequestSidebar",
|
|
19
19
|
props: {
|
|
20
20
|
showSidebar: { type: Boolean },
|
|
@@ -32,8 +32,8 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
32
32
|
} = y, { handleDragEnd: T, isDroppable: z } = me(y), { collapsedSidebarFolders: A, setCollapsedSidebarFolder: L } = ve(), u = Q({ open: !1 });
|
|
33
33
|
X(
|
|
34
34
|
M,
|
|
35
|
-
(
|
|
36
|
-
|
|
35
|
+
(s) => {
|
|
36
|
+
s && K(s).forEach(
|
|
37
37
|
(e) => L(e, !0)
|
|
38
38
|
);
|
|
39
39
|
},
|
|
@@ -41,25 +41,25 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
41
41
|
);
|
|
42
42
|
const {
|
|
43
43
|
searchText: f,
|
|
44
|
-
searchResultsWithPlaceholderResults:
|
|
45
|
-
selectedSearchResult:
|
|
44
|
+
searchResultsWithPlaceholderResults: k,
|
|
45
|
+
selectedSearchResult: w,
|
|
46
46
|
onSearchResultClick: U,
|
|
47
47
|
fuseSearch: W,
|
|
48
48
|
searchInputRef: g,
|
|
49
49
|
searchResultRefs: H,
|
|
50
50
|
navigateSearchResults: x,
|
|
51
51
|
selectSearchResult: j
|
|
52
|
-
} = ne(), I = (
|
|
52
|
+
} = ne(), I = (s) => {
|
|
53
53
|
var e;
|
|
54
|
-
|
|
54
|
+
s && (s.toggleSidebar && R("update:showSidebar", E.showSidebar), s.openCommandPalette && (s.openCommandPalette.preventDefault(), c.commandPalette.emit()), s.focusRequestSearch && ((e = g.value) == null || e.focus()));
|
|
55
55
|
};
|
|
56
56
|
return Y(() => c.hotKeys.on(I)), Z(() => {
|
|
57
57
|
c.hotKeys.off(I);
|
|
58
|
-
}), (
|
|
58
|
+
}), (s, e) => (a(), h(S, null, [
|
|
59
59
|
_(l(t(he), {
|
|
60
|
-
class: b([
|
|
61
|
-
showSidebar:
|
|
62
|
-
"onUpdate:showSidebar": e[8] || (e[8] = (o) =>
|
|
60
|
+
class: b([s.showSidebar ? "sidebar-active-width" : ""]),
|
|
61
|
+
showSidebar: s.showSidebar,
|
|
62
|
+
"onUpdate:showSidebar": e[8] || (e[8] = (o) => s.$emit("update:showSidebar", o))
|
|
63
63
|
}, ee({
|
|
64
64
|
content: n(() => [
|
|
65
65
|
i("div", ye, [
|
|
@@ -79,7 +79,7 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
79
79
|
]),
|
|
80
80
|
i("div", {
|
|
81
81
|
class: b(["custom-scroll flex flex-1 flex-col overflow-visible px-3 pb-3 pt-0", {
|
|
82
|
-
"pb-14": !
|
|
82
|
+
"pb-14": !s.isReadonly
|
|
83
83
|
}]),
|
|
84
84
|
onDragenter: e[6] || (e[6] = p(() => {
|
|
85
85
|
}, ["prevent"])),
|
|
@@ -89,18 +89,18 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
89
89
|
t(f) ? (a(), d(t(pe), {
|
|
90
90
|
key: 0,
|
|
91
91
|
class: "gap-px custom-scroll",
|
|
92
|
-
noResults: !t(
|
|
92
|
+
noResults: !t(k).length
|
|
93
93
|
}, {
|
|
94
94
|
default: n(() => [
|
|
95
|
-
(a(!0), h(S, null, C(t(
|
|
95
|
+
(a(!0), h(S, null, C(t(k), (o, m) => (a(), d(t(ce), {
|
|
96
96
|
id: `#search-input-${o.item.id}`,
|
|
97
97
|
key: o.refIndex,
|
|
98
98
|
ref_for: !0,
|
|
99
|
-
ref: (
|
|
100
|
-
active: t(
|
|
99
|
+
ref: (r) => t(H)[m] = r,
|
|
100
|
+
active: t(w) === m,
|
|
101
101
|
class: "px-2",
|
|
102
|
-
onClick: (
|
|
103
|
-
onFocus: (
|
|
102
|
+
onClick: (r) => t(U)(o),
|
|
103
|
+
onFocus: (r) => w.value = m
|
|
104
104
|
}, {
|
|
105
105
|
addon: n(() => [
|
|
106
106
|
l(ie, {
|
|
@@ -119,26 +119,26 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
119
119
|
var m;
|
|
120
120
|
return a(), d(be, {
|
|
121
121
|
key: o.uid,
|
|
122
|
-
isDraggable: !
|
|
122
|
+
isDraggable: !s.isReadonly && ((m = o.info) == null ? void 0 : m.title) !== "Drafts",
|
|
123
123
|
isDroppable: t(z),
|
|
124
124
|
menuItem: u,
|
|
125
125
|
parentUids: [],
|
|
126
126
|
uid: o.uid,
|
|
127
|
-
onNewTab: e[4] || (e[4] = (
|
|
127
|
+
onNewTab: e[4] || (e[4] = (r, G) => R("newTab", { name: r, uid: G })),
|
|
128
128
|
onOnDragEnd: t(T),
|
|
129
|
-
onOpenMenu: e[5] || (e[5] = (
|
|
129
|
+
onOpenMenu: e[5] || (e[5] = (r) => Object.assign(u, r))
|
|
130
130
|
}, {
|
|
131
131
|
leftIcon: n(() => {
|
|
132
|
-
var
|
|
132
|
+
var r;
|
|
133
133
|
return [
|
|
134
|
-
((
|
|
134
|
+
((r = o.info) == null ? void 0 : r.title) === "Drafts" ? (a(), d(t(q), {
|
|
135
135
|
key: 0,
|
|
136
136
|
class: "text-sidebar-c-2 group-hover:hidden",
|
|
137
137
|
icon: "Scribble",
|
|
138
|
-
thickness: "2.
|
|
138
|
+
thickness: "2.25"
|
|
139
139
|
})) : (a(), d(t(fe), {
|
|
140
140
|
key: 1,
|
|
141
|
-
class: "text-sidebar-c-2 size-3.5 stroke-[2.
|
|
141
|
+
class: "text-sidebar-c-2 size-3.5 stroke-[2.25] group-hover:hidden",
|
|
142
142
|
src: o["x-scalar-icon"] || "interface-content-folder"
|
|
143
143
|
}, null, 8, ["src"])),
|
|
144
144
|
i("div", {
|
|
@@ -149,7 +149,8 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
149
149
|
l(t(q), {
|
|
150
150
|
class: "text-c-3 hidden text-sm group-hover:block",
|
|
151
151
|
icon: "ChevronRight",
|
|
152
|
-
size: "sm"
|
|
152
|
+
size: "sm",
|
|
153
|
+
thickness: "2.5"
|
|
153
154
|
})
|
|
154
155
|
], 2)
|
|
155
156
|
];
|
|
@@ -165,10 +166,10 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
165
166
|
"empty-sidebar-item": t(O).length <= 1
|
|
166
167
|
})
|
|
167
168
|
}, [
|
|
168
|
-
i("div",
|
|
169
|
-
i("div",
|
|
169
|
+
i("div", ke, [
|
|
170
|
+
i("div", we, [
|
|
170
171
|
l(V, {
|
|
171
|
-
art: t(
|
|
172
|
+
art: t(re),
|
|
172
173
|
class: "font-bold rabbitsit"
|
|
173
174
|
}, null, 8, ["art"]),
|
|
174
175
|
l(V, {
|
|
@@ -181,7 +182,7 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
181
182
|
i("p", { class: "mt-2" }, " Create request, folder, collection or import OpenAPI document ")
|
|
182
183
|
], -1))
|
|
183
184
|
]),
|
|
184
|
-
|
|
185
|
+
s.isReadonly ? $("", !0) : (a(), d(le, {
|
|
185
186
|
key: 0,
|
|
186
187
|
click: t(c).commandPalette.emit
|
|
187
188
|
}, {
|
|
@@ -194,7 +195,7 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
194
195
|
]),
|
|
195
196
|
_: 2
|
|
196
197
|
}, [
|
|
197
|
-
|
|
198
|
+
s.isReadonly ? void 0 : {
|
|
198
199
|
name: "header",
|
|
199
200
|
fn: n(() => [
|
|
200
201
|
l(t(Se), { class: "min-h-11 xl:min-h-header xl:py-2.5 py-1 px-2.5 border-b-1/2" })
|
|
@@ -202,7 +203,7 @@ const ye = { class: "search-button-fade sticky px-3 py-2.5 top-0 z-1" }, we = {
|
|
|
202
203
|
key: "0"
|
|
203
204
|
}
|
|
204
205
|
]), 1032, ["class", "showSidebar"]), [
|
|
205
|
-
[
|
|
206
|
+
[se, s.showSidebar]
|
|
206
207
|
]),
|
|
207
208
|
!t(N) && u ? (a(), d(de, {
|
|
208
209
|
key: 0,
|
|
@@ -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-d0057f49"]]);
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as te, useCssVars as ie, computed as b, ref as ne, resolveComponent as
|
|
1
|
+
import { defineComponent as te, useCssVars as ie, computed as b, ref as ne, resolveComponent as re, openBlock as p, createElementBlock as k, normalizeClass as m, unref as n, createVNode as c, withCtx as h, createBlock as g, withModifiers as R, createElementVNode as u, toDisplayString as z, createCommentVNode as v, createTextVNode as j, renderSlot as le, Fragment as se, renderList as ae } from "vue";
|
|
2
2
|
import { PathId as oe } from "../../router.js";
|
|
3
3
|
import { ScalarButton as $, ScalarIcon as w } from "@scalar/components";
|
|
4
4
|
import { Draggable as ue } from "@scalar/draggable";
|
|
@@ -7,7 +7,7 @@ import pe from "../../components/HttpMethod/HttpMethod.vue.js";
|
|
|
7
7
|
import { useSidebar as fe } from "../../hooks/useSidebar.js";
|
|
8
8
|
import { getModifiers as me } from "../../libs/hot-keys.js";
|
|
9
9
|
import { useWorkspace as be } from "../../store/store.js";
|
|
10
|
-
const ge = { class: "flex flex-row gap-1 items-center" },
|
|
10
|
+
const ge = { class: "flex flex-row gap-1 items-center" }, ve = { class: "relative" }, ce = { class: "flex items-start" }, he = { class: "flex h-5 items-center justify-center max-w-[14px]" }, ye = { class: "flex flex-1 flex-row justify-between editable-sidebar-hover" }, xe = { class: "relative flex h-fit" }, ke = { key: 2 }, B = "hover:bg-sidebar-active-b indent-padding-left", Me = /* @__PURE__ */ te({
|
|
11
11
|
__name: "RequestSidebarItem",
|
|
12
12
|
props: {
|
|
13
13
|
isDraggable: { type: Boolean, default: !1 },
|
|
@@ -19,10 +19,10 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
19
19
|
emits: ["onDragEnd", "newTab", "openMenu"],
|
|
20
20
|
setup(P, { emit: V }) {
|
|
21
21
|
ie((e) => ({
|
|
22
|
-
"
|
|
23
|
-
|
|
22
|
+
"0e0f2455": J.value,
|
|
23
|
+
f310156e: K.value
|
|
24
24
|
}));
|
|
25
|
-
const
|
|
25
|
+
const r = P, F = V, {
|
|
26
26
|
activeRequest: T,
|
|
27
27
|
activeRouterParams: Y,
|
|
28
28
|
activeWorkspace: y,
|
|
@@ -39,7 +39,7 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
39
39
|
events: W
|
|
40
40
|
} = be(), { collapsedSidebarFolders: N, toggleSidebarFolder: H } = fe(), i = b(() => {
|
|
41
41
|
var s, d;
|
|
42
|
-
const e = q[
|
|
42
|
+
const e = q[r.uid], t = A[r.uid], l = I[r.uid], a = U[r.uid];
|
|
43
43
|
return e ? {
|
|
44
44
|
title: ((s = e.info) == null ? void 0 : s.title) ?? "Unknown title",
|
|
45
45
|
entity: e,
|
|
@@ -58,17 +58,17 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
58
58
|
children: t.children,
|
|
59
59
|
warning: "This cannot be undone. You’re about to delete the tag and all requests inside it",
|
|
60
60
|
edit: (o) => M.edit(t.uid, "name", o),
|
|
61
|
-
delete: () => M.delete(t,
|
|
62
|
-
} :
|
|
63
|
-
title:
|
|
64
|
-
link: `/workspace/${y.value.uid}/request/${
|
|
65
|
-
method:
|
|
66
|
-
entity:
|
|
61
|
+
delete: () => M.delete(t, r.parentUids[0])
|
|
62
|
+
} : l ? {
|
|
63
|
+
title: l.summary ?? [l.method, l.path].join(" - "),
|
|
64
|
+
link: `/workspace/${y.value.uid}/request/${l.uid}`,
|
|
65
|
+
method: l.method,
|
|
66
|
+
entity: l,
|
|
67
67
|
resourceTitle: "Request",
|
|
68
68
|
warning: "This cannot be undone. You’re about to delete the request.",
|
|
69
|
-
children:
|
|
70
|
-
edit: (o) => E.edit(
|
|
71
|
-
delete: () => E.delete(
|
|
69
|
+
children: l.examples,
|
|
70
|
+
edit: (o) => E.edit(l.uid, "summary", o),
|
|
71
|
+
delete: () => E.delete(l, r.parentUids[0])
|
|
72
72
|
} : {
|
|
73
73
|
title: a.name,
|
|
74
74
|
link: `/workspace/${y.value.uid}/request/${a.requestUid}/examples/${a.uid}`,
|
|
@@ -82,21 +82,21 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
82
82
|
};
|
|
83
83
|
}), G = b(
|
|
84
84
|
() => i.value.entity.type === "collection" && i.value.title === "Drafts"
|
|
85
|
-
), J = b(() =>
|
|
85
|
+
), J = b(() => r.parentUids.length ? f.value ? `${(r.parentUids.length - 1) * 12}px` : `${r.parentUids.length * 12}px` : "12px"), K = b(() => r.parentUids.length ? f.value ? `${(r.parentUids.length - 1) * 12}px` : `${r.parentUids.length * 12}px` : "0px"), Q = b(
|
|
86
86
|
() => {
|
|
87
87
|
var e;
|
|
88
|
-
return N[
|
|
88
|
+
return N[r.uid] || ((e = T.value) == null ? void 0 : e.uid) === r.uid && i.value.entity.examples.length > 1;
|
|
89
89
|
}
|
|
90
90
|
), X = b(
|
|
91
91
|
() => {
|
|
92
92
|
var e;
|
|
93
|
-
return Y.value[oe.Request] === "default" && ((e = T.value) == null ? void 0 : e.uid) ===
|
|
93
|
+
return Y.value[oe.Request] === "default" && ((e = T.value) == null ? void 0 : e.uid) === r.uid;
|
|
94
94
|
}
|
|
95
95
|
), C = ne(null), O = b(() => {
|
|
96
96
|
let e = 0.5, t = 0.5;
|
|
97
97
|
if (!C.value) return { ceiling: e, floor: t };
|
|
98
|
-
const { draggingItem:
|
|
99
|
-
return !q[
|
|
98
|
+
const { draggingItem: l } = C.value;
|
|
99
|
+
return !q[l == null ? void 0 : l.id] && i.value.entity.type === "collection" ? (e = 1, t = 0) : i.value.entity.type === "tag" && (e = 0.8, t = 0.2), { ceiling: e, floor: t };
|
|
100
100
|
}), Z = (e, t) => !(y.value.isReadOnly || U[t.id] || q[e.id]), _ = (e, t) => {
|
|
101
101
|
e && (me(["default"]).some((s) => e[s]) ? F("newTab", t.title || "", t.entity.uid) : t.link && L.push(t.link));
|
|
102
102
|
};
|
|
@@ -104,19 +104,19 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
104
104
|
W.commandPalette.emit({
|
|
105
105
|
commandName: "Create Request",
|
|
106
106
|
metaData: {
|
|
107
|
-
itemUid:
|
|
108
|
-
parentUid:
|
|
107
|
+
itemUid: r.uid,
|
|
108
|
+
parentUid: r.parentUids[0]
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
return (e, t) => {
|
|
113
|
-
const
|
|
113
|
+
const l = re("RequestSidebarItem", !0);
|
|
114
114
|
return p(), k("div", {
|
|
115
115
|
class: m(["relative flex flex-row", [
|
|
116
|
-
n(f) && e.parentUids.length > 1 || !n(f) && e.parentUids.length ? "before:bg-
|
|
116
|
+
n(f) && e.parentUids.length > 1 || !n(f) && e.parentUids.length ? "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(.75rem_+_.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 indent-border-line-offset" : ""
|
|
117
117
|
]])
|
|
118
118
|
}, [
|
|
119
|
-
|
|
119
|
+
c(n(ue), {
|
|
120
120
|
id: i.value.entity.uid,
|
|
121
121
|
ref_key: "draggableRef",
|
|
122
122
|
ref: C,
|
|
@@ -154,10 +154,10 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
154
154
|
class: m(["line-clamp-3 font-medium w-full pl-2 word-break-break-word", {
|
|
155
155
|
"editable-sidebar-hover-item": !n(f)
|
|
156
156
|
}])
|
|
157
|
-
},
|
|
157
|
+
}, z(i.value.title), 3),
|
|
158
158
|
u("div", ge, [
|
|
159
|
-
u("div",
|
|
160
|
-
n(f) ?
|
|
159
|
+
u("div", ve, [
|
|
160
|
+
n(f) ? v("", !0) : (p(), g(n($), {
|
|
161
161
|
key: 0,
|
|
162
162
|
class: m(["px-0.5 py-0 hover:bg-b-3 hidden group-hover:flex absolute -translate-y-1/2 right-0 aspect-square inset-y-2/4 h-fit", {
|
|
163
163
|
flex: ((o = (d = e.menuItem) == null ? void 0 : d.item) == null ? void 0 : o.entity.uid) === i.value.entity.uid && e.menuItem.open
|
|
@@ -176,7 +176,7 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
176
176
|
))
|
|
177
177
|
}, {
|
|
178
178
|
default: h(() => [
|
|
179
|
-
|
|
179
|
+
c(n(w), {
|
|
180
180
|
icon: "Ellipses",
|
|
181
181
|
size: "sm"
|
|
182
182
|
})
|
|
@@ -184,13 +184,13 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
184
184
|
_: 1
|
|
185
185
|
}, 8, ["class"]))
|
|
186
186
|
]),
|
|
187
|
-
u("span",
|
|
188
|
-
t[9] || (t[9] =
|
|
187
|
+
u("span", ce, [
|
|
188
|
+
t[9] || (t[9] = j(" ")),
|
|
189
189
|
i.value.method ? (p(), g(n(pe), {
|
|
190
190
|
key: 0,
|
|
191
191
|
class: "font-bold",
|
|
192
192
|
method: i.value.method
|
|
193
|
-
}, null, 8, ["method"])) :
|
|
193
|
+
}, null, 8, ["method"])) : v("", !0)
|
|
194
194
|
])
|
|
195
195
|
])
|
|
196
196
|
], 2)
|
|
@@ -204,13 +204,13 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
204
204
|
onClick: t[3] || (t[3] = (s) => n(H)(i.value.entity.uid))
|
|
205
205
|
}, [
|
|
206
206
|
u("span", he, [
|
|
207
|
-
|
|
207
|
+
le(e.$slots, "leftIcon", {}, () => [
|
|
208
208
|
u("div", {
|
|
209
209
|
class: m({
|
|
210
210
|
"rotate-90": n(N)[i.value.entity.uid]
|
|
211
211
|
})
|
|
212
212
|
}, [
|
|
213
|
-
|
|
213
|
+
c(n(w), {
|
|
214
214
|
class: "text-c-3 text-sm",
|
|
215
215
|
icon: "ChevronRight",
|
|
216
216
|
size: "sm",
|
|
@@ -218,14 +218,14 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
218
218
|
})
|
|
219
219
|
], 2)
|
|
220
220
|
], !0),
|
|
221
|
-
t[10] || (t[10] =
|
|
221
|
+
t[10] || (t[10] = j(" "))
|
|
222
222
|
]),
|
|
223
223
|
u("div", ye, [
|
|
224
224
|
u("span", {
|
|
225
225
|
class: m(["line-clamp-3 font-medium text-left w-full word-break-break-word", {
|
|
226
226
|
"editable-sidebar-hover-item": !n(f)
|
|
227
227
|
}])
|
|
228
|
-
},
|
|
228
|
+
}, z(i.value.title), 3),
|
|
229
229
|
u("div", xe, [
|
|
230
230
|
!n(f) && !G.value ? (p(), g(n($), {
|
|
231
231
|
key: 0,
|
|
@@ -245,19 +245,19 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
245
245
|
))
|
|
246
246
|
}, {
|
|
247
247
|
default: h(() => [
|
|
248
|
-
|
|
248
|
+
c(n(w), {
|
|
249
249
|
icon: "Ellipses",
|
|
250
250
|
size: "sm"
|
|
251
251
|
})
|
|
252
252
|
]),
|
|
253
253
|
_: 1
|
|
254
|
-
}, 8, ["class"])) :
|
|
254
|
+
}, 8, ["class"])) : v("", !0),
|
|
255
255
|
t[11] || (t[11] = u("span", null, " ", -1))
|
|
256
256
|
])
|
|
257
257
|
])
|
|
258
|
-
])) :
|
|
258
|
+
])) : v("", !0),
|
|
259
259
|
Q.value ? (p(), k("div", ke, [
|
|
260
|
-
(p(!0), k(se, null, ae(i.value.children, (s) => (p(), g(
|
|
260
|
+
(p(!0), k(se, null, ae(i.value.children, (s) => (p(), g(l, {
|
|
261
261
|
key: s,
|
|
262
262
|
isDraggable: !n(U)[s],
|
|
263
263
|
isDroppable: Z,
|
|
@@ -275,7 +275,7 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
275
275
|
onClick: t[7] || (t[7] = (s) => ee())
|
|
276
276
|
}, {
|
|
277
277
|
default: h(() => [
|
|
278
|
-
|
|
278
|
+
c(n(w), {
|
|
279
279
|
class: "ml-0.5 h-2.5 w-2.5",
|
|
280
280
|
icon: "Add",
|
|
281
281
|
thickness: "3"
|
|
@@ -283,8 +283,8 @@ const ge = { class: "flex flex-row gap-1 items-center" }, ce = { class: "relativ
|
|
|
283
283
|
t[12] || (t[12] = u("span", null, "Add Request", -1))
|
|
284
284
|
]),
|
|
285
285
|
_: 1
|
|
286
|
-
}, 8, ["class"])) :
|
|
287
|
-
])) :
|
|
286
|
+
}, 8, ["class"])) : v("", !0)
|
|
287
|
+
])) : v("", !0)
|
|
288
288
|
];
|
|
289
289
|
}),
|
|
290
290
|
_: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":";gBAkEc,OAAO;gBACP,OAAO;;;;;;gBADP,OAAO;gBACP,OAAO;;;;;;
|
|
1
|
+
{"version":3,"file":"RequestSubpageHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/views/Request/RequestSubpageHeader.vue"],"names":[],"mappings":";gBAkEc,OAAO;gBACP,OAAO;;;;;;gBADP,OAAO;gBACP,OAAO;;;;;;AA+LrB,wBAWG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./RequestSubpageHeader.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ e(a, [["__scopeId", "data-v-da68a303"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -3,7 +3,7 @@ import p from "../../components/AddressBar/AddressBar.vue.js";
|
|
|
3
3
|
import u from "../../components/EnvironmentSelector/EnvironmentSelector.vue.js";
|
|
4
4
|
import f from "../../components/Sidebar/SidebarToggle.vue.js";
|
|
5
5
|
import { ScalarIcon as c } from "@scalar/components";
|
|
6
|
-
const b = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-1 lg:p-
|
|
6
|
+
const b = { class: "lg:min-h-header flex items-center w-full justify-center p-2 pt-1 lg:p-1 flex-wrap t-app__top-container md:border-b-1/2" }, g = { class: "flex flex-row items-center gap-1 lg:px-1 lg:mb-0 mb-0.5 lg:flex-1 w-6/12" }, x = { class: "flex flex-row items-center gap-1 lg:px-2.5 lg:mb-0 mb-0.5 lg:flex-1 justify-end w-6/12" }, C = /* @__PURE__ */ s({
|
|
7
7
|
__name: "RequestSubpageHeader",
|
|
8
8
|
props: {
|
|
9
9
|
modelValue: { type: Boolean },
|
|
@@ -13,7 +13,7 @@ const N = { class: "relative col-1 flex-center gap-6 p-2 capitalize" }, q = { cl
|
|
|
13
13
|
s.commandPalette.emit({ commandName: "Create Request" });
|
|
14
14
|
}, c = (n) => {
|
|
15
15
|
n != null && n.openCommandPaletteRequest && m();
|
|
16
|
-
}, x = "2.1.
|
|
16
|
+
}, x = "2.1.23";
|
|
17
17
|
return k(() => s.hotKeys.on(c)), R(() => s.hotKeys.off(c)), (n, e) => (r(), l("div", N, [
|
|
18
18
|
t("div", q, [
|
|
19
19
|
o(f).isReadOnly ? p("", !0) : (r(), l("div", v, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResponseHeaders.vue.d.ts","sourceRoot":"","sources":["../../../../src/views/Request/ResponseSection/ResponseHeaders.vue"],"names":[],"mappings":"AAqEA,KAAK,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAA;;aAGrD,MAAM,EAAE;;aAAR,MAAM,EAAE;;AAuInB,wBAMG"}
|